Forum Stats

  • 3,758,164 Users
  • 2,251,349 Discussions
  • 7,870,080 Comments

Discussions

Trouble in getting values from Dynamic component in JSF?

User_SH8A9
User_SH8A9 Member Posts: 1 Green Ribbon
edited Jun 7, 2021 12:25PM in JavaServer Faces

Hello Everyone,

I have just created the inputtext from backingbeans using following code

-> BackingBean :

private HtmlPanelGrid grid;

public void setDynamicPanelGrid(UIComponent component) {

this.grid = (HtmlPanelGrid) component;

}

void dosome()

Application app = FacesContext.getCurrentInstance().getApplication();

HtmlInputText inputtext = (HtmlInputText) app.createComponent(HtmlInputText.COMPONENT_TYPE);

grid.getChildren().add(inputtext );


}

==========

Jspx : <h:panelGrid binding="#{someBackingBean.dynamicPanelGrid}">




How can I create the inputtext successfully but i dont know how to get the entered values from this dynamic textbox

Kindly guide me.

Thanks in Advance

Ref: https://ludokingforpc.com/

Tagged: