javax.faces.render.RenderKit Java Examples

The following examples show how to use javax.faces.render.RenderKit. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ComponentRendererTest.java    From XPagesExtensionLibrary with Apache License 2.0 5 votes vote down vote up
private RenderKitCheckInfo[] getRenderKitInfos(FacesContext context) {
      // get from subclass
      RenderKitCheckInfo[] kitInfos = createRenderKitInfos();
      
      // validate RenderKitInfos RenderKits exist
RenderKitFactory factory = (RenderKitFactory) FactoryFinder
              .getFactory(FactoryFinder.RENDER_KIT_FACTORY);
for (int i = 0; i < kitInfos.length; i++) {
	RenderKit kit = kitInfos[i].findRenderKit(context, factory);
	if (null == kit) {
		assertNotNull("No faces-config containing the renderKit "+ kitInfos[i].getRenderKitId(), /*kit*/null);
	}
}
      return kitInfos;
  }
 
Example #2
Source File: AddSignatureToViewStateObjects.java    From fenixedu-academic with GNU Lesser General Public License v3.0 5 votes vote down vote up
public void runTask() throws Exception {
    
    RenderKitFactory rkFactory = (RenderKitFactory) FactoryFinder.getFactory("javax.faces.render.RenderKitFactory");
    RenderKitImpl html_basic = (RenderKitImpl) rkFactory.getRenderKit(FacesContext.getCurrentInstance(), "HTML_BASIC");
    final RenderKit renderKit = new MyRenderKit();

    Field rendererFamiliesField = RenderKitImpl.class.getDeclaredField("rendererFamilies");
    rendererFamiliesField.setAccessible(true);

    HashMap rendererFamiles = (HashMap) rendererFamiliesField.get(html_basic);
    rendererFamiliesField.set(renderKit, rendererFamiles);

    rkFactory.addRenderKit("HTML_BASIC", renderKit);
    JsonElement jsonElement = new Gson().toJsonTree(renderKit);
}
 
Example #3
Source File: MockFacesContext.java    From spring-analysis-note with MIT License 4 votes vote down vote up
@Override
public RenderKit getRenderKit() {
	return null;
}
 
Example #4
Source File: MockFacesContext.java    From java-technology-stack with MIT License 4 votes vote down vote up
@Override
public RenderKit getRenderKit() {
	return null;
}
 
Example #5
Source File: MockFacesContext.java    From spring4-understanding with Apache License 2.0 4 votes vote down vote up
@Override
public RenderKit getRenderKit() {
	return null;
}
 
Example #6
Source File: FacesContextStub.java    From development with Apache License 2.0 4 votes vote down vote up
@Override
public RenderKit getRenderKit() {
    throw new UnsupportedOperationException();
}
 
Example #7
Source File: ComponentRendererTest.java    From XPagesExtensionLibrary with Apache License 2.0 4 votes vote down vote up
/**
 * Return a RenderKit, lazily created.
 */
public RenderKit findRenderKit(FacesContext context, RenderKitFactory factory) {
  _renderKit = factory.getRenderKit(context, getRenderKitId());
  return _renderKit;
}
 
Example #8
Source File: ComponentRendererTest.java    From XPagesExtensionLibrary with Apache License 2.0 4 votes vote down vote up
public RenderKit getRenderKit() {
    return _renderKit;
}