-
1. Re: Strange problem with rich:modalPanel not updating h:inputText
sivaprasad9394 Jun 18, 2012 8:31 AM (in response to drnicola)Try adding a4j:region with a4j:outputPanel ane then add the code below it.
-
2. Re: Strange problem with rich:modalPanel not updating h:inputText
drnicola Jun 20, 2012 3:00 AM (in response to sivaprasad9394)Thanks for your answer.
I included my rich:datatable inside a <a4j:region>
<a4j:region>
<a4j:outputPanel>
block but no luck. I also tried to replace all h:panelgrid in my xhtml page with
<a4j:region>
<a4j:outputPanel>
but the problem persists.
Any other ideas? What is really strange is the fact that if I replace h:inputText with h:outputText it works fine.. I was thinking that maybe rich:modalPanel is messing around with the JSF lifecycle and maybe this affects refreshing h:inputText.
Does anyone know any alternatives to rich:modalPanel? I 'm using jsf1.2 and richfaces 3.2.
Thank you.
-
3. Re: Strange problem with rich:modalPanel not updating h:inputText
sivaprasad9394 Jun 20, 2012 3:22 AM (in response to drnicola)Please share some code i will check it....Mean time try reRender the id of the component(textbox)
or
-
4. Re: Strange problem with rich:modalPanel not updating h:inputText
drnicola Jun 20, 2012 3:41 AM (in response to sivaprasad9394)I can't reRender the h:inputText itself because it's inside the rich:dataTable and the id is generated. However I'm rerendering the h:panelGrid that contains the rich:dataTable which does the job.
This is the rich:column inside the rich:datatable:
<rich:column>
<f:facet name="header">
<h:outputText value="Έγκριση" />
</f:facet>
<h:panelGrid columns="2" border="0" cellspacing="2" width="100%" styleClass="panelGrid-align">
<h:panelGrid width="50px" columns="2" border="1" rules="cols" cellspacing="0" cellpadding="0"
columnClasses="leftCol,rightCol">
<h:inputText value="#{orderList.approved}" styleClass="spinnerLabel"/>
<h:panelGrid width="100%" columns="1" border="0" cellspacing="0" cellpadding="0" columnClasses="innerCol">
<a4j:commandButton styleClass="spinnerBtnUp" action="#{serveOrders_bean.spinnerUp}" reRender="servingPanel"
disabled="#{orderList.availableCounter == 0}">
<a4j:actionparam name="spinnerUp" assignTo="#{serveOrders_bean.spinnerIdUp}" value="#{orderList.id}"/>
</a4j:commandButton>
<a4j:commandButton styleClass="spinnerBtnDown" action="#{serveOrders_bean.spinnerDown}"
reRender="servingPanel">
<a4j:actionparam name="spinnerDown" assignTo="#{serveOrders_bean.spinnerIdDown}" value="#{orderList.id}"/>
</a4j:commandButton>
</h:panelGrid>
</h:panelGrid>
<a4j:commandButton id="editAssignements" styleClass="editAssignementsImg" disabled="#{orderList.availableCounter == 0}"
oncomplete="Richfaces.showModalPanel('editAssignmentsPanel');" reRender="editAssignmentsPanel">
<a4j:actionparam name="editOrderAssignment" assignTo="#{serveOrders_bean.orderIdEdited}" value="#{orderList.id}"/>
<rich:toolTip followMouse="true" direction="top-right" showDelay="300" styleClass="tooltip_custom">
<span style="white-space:nowrap">
Επεξεργασία Χρεώσεων
</span>
</rich:toolTip>
</a4j:commandButton>
</h:panelGrid>
</rich:column>
and this is the bean method that is called when I close the modal panel:
public void closeModalPanel(){
Session session = SessionFactoryUtil.getSessionFactory().getCurrentSession();
Transaction tx = session.beginTransaction();
for (Order o: orders){
if (o.getId() == popupOrder.getId()){
o.setApproved(popupOrder.getApproved());
determineOrderStatus(o);
session.saveOrUpdate(o);
break;
}
}
tx.commit();
submitSearch();
for (Order o: orders){
if (o.getId() == popupOrder.getId()){
o.setSelected(true);
break;
}
}
}