Rahul,

What am I doing wrong?

When the next button is clicked my goal is to go from page1 to page2 if the
property Leased is checked on the page1, otherwise go to page2. Neither is 
happening!
When the cancel button is clicked, the transition to menu works as expected.

***
* Value of dialog.data fields
***
  licenseTag = 'test'
  leased = Boolean.TRUE

***
* Dialog configuration for the stat Page 1
***
  <state id="page1">
    <onentry>
      <shale:view viewId="vehicle/addPage1" />
    </onentry>

    <transition cond="${dialogData.licenseTag eq 'test'}"
      target="page2" />
    <transition cond="${dialog.data.licenseTag eq 'test'}"
      target="page2" />
    <transition cond="${dialog.data.lease}"
      target="page2" />
    <transition event="faces.outcome" cond="${outcome eq 'next'}">
      <if cond="${dialog.data.leased eq 'true'}">
        <target next="page2" />
        <else>
          <target next="review" />
        </else>
      </if>
    </transition>

    <transition target="menu" event="faces.outcome"
      cond="${outcome eq 'cancel'}" />
  </state>


***
* Logging
***
outcome = next
_eventdata = null
_eventdatamap = {faces.outcome=null}
_ALL_NAMESPACES = {shale=http://shale.apache.org/dialog-scxml, 
=http://www.w3.org/2005/07/scxml}
${outcome eq 'next'} = true
_ALL_NAMESPACES = null
_ALL_NAMESPACES = {shale=http://shale.apache.org/dialog-scxml, 
=http://www.w3.org/2005/07/scxml}
${outcome eq 'cancel'} = false
_ALL_NAMESPACES = null
_ALL_NAMESPACES = {shale=http://shale.apache.org/dialog-scxml, 
=http://www.w3.org/2005/07/scxml}
${dialogData.licenseTag eq 'test'} = false
_ALL_NAMESPACES = null
_ALL_NAMESPACES = {shale=http://shale.apache.org/dialog-scxml, 
=http://www.w3.org/2005/07/scxml}
${dialog.data.licenseTag eq 'test'} = false
_ALL_NAMESPACES = null
_ALL_NAMESPACES = {shale=http://shale.apache.org/dialog-scxml, 
=http://www.w3.org/2005/07/scxml}
${dialog.data.lease} = false
_ALL_NAMESPACES = null
_ALL_NAMESPACES = {shale=http://shale.apache.org/dialog-scxml, 
=http://www.w3.org/2005/07/scxml}
${dialog.data.leased eq 'true'} = false
_ALL_NAMESPACES = null
_eventdata = null
_eventdatamap = null
Current States: [page1]

Paul Spencer

Rahul Akolkar wrote:
On 1/30/07, Paul Spencer <[EMAIL PROTECTED]> wrote:
Version 1.1.0-SNAPSHOT

I would like a transition to be selected when a bean's field is not empty. If the field is an empty string, "", or null I do not want the transition executed. Below is
the syntax in JSF EL.
   #{not empty dialogData.companyId}

What is the equivalent in SCXML?

   <transition ... cond=" ? "/>

<snip/>

${not empty dialogData.companyId}

The SCXML implementation often doesn't have the liberty of knowing
anything about the expression based on the location of the expression
within the document (though cond attribute values are expected to
evaluate to booleans, in this particular case).

The evaluator Javadoc is here [1], and lists some relevant details.

-Rahul

[1] http://shale.apache.org/shale-dialog-scxml/apidocs/org/apache/shale/dialog/scxml/ShaleDialogELEvaluator.html


Paul Spencer



Reply via email to