14 Replies Latest reply on Jun 19, 2007 11:36 AM by Prem Kosta

    s:button and data store

    Prem Kosta Newbie

      Hey,

      with the tag <s:button i can´t store my data in the database. Please i need a help as soon as possible!

      By the way: s:commandbutton displays the follow mistake message:

      <s:commandButton> Tag Library supports namespace: http://jboss.com/products/seam/taglib, but no tag was defined for name: commandButton

      (I 'm using Ajax)

      greetings

        • 1. Re: s:button and data store
          Pete Muir Master

           

          "Premheiko" wrote:
          with the tag <s:button i can´t store my data in the database. Please i need a help as soon as possible!


          http://wiki.jboss.org/wiki/Wiki.jsp?page=SeamProblemsFAQ

          By the way: s:commandbutton displays the follow mistake message:


          There is no tag s:commandButton

          • 2. Re: s:button and data store
            Prem Kosta Newbie

            thanks for the answer but:

            when i write:

            <h:commandButton...
            <f:param name="taskID" value="#{task.id}"/>
            </h:commandButton>

            i get this error:

            09:41:02,386 ERROR [DebugPageHandler] redirecting to debug page
            java.lang.IllegalStateException: no value for request parameter: taskId

            • 3. Re: s:button and data store
              Prem Kosta Newbie

              if i don´t give taskId in <h:commandButton...>
              and define this metode



              @EndTask(transition="update")
              public String update() {
              ...
              return..;
              }

              it comes back no anwser and no error.

              • 4. Re: s:button and data store
                Prem Kosta Newbie

                second variant:

                if i don´t give taskId in <h:commandButton...>
                and define this metode



                @EndTask(transition="update")
                public String update() {
                ...
                return..;
                }

                it comes back no anwser and no error.

                • 5. Re: s:button and data store
                  Prem Kosta Newbie


                  hi guys, any ideas !!

                  • 6. Re: s:button and data store
                    Pete Muir Master

                    What are you actually trying to do - you need to actually tell us in a bit more detail! Post code!

                    • 7. Re: s:button and data store
                      Christian Bauer Master

                      And please don't post every hour!

                      • 8. Re: s:button and data store
                        Prem Kosta Newbie

                        Here is the code :


                        mitarbeiter.xhtml:

                        <div class="scrollTableContainer_1000">
                         <h4>JBPM-Workflow-2</h4>
                         <t:dataTable id="postkorbTable-workflow-2" width="1000" cellpadding="0"
                         cellspacing="0"
                         columnClasses="column1,column2,column3,column4,column5,column6,column7,column8,column9,column10"
                         rowClasses="oddRow,evenRow" styleClass="sortable"
                         headerClass="iceTblHeader"
                         rowOnMouseOver="highlightRowOver(this);"
                         rowOnMouseOut="highlightRowOut(this);"
                         value="#{pooledTaskInstanceList}" var="task" rendered="#{not empty pooledTaskInstanceList}"
                         rowIndexVar="rowNumber">
                        
                         <h:column >
                         <f:facet name="header">
                         <h:outputText value="." styleClass="HIDE_TEXT"></h:outputText>
                         </f:facet>
                         <s:link styleClass="editIcon" style="font-weight:bold;text-decoration: underline;" taskInstance="#{task}" value="" action="#{mitarbeiterAction.erfassungEdit}" rendered="#{task.contextInstance.variables['activTab']==laufzettelBean.prozessTab}">
                        
                         <f:param name="laufzettelId" value="#{task.contextInstance.variables['laufzettelEntity'].id}"/>
                         <f:param name="taskId" value="#{task.id}"/>
                        
                         </s:link>
                         </h:column>
                        
                        
                         <h:column >
                         <f:facet name="header">
                         <h:outputText id="datum"
                         value="#{bundle.datum}" />
                         </f:facet>
                         <h:outputText value="#{task.contextInstance.variables['laufzettelEntity'].lastChanged}" rendered="#{task.contextInstance.variables['activTab']==laufzettelBean.prozessTab}">
                         <s:convertDateTime type="both" pattern="dd.MM.yyyy hh:mm" />
                         </h:outputText>
                        
                         </h:column>
                        .
                        .
                        .
                        </h:column>
                        
                        



                        MitarbeiterAction.java
                        
                        @Scope(SESSION)
                        @Name("mitarbeiterAction")
                        
                        public class MitarbeiterAction {
                        
                        
                        
                        
                         @In(create=true)
                         EntityManager em;
                        
                        
                        
                         @In(required=false)
                         LaufzettelEntity laufzettelEntity;
                        
                        
                         @Out(scope = ScopeType.CONVERSATION,required=false)
                         String activTab;
                        
                         @In(required=false)
                         Integer laufzettelEntityId;
                        
                         @In(create=true)
                         LaufzettelBean laufzettelBean;
                        
                         @In(create=true,required = false)
                         ProcessInstance processInstance;
                        
                        
                        
                         //@RequestParameter("aufzettelTaskId")
                         private String taskID;
                        
                         //Liste von LaufzettelEntiyten:
                         // private List<WorkOnLaufzettel> workOnLaufzettelList = new ArrayList<WorkOnLaufzettel>();
                         // private List<ProcessInstance> processInstanceListe = new ArrayList<ProcessInstance>();
                        
                        
                        
                        
                        
                         @BeginTask
                         public String erfassungEdit() {
                        
                         String rueckSeite=laufzettelBean.jBPMPostkorbProcessEdit();
                        
                         //Für Mitarbeiter und SuperVisorbereich
                         initlaufzettelEntity(laufzettelBean.getWorkOnLaufzettel().getLaufzettelEntity(),ABSConstants.PROZESS_P1,ABSConstants.STATUS_IN_ARBEIT,"",ABSConstants.TAB_ACTIVE_P1UndP2);
                        
                         return rueckSeite;
                        
                         }
                        
                        
                         @EndTask(transition="start")
                         public String start() {
                         laufzettelBean.jBPMErfassungStart();
                        
                         //Für Mitarbeiter und SuperVisorbereich
                         initlaufzettelEntity(ABSConstants.PROZESS_P1,ABSConstants.STATUS_IN_ARBEIT,"",ABSConstants.TAB_ACTIVE_P1UndP2);
                        
                        
                         //Für Sichersteller ,Rücknehmer und Platzlogistiker-Bereich
                         initProviderStatus();
                        
                         return "postkorb";
                        
                         }
                        
                        
                         @EndTask(transition="speichern")
                         public String speichern() {
                         initlaufzettelEntity(ABSConstants.PROZESS_P0,ABSConstants.STATUS_IN_ARBEIT,"",ABSConstants.TAB_ACTIVE_P0);
                         return "postkorb";
                        
                         }
                        
                        
                        
                         @EndTask(transition="abbrechen")
                         public String abbrechen() {
                         initlaufzettelEntity(ABSConstants.PROZESS_P0,ABSConstants.STATUS_OFFEN,"",ABSConstants.TAB_ACTIVE_P0);
                         return laufzettelBean.jBPMErfassungAbbrechen();
                        
                         }
                        .....
                        


                        Bearbeitung.xhtml
                        
                        <div style="width: 1000px;" id="yContentBox3">
                         <span class="ct">
                         <span class="cl" />
                         </span>
                         <div>
                        
                        
                         <table>
                         <tr>
                         <td>
                         <h:commandButton value="#{bundle.speichern}" action="#{laufzettelBean.jBPMErfassungSpeichern}" >
                        
                         </h:commandButton>
                        
                         </td>
                         <td>
                         <h:commandButton value="Upload Dialog" action="#{laufzettelBean.erfassungShowUpload}"/>
                         </td>
                         <td>
                         <h:commandButton value="#{bundle.abbrechen}" action="#{mitarbeiterAction.abbrechen}" />
                         </td>
                         <td>
                         <h:commandButton value="#{bundle.start}" action="#{mitarbeiterAction.start}" />
                         </td>
                         </tr>
                        
                         </table>
                        
                        
                        
                        
                        
                        
                        
                         </div>
                         <span class="cb">
                         <span class="cl" />
                         </span>
                         </div>
                        
                        



                        processDefinition.xml:
                        
                        <?xml version="1.0" encoding="UTF-8"?>
                        
                        <process-definition
                         xmlns="urn:jbpm.org:jpdl-3.1" name="RemaProzess">
                         <start-state name="Start">
                         <transition name="" to="erfassungEdit"></transition>
                         </start-state>
                         <task-node name="Postkorb" end-tasks="true">
                         <task name="erfassungEdit" description="Erfassung wird bearbeitet">
                         <assignment pooled-actors="#{myAssignment.pooledActorsMitarbeiterUndSuperVisor}"/></task>
                         <transition name="start" to="fork1"></transition>
                         <transition name="abbrechen" to="Postkorb"></transition>
                         <transition name="speichern" to="Postkorb"></transition>
                         </task-node>
                        .
                        .
                        .
                        </process-definition>
                        


                        • 9. Re: s:button and data store
                          Pete Muir Master

                          And what steps do you do create your problem?

                          • 10. Re: s:button and data store
                            Prem Kosta Newbie

                            So here :

                             <table>
                             <tr>
                             <td>
                             <h:commandButton value="#{bundle.speichern}" action="#{mitarbeiterAction.speichern}" />
                            
                             </td>
                             <td>
                             <h:commandButton value="Upload Dialog" action="#{laufzettelBean.erfassungShowUpload}"/>
                             </td>
                             <td>
                             <h:commandButton value="#{bundle.abbrechen}" action="#{mitarbeiterAction.abbrechen}" />
                             </td>
                             <td>
                             <h:commandButton value="#{bundle.start}" action="#{mitarbeiterAction.start}" />
                             </td>
                             </tr>
                            



                            if I click on the Button "speichern" ,it comes back no anwser and no error.

                            • 11. Re: s:button and data store
                              Prem Kosta Newbie

                              It doesn 't gointo the method speichern() !!

                              • 12. Re: s:button and data store
                                Prem Kosta Newbie

                                Hello together,

                                till yet i was waiting for your answers! Have no one of you seen such an error befor or is it a bug by jbpm seam??

                                I would be thankful for an helping answer

                                • 13. Re: s:button and data store
                                  Pete Muir Master

                                  h:commandButton needs to surrounded by a form

                                  • 14. Re: s:button and data store
                                    Prem Kosta Newbie


                                    when i use the tag <h:commandButton...>,will be come this error:


                                    15:25:06,963 ERROR [DebugPageHandler] redirecting to debug page
                                    java.lang.IllegalStateException: no value for request parameter: taskId



                                    and now ...