|
Hello: I can’t find a way to do this using myEclipse JRI and was wondering if anyone knew a way with myFaces.
I’d have a table of <h:inputText> elements bound to an ArrayList. I display it and have the user type in new values, but those new values are never saved. Since the ArrayList is generated dynamically and there could be up to 50 entries I’d like to avoid having a commandButton in each row, and I’m not sure if that would work either. Is this possible with myFaces or even at all? Any help is greatly appreciated, Jason
Here’s the interface: <h:dataTable id="params_dt" value="#{scriptHandler.parameterModel}" var="params"> <h:column id="params_c1"> <h:inputText value="#{params}" /> </h:column> <f:facet name="footer"> <h:commandButton value="Preview Job" action="#{scriptHandler.updateJob}" /> </f:facet> </h:dataTable>
And here’s the Java code I’m currently using: public class ScriptHandler { private DataModel parameterModel;
…(other methods assign a filled ArrayList to parameterModel)…
public String updateJob(){ ArrayList al = (ArrayList) parameterModel.getWrappedData(); System.err.println(al.toString()); return "reviewJob"; } }
Any help is greatly appreciated, Jason |
- possible to edit Tabular data? Jason Nichols
- RE: possible to edit Tabular data? Broekelmann, Mathias

