Marco,  the tabbed pane operates in two modes: client-side tab
switching and server-side tab switching.

My understanding is that when you're using client-side tab switching,
since there's now call-back to the server, all tabs are rendered, but
only one is made visible via javascript trickery.   That means that
all tabs must validate.

If you switch to server-side tab switching, then only the current tab
panel is rendered and displayed.   The others won't need to be
validated.

---------------------------

Well, now that I've written all that out, I see that it isn't directly
relevent to your question.  It's good stuff, though, so I'll leave it
in.
:-)

Your problem is that you're using an action from an "immediate"
component to try to update backing beans.   Your use of immediate will
short-circuit the JSF lifecycle, and your input components will not be
converted or validated, nor will they update their backing beans.  
Since they won't be validated, then they also will not be reading a
new value from their backing beans when they are re-rendered.  They'll
continue to use and display the submitted value that they had when the
page was submitted.

You'll either need to update (or nullify) the submitted value on the
components you want to be updated (as well as the backing bean -- and
you better do the same thing to the local component value as well just
to be safe), or you need to stop using the immediate button.

Ie,

inputText.setSubmittedValue(newValue);
inputText.setLocalValue(newValue);
backingBean.setValue(newValue);

and repeat for your selectOneMenu.

On 12/15/05, Marco Nady <[EMAIL PROTECTED]> wrote:
>
>
> Hi all;
>
> I have a panelTabbedPane containing two tabs "tab1" and "tab2".
>
> In tab1 i have a required inputText and a commandButton.
>
> In tab2 i have a selectOneMenu, commandButton and an inputText.
>
> Tips:
>
> 1) The immediate attribute of the commandButton in the tab2 is true.
>
> 2) The value of the inputText in the tab2 is binded to a property in a 
> managed bean.
>
> In tab2 the target is when i press on the commandButton the property in the 
> managed bean will be fil  led from  DB upon the selection of the 
> selectOneMenu and the inputText will automatically displays the property 
> value.
>
> The problem is that never happens unless i filled the required fields in 
> "tab1" and pressed submit.
>
> Can anyone plz help ?
>
>
> Thanks a lot
>
>
>
>
>
>                       ________________________________
Yahoo! Shopping
>   Find Great Deals on Holiday Gifts at Yahoo! Shopping
>
>

Reply via email to