-
1. Re: commandButton and toggleControl
bostone May 13, 2008 4:16 PM (in response to bostone)OK. the following works, the only beef I have with it - it seem to render panel first, then goes to search and then repaints the table which looks pretty ugly
<rich:toggleControl for="searchTogglePanel" stateOrder="step2" > <a4j:commandButton value="Search" actionListener="${deviceMasterFormBean.search}" reRender="searchResultPanel" /> </rich:toggleControl>
-
2. Re: commandButton and toggleControl
ilya_shaikovsky May 14, 2008 3:56 AM (in response to bostone)why you need to use both controls. Yes it will be works as you see :)
Use just one toggle control. Your togglePanel should be in ajax mode. Specify actionListener and nothing to reRender on the control. This should just works as you need. -
3. Re: commandButton and toggleControl
bostone May 14, 2008 10:34 AM (in response to bostone)"ilya_shaikovsky" wrote:
Use just one toggle control. Your togglePanel should be in ajax mode. Specify actionListener and nothing to reRender on the control. This should just works as you need.
I understand that toggleControl will work by itself, but it renders a link and I need a button, anything I'm missing here? -
4. Re: commandButton and toggleControl
ilya_shaikovsky May 15, 2008 8:26 AM (in response to bostone)yes this is an issue. http://jira.jboss.com/jira/browse/RF-3428
but you should not place command control inside other command control in any way. In the result two requests will be sent so behaviour will not be right.
As workaround you may place hidden control on the page and just button element with type = button (in order not to perform submit) and click on the toggle control via JS. -
5. Re: commandButton and toggleControl
bostone May 15, 2008 8:50 AM (in response to bostone)Thanks Ilia. I would also point that you guys already have nested controls by allowing rich:componentControl to be wrapped by link or button tags. I was actually trying to use it to toggle a panel just couldn't figured out how
-
6. Re: commandButton and toggleControl
ilya_shaikovsky May 15, 2008 9:08 AM (in response to bostone)rich:component control - doesn't send any requests. It's just calls JS API on the target component. Unfortunatelly togglePanel miss this API for now. So try to use my workaround.