jsf - Can I declare a Composite-Component using only xhtml file and still be able to use the component in a JAVA code -


i trying create composite-component using jsf simple tags without taking advantages of uicomponent. mean not want implement component inheriting uicomponentbase,uicomponentbase,etc. however, after implementation, want able use component in java code. example, consider composite component below(lets call mycompositecomponent):

<html xmlns="http://www.w3.org/1999/xhtml"        //...     xmlns:composite="http://java.sun.com/jsf/composite">         <composite:interface>             <composite:attribute name="anything" />         </composite:interface>         <composite:implementation>             #{cc.attrs.anything}         </composite:implementation> </html> 

then want use component in java class below:

public class javaclass {     private mycompositecomponent mycompositecomponent;     // .... } 

there have been similar answers question. omnifaces has utility method called components.includecompositecomponent(uicomponent parent, string libraryname, string resourcename, string id) add component uicomponent programmatically. return composite component ,

... can if necessary further used set custom attributes or value expressions on it.


Comments

Popular posts from this blog

google api - Incomplete response from Gmail API threads.list -

Installing Android SQLite Asset Helper -

Qt Creator - Searching files with Locator including folder -