11 Replies Latest reply on Jan 21, 2007 6:28 AM by kukeltje

    Forms

    nib

      Hi

      is it possible to use checkboxes, comboboxes ... in TaskNodes. How can I do this?

      NiB

        • 1. Re: Forms
          webjavier

          Yes you can.
          You should use jbpm 3.2 for building forms with diferents controls and interact with your own DB.
          Use the file forms.xml and build the files xhtml for every form defined in your forms.xml.

          Sorry with mi english.

          ________
          Javier

          • 2. Re: Forms
            nib

            Hi I use h:selectManyCheckbox and it works the form is shown with the desired attributes. But when I choose to select a transition, I get the follwoing error.

            INFO: WARNING: FacesMessage(s) have been enqueued, but may not have been displayed.
            sourceId=j_id76:j_id85[severity=(ERROR 2), summary=(Convert-Error: Value '' for Model '#{var['chosenones']}'.), detail=(Convert-Error: Value '' for modell '#{var['chosenones']}' : Exception: {2}.)]


            • 3. Re: Forms
              kukeltje

              try turning on some debug to see why a conversion is tried and why it goes wrong

              • 4. Re: Forms
                nib

                How do I do this?
                It seems to be that the selected (integervalues) are not stored in the vairable because jsf don't know how to handle it. Should I initialize the variable "choseones" before?
                Using e.g. TextAreas is no problem.

                • 5. Re: Forms
                  nib

                  This is the part of the form:

                  <jbpm:datacell>
                  <f:facet name="header">
                  <h:outputText value="Choose:"/>
                  </f:facet>
                  <h:selectManyCheckbox layout="pageDirection" value="#{var['chosenones']}">
                  <f:selectItems value="#{var['theselection']}" />
                  </h:selectManyCheckbox>
                  </jbpm:datacell>


                  • 6. Re: Forms
                    kukeltje

                    Yep, if they are not initialized you can get these errors (afaik). Converters in the webpage could help, as is initializing them.
                    I have not tried/done this (yet) with the new webapp, but if you get this working it is a nice example for the wiki or even for in the examples within jBPM

                    Maybe you can file a jira issue that an example with this construct should be a nice addition to the existing examples.

                    • 7. Re: Forms
                      nib

                      Hmmm yes I will post it here. Initializing does not help. If I initialize it, the "chosen" checkboxes are selected, but I get the same error. It seems to be that jsf don't know how to convert "0 1 3" (I use integers for the values) to a jbpm variable (which is just java.lang.Object) .

                      • 8. Re: Forms
                        nib

                        Or can someone tell me how to disable conversion in jsf?

                        • 9. Re: Forms
                          kukeltje

                          I think the jbpm variable should be intialized as a List.

                          • 10. Re: Forms
                            nib

                            Tried everything as Array (then the desired checkboxes are "pre"-checked) and List, Collection ....
                            The problem occurs, when the checkbox-states are saved into the jbpm-variable. The jsf-engine doesn't know how to handle this.

                            • 11. Re: Forms
                              kukeltje

                              therefor my question on turning on debug for jsf and debug for jbpm (afaik, the jsf 1.2 RI uses jdk-logging, not commons-logging or log4j) so we can see what happens