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

    generating gui on-the-fly

    francesco milesi Newbie

      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}">
       <rich:dataTable value="#{tab.fields}" var="field">
       <h:outputLabel value="#{field.title}" for="#{field.name}"></h:outputLabel>
       <h:inputText id="otto" value="#{model.fieldsMap[field.name]}" />
       <a4j:commandButton action="#{model.doIt}" value="Do it!!!!!" />

      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