1 Reply Latest reply on Jan 10, 2010 12:10 PM by kukeltje

    How to start a task from UI?

      Hi everyone,

       

      I've decided that I need every time when user see the Examine (task.jsf) form, if the task that user is wanting to see isn't started, the task should be started. If it is suspended, the task should be active. So, I've done a little modification at task.xhtml form. Wich is:

       

      <ga:responseActions>
                      <ga:parameter name="id" target="#{id}"/>
                      <j4j:loadTask id="#{id}" target="#{task}"/>
                     
                      <c:if test="#{task.start == null}">
                         
                         <j4j:startTask task="#{task}"/>
                          <n:nav outcome="success" redirect="true" storeMessages="true"/>
                          <n:nav outcome="error" redirect="true" storeMessages="true"/>
                      </c:if>

       

      But, when the condition of c:if is running, there's no task at all. It always run the if statement and executes the statement.

       

      I know that the ga:responseActions is a component that execute commands when the response is being made.

       

      What I need to do? Can somebody help me? Where can I get the actual task?

       

      Thanks!

        • 1. Re: How to start a task from UI?
          kukeltje

          Well, if you got this far, you are probably the most experienced guy in the world besides the original author.

           

          Personally, I'd change the server side bean to handle this case, but that requires changing java source of the console.