Programmatically component creation and applying skining and validation on component programmatically.
- Create fusion ADF application and in view controller create page
- Find a parent component to create child under it as any layout (panel form, panel group, af:form etc)
- Suppose you have a page with a panel form layout, now you have to create child components in this form layout at runtime
- Dropped a button on page , on this button action i will create an inputText programmatically and assign validator method reference to it.
- Create mananege bean class.
- Bind the form component value with manage bean .
<af:panelFormLayout id="pfl1" binding="#{pageFlowScope.ProgramComponent.panelForm}">
<f:facet name="footer"/>
</af:panelFormLayout>
binding with panelForm:
add component method which help in adding component under the parent layout.
creating object of component and setting properties and calling add component .
create one helper method to resolve Validator
and now add the validator into the input component
ui.setValidator( resolveValidator("{pageFlowScope.ProgramComponent.inputValidator}"));
Thanks to ashish
No comments:
Post a Comment