Dear Lexi, I think its very important to be able to manipulate Composite
Components programmaticaly. Without this Composite Components are half
useless. I used your solution setComponent3()(Thank you very much) But it
doesn't work when javax.faces.PROJECT_STAGE is set to DEVELOPMENT. (It took
me all day to figure this out) It throws:
javax.faces.view.facelets.TagException:
/resources/components/form/pokus.xhtml @8,19 <cc:interface> Component Not
Found for identifier: j_id2.getParent(). at
com.sun.faces.facelets.tag.composite.InterfaceHandler.validateComponent(InterfaceHandler.java:135)
at
com.sun.faces.facelets.tag.composite.InterfaceHandler.apply(InterfaceHandler.java:125)
at
javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:98)
at
com.sun.faces.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:93)
at
com.sun.faces.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:82)
at com.sun.faces.facelets.impl.DefaultFacelet.apply(DefaultFacelet.java:152)
at cz.boza.formcreator.formcore.Try.setComponentJ(Try.java:83) at
cz.boza.formcreator.formcore.FormCreator.<init>(FormCreator.java:40) at
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
Its thrown at this point: ...Facelet f =
factory.getFacelet(componentResource.getURL());f.apply(context,
compositeRoot); <== ... If I set javax.faces.PROJECT_STAGE to PRODUCTION
Exception is gone and component is successfully rendered.Don't know what to
do. It really should be much easier.Any help is appreciated.Thanks.
--
[Message sent by forum member 'Infragile']
View Post: http://forums.java.net/node/701640