Ooh, my bad. Thanks, Guy. What I was thinking of is that whenever I use immediate=true, it is usually in conjunction with a ValueChangeListener in which I call facesContext.renderResponse() to skip directly to the render phase.
 
/dmc

 
On 7/6/06, Guy Coleman <[EMAIL PROTECTED]> wrote:
Setting immediate to true does not cause the UPDATE_MODEL phase (or any
other phase) to be skipped.

See http://wiki.apache.org/myfaces/How_The_Immediate_Attribute_Works

-Guy.

On 05/07/2006 14:03, David Chandler wrote:
> Rob,
>
> I think I can answer part of your question. The dropdown component that
> you're creating programatically retains its value on subsequent requests
> because all components retain their prior submitted values until the
> component values are cleared, which happens in the UPDATE_MODEL phase.
> It sounds like you may be using immediate=true, in which case JSF skips
> the UPDATE_MODEL phase. Another possibility is that your converter (or
> some other converter/validator on page) is generating an exception, in
> which case the UPDATE_MODEL phase will be skipped as with
> immediate=true. If you set your logs to TRACE level, you'll be able to
> see JSF skipping directly to RENDER_VIEW if that is in fact the case.
>
> /dmc
>
> On 7/3/06, *Rob99* <[EMAIL PROTECTED]
> <mailto: [EMAIL PROTECTED]>> wrote:
>
>
>     I'm adding an HtmlSelectOneMenu component programmatically like this
>
>        HtmlSelectOneMenu menu = new HtmlSelectOneMenu();
>        menu.setId("123");
>        menu.setValueBinding("value",
>     app.createValueBinding("#{MyBacking.x}"));
>        menu.setConverter(new IntegerConverter());
>
>     Backing bean MyBacking has a member called "x" of type String and a
>     corresponding getter/setter.
>
>            String x;
>
>            public String getX()
>            {
>                    logger.info("called getX");
>                    return x;
>            }
>
>            public void setX(String x)
>            {
>                    logger.info("called setX");
>                    this.x = x;
>            }
>
>     The getter gets called 1 time initially and JSF properly uses its
>     value to
>     select the corresponding element of the dropdown (say "second").  So
>     far so
>     good.  However the getter and setter never subsequently get called -
>     even
>     when the page is submitted.
>
>     If I select another value in the dropdown (say "third") and click on
>     some
>     other widgets which causes the page to redisplay, the new dropdown
>     value
>     stays selected (still "third").  So JSF must be setting the dropdown
>     component's value.  But since the backing bean's getter/setter is never
>     subsequently called, when I ask the bean for the value of "x", it
>     returns
>     the value initially set (which is "second").
>
>     What's going on?  There must be something basic going on here that I
>     don't
>     understand.  Of course it makes sense for the getter to be called
>     initailly
>     but why doesn't the getter or setter get called after that?  Any
>     help would
>     be greatly appreciated.
>     --
>     View this message in context:
>     http://www.nabble.com/Setter-not-called-for-value-binding-tf1887301.html#a5159953
>     Sent from the MyFaces - Users forum at Nabble.com <http://Nabble.com >.
>
>

Reply via email to