This content has been marked as final.
Show 4 replies
-
1. Re: Using DataTable and SubTable in DataEntry
james_hays Jun 15, 2007 1:55 PM (in response to james_hays)Here is my xhtml.
<h:form id="ManageForm"> <rich:dataTable value="#{manageExternalLinks.baseProfile.baseProfileGates}" var="baseProfileGate" width="750px" bgcolor="blue"> <f:facet name="header"> <rich:columnGroup> <rich:column colspan="4"> <h:outputText value="#{manageExternalLinks.baseProfile.name} - #{manageExternalLinks.baseProfile.version}" /> </rich:column> </rich:columnGroup> </f:facet> <rich:column colspan="2"> <f:facet name="header">Gate Name</f:facet> <h:outputText value="#{baseProfileGate.gate.name}" styleClass="text"/> </rich:column> <rich:column> <f:facet name="header">External URL</f:facet> <h:inputText value="#{baseProfileGate.externalUrl}" styleClass="text"> <a4j:support event="onkeyup" reRender="GateUrl" ajaxSingle="true" limitToList="true" requestDelay="500"/> </h:inputText><br/> <h:outputLink id="GateUrl" value="#{baseProfileGate.externalUrl}" target="_blank">#{baseProfileGate.externalUrl}</h:outputLink> </rich:column> <rich:column> <f:facet name="header">Intent</f:facet> <h:inputTextarea value="#{baseProfileGate.description}" styleClass="textArea"/> </rich:column> <rich:subTable value="#{baseProfileGate.productTemplates}" var="productTemplate"> <rich:column> <!--<f:facet name="header"><rich:spacer /></f:facet> --> <rich:spacer/> <f:facet name="footer"><rich:spacer /></f:facet> </rich:column> <rich:column> <!--<f:facet name="header">Product Name</f:facet>--> <h:inputText value="#{productTemplate.name}" styleClass="text"/> <f:facet name="footer"><rich:spacer /></f:facet> </rich:column> <rich:column> <!--<f:facet name="header">External URL</f:facet>--> <h:inputText value="#{productTemplate.externalUrl}" styleClass="text"> <a4j:support event="onkeyup" reRender="ProductUrl" ajaxSingle="true" limitToList="true" requestDelay="500"/> </h:inputText><br/> <h:outputLink id="ProductUrl" value="#{productTemplate.externalUrl}">#{productTemplate.externalUrl}</h:outputLink> <f:facet name="footer"><rich:spacer /></f:facet> </rich:column> <rich:column> <!--<f:facet name="header">Intent</f:facet>--> <h:inputTextarea value="#{productTemplate.description}"/> <f:facet name="footer"><rich:spacer /></f:facet> </rich:column> </rich:subTable> </rich:dataTable> <h:commandButton action="#{manageExternalLinks.submitChanges}" value="Submit" /> </h:form>
And here is my SFSB@Stateful @Name("manageExternalLinks") public class ManageExternalLinksAction implements ManageExternalLinks { @PersistenceContext(type = PersistenceContextType.EXTENDED) private EntityManager em; private BaseProfile baseProfile; public BaseProfile getBaseProfile() { return baseProfile; } public void setBaseProfile(BaseProfile baseProfile) { this.baseProfile = baseProfile; } @End public void submitChanges() { this.baseProfile = em.merge(baseProfile); } @Factory(value = "allBaseProfiles") public List<BaseProfile> loadBaseProfiles() { return em.createQuery("Select bp from BaseProfile bp").getResultList(); } @Destroy @Remove public void destroy() { } }
-
2. Using DataTable and SubTable in DataEntry
taysay Feb 27, 2011 9:31 AM (in response to james_hays)Hi James,
Please can I have a look at the
baseProfileGates object ?
I am having issues with the subtable and it appears you example may give me the leading. sori I am riding on your problem for my solution.
Have a good one.
-
4. Using DataTable and SubTable in DataEntry
ilya_shaikovsky Feb 28, 2011 3:36 AM (in response to james_hays)any exceptions on submission?