I keep on learning...my first problem today is that I need to refresh a subview after the user updates data in a form.
The subview id is vistaCliente and inside there is an Ajax Zone <jsfExt:ajaxZone id="autoUpdate"> ... </jsfExt:ajaxZone>
The user fills a form then has to click on a commandLink:
The method processAction render the subview in this way:
The subview "vistaCliente" (is a form too) is created at the sametime with the first form but not showed ( <f:subview id="vistaCliente" rendered="false"> ).
The function of vistaCliente is to show the data if the customer is already registered in the database. If the customer is not in the database, vistaCliente is ready to get the additional data of the new customer for saving in the database.
To make things simpler the vistaCliente has its own back bean ... also because thinking of reusing it in other pages.
The question: what is the way of using Ajax to refresh the subview "vistaCliente" when the customer is in the database from the processAction. Or put it in another way...how to refresh a view from another view? I tried to create an object of the VistaClienteBean from another bean and used the set methods to refresh the data but it doesn´t work... Do I have to use the same back bean?
As usual many thanks for your cooperation.
Joined: Jul 30, 2005
In the first back bean: A call to the update() method of the second bean.
The update method of the second bean recieve data and call its own setters to updated the initial information. But it doesn't work.
I understand that if the view and the subview depended on the same back bean this would work.
Am I right?
But I also think that the two back bean communication is possible....yes?