I'm implementing a custom component with composite. The source code of my composite compoment is only as follow:
<cc:interface componentType="selectOneRadio"
xmlns="http://www.w3.org/1999/xhtml"
xmlns:cc="http://java.sun.com/jsf/composite">
<cc:attribute name="direction" default="next" />
</cc:interface>
as you can see I don't use the implementation
section, but it is no problem for me if I have to use it.
Then, I render it's content with Java as follows:
public void encodeChildren(FacesContext context) throws IOException {
...
}
This control will generate an integer value based on the value of the attribute with name: "direction". If it's value is "next" then the generated value is the current day of the month plus 1 and if it's value is "back" then the generated value is the current day of the month minus 1.
I would like to know how could I pass that generated value to the backing bean when the user clicks on a <h:commandButton />
I add after my custom component?
Do I need to use <f:ajax />
or something like that?
Other question by the way, could I render my composite component with Java and <cc:implementation />
at the same time (mixing)?
Thanks.