This content has been marked as final.
Show 2 replies
-
1. Re: multiple rich:hotKey inside rich:tab's
ahoehma Nov 12, 2009 9:34 AM (in response to ahoehma)Its works if I change the keyhandler this way:
<rich:tabPanel switchType="ajax"> <rich:tab label="Tab 1"> <a4j:form id="tabForm1"> ... <a4j:commandButton id="save".../> <rich:hotKey key="return" handler="alert('tab 1 '+ ${rich:element('tabForm1:save')});return false;"/> </a4j:form> </rich:tab> <rich:tab label="Tab 2"> <a4j:form id="tabForm2"> ... <a4j:commandButton id="save".../> <rich:hotKey key="return" handler="alert('tab 2 '+ ${rich:element('tabForm2:save')});return false;"/> </a4j:form> </rich:tab> <rich:tab label="Tab 3"> <a4j:form id="tabForm3"> ... <a4j:commandButton id="save".../> <rich:hotKey key="return" handler="alert('tab 3 '+ ${rich:element('tabForm3:save')});return false;"/> </a4j:form> </rich:tab> </rich:tabPanel>
Should i create a bug report ? -
2. Re: multiple rich:hotKey inside rich:tab's
ilya_shaikovsky Nov 16, 2009 7:30 AM (in response to ahoehma)rich:element looks for "save" component in component tree and as your "save" buttons has all the same id's - it finds the first one always. but for sure it's wrong fir all the other ones. actually we could not know which concrete component you are interested in. So just gave them different id's or use full id's as you done in second snippet.