Results 1 to 4 of 4

Thread: Suppressing bind with jsf

  1. #1
    Join Date
    Mar 2009
    Posts
    10

    Default Suppressing bind with jsf

    Hi,
    I'm using webflow version 2.0.8 with faces.
    I'm not using client side validation.
    In my form I have a required field:
    <h:inputText label="foo" value="#{foo}" required="true">
    <f:validateLength maximum="100" />
    </h:inputText>

    I also have a cancel button:
    <h:commandButton action="cancel" value="cancel" />

    And a transition:
    <transition on="cancel" to="finish" bind="false"/>

    The thing is, I can't get the suppressing of bind to work here.
    If I switch my command button to the sf impl:
    <sf:commandButton action="cancel" value="cancel" />

    Then it works.
    So my question is:
    Do I have to use the "sf" tag library to make the suppressing of bind to work?

    regards.../Andreas

  2. #2
    Join Date
    Nov 2008
    Posts
    742

    Default

    Can you just use the immediate attribute to skip the binding and validation?

    Code:
    <h:commandButton action="cancel" value="cancel" immediate="true"/>
    When using SWF with JSF, I don't think the bind or validate attributes of your transition do anything. I think those are when you're dealing with Spring MVC and explicitly setting a model for the view-state.

  3. #3
    Join Date
    Mar 2009
    Posts
    10

    Default

    Hi, and thx.
    Yes, good idea.
    But it is bad news if the bind and validate functions is just for the mvc implementation.
    I was also planing to use the validate="false" on some other transitions that should go to subflows.
    I.e. if the user enters something in a textfield and then goes to a subflow. I would like to bind it but not validate it.

    Anyone else (Keith?) that knows for sure how it is with the bind/validate features on transitions for the jsf/faces dialect?

    .../Andreas

  4. #4
    Join Date
    Mar 2009
    Posts
    10

    Default

    And I'm not to sure you are right about that it is only for the mvc impl.
    I had a look at the booking-faces example, and there in the booking-flow on the cancel event, bind="false" is used.

    .../Andreas

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •