You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by "Conway. Fintan (IT Solutions)" <Fi...@esb.ie> on 2006/07/14 10:13:53 UTC
RE: Is serverSideTabSwitch="true" required when using validation with
?
Hi Paul,
I am not sure if this could work, it is just an idea. Could you put
some javascript into the button's onClick() method to set the
selectedIndex of the tabbedPane before it submits? This may give the
behaviour you are looking for?
HTH,
Fintan
-----Original Message-----
From: Paul Spencer [mailto:paulsp@apache.org]
Sent: 13 July 2006 21:21
To: MyFaces Discussion
Subject: Re: Is serverSideTabSwitch="true" required when using
validation with <t:panelTabbedPane>?
Mike,
Their is a selectedIndex attribute on <t:panelTabbedPane>. I would
contend that the selectIndex is not getting set/restored when
serverSiteTabSwitch="false". This show up when the validation phase
fails.
Or said another way:
MyFaces does not know which tab the clicked button was on and it
always display the tab
identified by selectIndex when serverSiteTabSwitch="false" when their
is a validation failure.
May I enter this as a bug, enhancement, or wish?
Paul Spencer
Mike Kienenberger wrote:
> On 7/13/06, Paul Spencer <pa...@apache.org> wrote:
>> 1) Why is the behavior different between client and sever side
>> switching?
>
> Because the server-side tab switching renders only the existing tab in
> the generated html. Client-side tab switching renders all of the tabs
> but only makes one visible in the browser.
>
>
>> 2) The "application" is just the included below surrounded by the
>> minimal set
>> of html, jsp, and jsf tags. Their are no backing beans involved.
>> In short
>> this is a mock-up.
>
> It's not so much your application code. It's your application
> behavior (ie, when I submit a form on tab X, I want tab X to be
> visible on the response if there's an error).
>
>> 3) How would I set the "panel tab index"?
>
> This is the part I don't have enough experience with to help you with.
> I vaguely recall that here's a selectedIndex attribute for tabbed
> panes.
>
* ** *** ** * ** *** ** * ** *** ** *
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed.
Any views or opinions presented are solely those of the author, and do not necessarily represent those of ESB.
If you have received this email in error please notify the sender.
Although ESB scans e-mail and attachments for viruses, it does not guarantee
that either are virus-free and accepts no liability for any damage sustained
as a result of viruses.
* ** *** ** * ** *** ** * ** *** ** *
Re: Is serverSideTabSwitch="true" required when using validation with ?
Posted by Mike Kienenberger <mk...@gmail.com>.
On 7/14/06, Conway. Fintan (IT Solutions) <Fi...@esb.ie> wrote:
> I am not sure if this could work, it is just an idea. Could you put
> some javascript into the button's onClick() method to set the
> selectedIndex of the tabbedPane before it submits? This may give the
> behaviour you are looking for?
Yes, his question is what such javascript would look like :)
I almost wonder if an actionListener might not be the way to go --
have the actionListener method set the selectedIndex. I just don't
remember if it'd happen late enough in the lifecycle to occur between
updateModel and renderResponse.