-
1. Re: By clicking every row of dataTable, show Popup to edit i
dashti Nov 24, 2007 3:55 AM (in response to dashti)http://www.jboss.org/index.html?module=bb&op=viewtopic&t=116438 here is a relevant problem, but it doesn't work too,
is there anybody that can help me.
please help ! -
2. Re: By clicking every row of dataTable, show Popup to edit i
paradigmza Nov 26, 2007 12:15 AM (in response to dashti)For option 1: (because I think option 2 is rubbish) you just need a single modal panel, so you do not need to worry about page size. Just bind the contents of the modal panel to some variables then change the values of those variables with a ajax action and rerender the contents of the modalpanel...
This is a JSF / Richfaces question and does not really involve seam, you should be able to find some examples in the Richfaces documentation / forums -
3. Re: By clicking every row of dataTable, show Popup to edit i
dashti Nov 27, 2007 12:13 PM (in response to dashti)but I couldn't find how caN I do that.
I made a HtmlModalPanel, but I couldn't add any components to this panel! how is it possible? -
4. Re: By clicking every row of dataTable, show Popup to edit i
paradigmza Nov 29, 2007 7:46 AM (in response to dashti)like this
<a4j:form> <rich:dataTable value="#{rowDataModel}" var="row" onRowMouseOver="this.style.backgroundColor='#EAEAEA';this.style.cursor='pointer';" onRowMouseOut="this.style.backgroundColor='#{FFFFFF}'"> <rich:column> <f:facet name="header"> <h:outputText value="Name" /> </f:facet> <h:outputText value="#{row.name}" /> </rich:column> <rich:column> <f:facet name="header"> <h:outputText value="Age" /> </f:facet> <h:outputText value="#{row.age}" /> </rich:column> <a4j:support event="onRowClick" oncomplete="Richfaces.showModalPanel('popUpPanel')" ajaxSingle="true" action="#{test.showPopUp}" reRender="popUpForm" /> </rich:dataTable> </a4j:form> <rich:modalPanel id="popUpPanel" resizeable="false" autosized="true"> <f:facet name="header"> <h:outputText value="Some header" /> </f:facet> <f:facet name="controls"> <h:graphicImage value="/img/popupclose.gif" onclick="Richfaces.hideModalPanel('crudModalPanel')"></h:graphicImage> </f:facet> <a4j:form id="popUpForm"> Name : #{test.name} Age : #{test.age} </a4j:form> </rich:modalPanel>
and a seam component called test@DataModel List<User> rowDataModel; @DataModelSelection User selectedRow; public void showPopup() { name = selectedRow.getName(); age = selectedRow.getAge(); }
so the action in
<a4j:support event="onRowClick" oncomplete="Richfaces.showModalPanel('popUpPanel')" ajaxSingle="true" action="#{test.showPopUp}" reRender="popUpForm" />
changes the values of test.name and test.age. The popup is then displayed with the changed values. -
5. Re: By clicking every row of dataTable, show Popup to edit i
dashti Nov 30, 2007 2:30 AM (in response to dashti)hi paradigmz,
thank a lot for your best solution!
it works now!
a step forward!