0 Replies Latest reply on Nov 30, 2007 10:44 AM by milesif

    generating gui on-the-fly

    milesif

      Hi everybody,

      I need to generate a completely dynamic gui. I want to layout my fields in a variable set of tabs (for that I tried to combine dojo and facelets).
      In each tab I layout my fields using a richdataTable (I tried also a ui:repeat)

       <div id="mainTabContainer" dojoType="dijit.layout.TabContainer" style="width: 500px; height: 150px">
       <ui:repeat value="#{form.tabs}" var="tab">
       <div id="#{tab.name}" dojoType="dijit.layout.ContentPane" title="#{tab.title}">
       <a4j:outputPanel id="op_#{tab.name}">
       <a4j:form>
       <rich:dataTable value="#{tab.fields}" var="field">
       <rich:column>
       <h:outputLabel value="#{field.title}" for="#{field.name}"></h:outputLabel>
       <h:inputText id="otto" value="#{model.fieldsMap[field.name]}" />
       </rich:column>
       </rich:dataTable>
       <a4j:commandButton action="#{model.doIt}" value="Do it!!!!!" />
       </a4j:form>
       </a4j:outputPanel>
       </div>
       </ui:repeat>
       </div>
      



      The problem is that when I submit the form the backing bean properties are not updated.

      What's the problem ? How can I generate a fully dynamic interface using rich faces, except from creating components from java code ?
      With dynamic I mean I have to determine at run time the number of tabs and the number and type of components (maybe sometimes I have 2 inputText, 3 selectOneMenu and one selectOneRadio and sometimes I have 4 selectOneMenu and 1 inputText and so on).


      Thanks in advance for your help.

      Ciao Francesco