-
1. Re: reRender from modal panel
eklam May 21, 2008 10:49 AM (in response to lucab)Hi,
Got the same issue...
Any workaround?
Thanks -
2. Re: reRender from modal panel
kins57 May 21, 2008 12:59 PM (in response to lucab)Hi guys,
I got the same problem too and it's been several days that I'm desperatly looking for a solution.
Actually, I'm able to update the bean value but the page that is under the modal panel is not rerender.
My aim is simple, I would like to:
- open a modal panel displaying a list of values as links,
- choose a link, this close the modal panel and rerender a field of the page.
I would be very happy to have this working cause I defenitely needs this.
Thanks for your help. -
3. Re: reRender from modal panel
dxxvi May 21, 2008 3:51 PM (in response to lucab)Ever tried the_big_form:foo?
-
4. Re: reRender from modal panel
ilya_shaikovsky May 22, 2008 5:07 AM (in response to lucab)could you pelase check a4j:log in order to check client side reRendering problems? I've created similar test some time ago for another case.. and such reRendering was fine there.
-
5. Re: reRender from modal panel
jonckvanderkogel May 22, 2008 9:20 AM (in response to lucab)What is the correct way to reRender one or more components from a modal panel when the components to reRender do not belong to the modal panel (but live on the same page, just in another form)?
The trick is to wrap your modalPanel in an a4j:region with renderRegionOnly="false". Like this:<a4j:region renderRegionOnly="false"> <rich:modalPanel> ..... </rich:modalPanel> </a4j:region>
-
6. Re: reRender from modal panel
lucab May 26, 2008 10:38 AM (in response to lucab)documentation says renderRegionOnly=false is the default, so i tried to surround the modal panel with an ajax region as you suggested but reRender still is a dream. :(
-
7. Re: reRender from modal panel
eklam May 26, 2008 10:40 AM (in response to lucab)I have the same issue and the ajax region also didnt work
-
8. Re: reRender from modal panel
lmk May 26, 2008 12:52 PM (in response to lucab)how do you include modalPanel on jsf page..?
you have just to include modalPanel outside the page form.it works fine for both RF 3.1 and 3.2 . -
9. Re: reRender from modal panel
eklam May 26, 2008 1:00 PM (in response to lucab)My modalPanel is within an a4j:form, otherwise modalPanel is not rendered...
-
10. Re: reRender from modal panel
fabmars May 26, 2008 1:02 PM (in response to lucab)I see Serguy coming and telling you to read the notes on the ModalPanel dev guie :)
-
12. Re: reRender from modal panel
pinaev May 26, 2008 9:42 PM (in response to lucab)Has anyone figured it out?
I am having the exact same issue, though the modal panel of mine is not included within a form.
The outer form however is an "a4j:form" with the "ajaxSubmit" attribute set to "true".
Thoughts and suggestions would be mich appreciated! -
13. Re: reRender from modal panel
kins57 May 27, 2008 3:24 AM (in response to lucab)Hi guys,
I found a solution for my problem, but as usual, it pointed out other problems with dataScroller, it is never the end...
Anyway, this works for a simple use.
To reRender a field in the main page, from a Modal Panel, just use the a4j:actionParameter tag. It allows to set a bean field value using ajax.
in the main page I would have :... <h:outputText value="#{myBean.myFieldToUpdate}" /> ... <rich:modalPanel ...> <h:commandLink value="someValue" > <a4j:actionparam name="paramName" value="myNewValue" assignTo="#{myBean.myFieldToUpdate}"/> </h:commandLink> </rich:modalPanel>
This will update the bean field value without refreshing the whole page, just by rerendering the <h:outputText /> tag.
The <a4j:actionParam> tag is very useful as you don't have to write any code in your bean to update the field.
Hope it will help somebody.
You can find examples in the RichFaces Live Demo, it's the first example: "Action Parameter".
The problem now is that it is not working correctly with dataScroller. All the links that are in the first page of the dataScroller update the field, but when I go to the second page, the links are not working anymore and nothing happens...
Anyway thanks for your help. -
14. Re: reRender from modal panel
lucab May 27, 2008 5:17 AM (in response to lucab)"lmk" wrote:
i include my modal panel this way
how do you include modalPanel on jsf page..?
you have just to include modalPanel outside the page form.it works fine for both RF 3.1 and 3.2 .<a4j:include id="bp_cnt-panel" viewId="modals/contactlist.xhtml" />
which points to<rich:modalPanel id="addAddressPanel" autosized="true" minWidth="600"> <f:facet name="header"> <h:panelGroup> <h:outputFormat value="#{msg.addAddress}" /> </h:panelGroup> </f:facet> <f:facet name="controls"> <h:panelGroup> <a4j:commandLink reRender="_address_tab" onclick="Richfaces.hideModalPanel('addAddressPanel');"> <h:graphicImage value="/resources/images/Close.png" style="width:16px; height:16px; cursor:pointer" id="hidelink3" /> </a4j:commandLink> </h:panelGroup> </f:facet> <h:form id="addaddress-form"> <a4j:include id="addaddress-view" viewId="#{addressNavigation.viewId}"/> </h:form> </rich:modalPanel>
modal panel is surrounded with an f:subview, is that a problem??
@kins57:
I can't adopt your solution beacause i have to reRender a table with a datascroller. So if you say your solutions cause confilcts for my particular case that is not a solution at all.
@febmars:
I don't think sergey will complain about this topic. i'm doing things correctly as explained in the documents.
regards