Hello guys, let's continue with the dynamic components through the bean.As we have stated the panelGrid component in the bean builder and as we have already created the code in view, go to next step.let's make a method called criarPanel (); , Void even as below: public void createPanel(){ } Let's put it inside the InputText and OutputLabel. If you want to create more than one, then use the FOR repeating structure, for example, want to create six components, then we will use as follows: for(int i= 0; i < 6; i++){ //Code, which will be explained below.}Within this is we will assign value to components for this we must get the context for that there is FacesContext, the javax.faces.context.FacesContext package, with getCurrentInstance() method as follows:FacesContext.getCurrentInstance().getApplication().createComponent(OutputLabel.COMPONENT_TYPE);In the code above we take the context, your application so we created the component and within the createComponent method declare which component we want, in this case the OutputLabel, only that all this code is not the OutputLabel type and so we have to cast. opl = (OutputLabel) FacesContext.getCurrentInstance().getApplication().createComponent(OutputLabel.COMPONENT_TYPE);in = (InputText) FacesContext.getCurrentInstance().getApplication().createComponent(InputText.COMPONENT_TYPE);Then we have to get separate first the current context, then the context of the expression Language ELContext after the application in order to declare a factory of expression, as we can see in the code below:context = FacesContext.getCurrentInstance();elContext = context.getELContext();Application app = context.getApplication();ExpressionFactory expressionFactory = app.getExpressionFactory();With this we are almost over for the post not be so great, let's stop here and continue next week.Any questions can make a comment that I'll be happy to answer even more! Hello guys,I am here to write another post that I think will be very useful for when I needed to, I found everything very tailored, one part in a post, elsewhere in another post and so on. I want to remind that I do here components created through the bean, for code and called on the binding tag of JSF components and will use Primefaces, but can use the same way to the jsf own components that works the same way.What is the idea?The idea is to create a panel with a number choosing outputLabel and inputText.So what variables need?We will need the variables below: FacesContext context; ELContext elContext; private InputText in;private OutputLabel opl;private PanelGrid panel;We will need to take the context and also OutputLabel and InputText, without forgetting the panelGrid.Packets that are the components are:import org.primefaces.component.inputtext.InputText;import org.primefaces.component.outputlabel.OutputLabel;import org.primefaces.component.panelgrid.PanelGrid;Okay, so we have the components in the bean, now we need to know if it will actually work to create, so the bean builder declare:panel = new PanelGrid(); (1) panel.setId("pnlDinamico"); (2) panel.setColumns(2); (3)Above we started creating the panel (1), we set his id (2), this case is unique because it is just a panel and declare the number of column that was in view would be that way:<p:panelgrid columns="2" id="pnlDinamico"></p:panelgrid>To see if it worked really must put the following code:<p:panelGrid binding="#{bean.panel}"> <f:facet name="header"> Panel Dinamico </f:facet> </p:panelGrid>Ready with that vcoe code will display a panelGrid without any data only named Dynamic Panel.In the next post we continue. Until then!Continue in the part two! Por muito tempo procurei