File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSF and the fly likes jsf + richfaces modal panel problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "jsf + richfaces modal panel problem" Watch "jsf + richfaces modal panel problem" New topic
Author

jsf + richfaces modal panel problem

Vladimir Nikolic
Greenhorn

Joined: Nov 10, 2010
Posts: 8
This is my code:



My idea is that i have a link in one column, when i click on it, it opens up a model panel. What i want is for that panel to be populated with data, so i need to call method from backing bean (#{kurseviZaAkademijuController.ucitajKurs}). The problem is that a modal panel is opened before the method is called (and after the method is called there is a refresh). Is there any way to achieve what i want?
Sumeet Singh Aryan
Ranch Hand

Joined: Jul 30, 2008
Posts: 43
try to do the following



inside your rich:componentControl tag


The woods are lovely, dark and deep, But I have promises to keep; And miles to go before I sleep, And miles to go before I sleep. - Robert Frost
Vladimir Nikolic
Greenhorn

Joined: Nov 10, 2010
Posts: 8
nope, now the panel is not showing
Sumeet Singh Aryan
Ranch Hand

Joined: Jul 30, 2008
Posts: 43
use the following



inside h:commandLink

remove the rich:componentControl

this works fine in my case
Vladimir Nikolic
Greenhorn

Joined: Nov 10, 2010
Posts: 8
eclipse says there is no oncomplete atribute for h:commandLink, i still tried it and it doesn't work (still no panel opening, i looked at the source, there is no code for show). I'm using jsf 1.2 maybe that is a problem?
Sumeet Singh Aryan
Ranch Hand

Joined: Jul 30, 2008
Posts: 43
I am using Eclipse Ganymede and JSF 2.0 and richfaces 3.3.3 CR1

Please move on JSF 2.0, many bugs have been fixed and many new features has been introduced.

All the best
Vladimir Nikolic
Greenhorn

Joined: Nov 10, 2010
Posts: 8
oh it should be a4j:commandLink , now everything is in order, now the problem is there is still no data in panel (when the page is rendered there is no data in backing bean) so i need to refresh the panel (just panel). There is onshow, but i don't now what to put in there
Sumeet Singh Aryan
Ranch Hand

Joined: Jul 30, 2008
Posts: 43
yes your are right.. it is a4j:commandLink

use rerender property of a4j:commandLink also to rerender the form inside the modal panel. This is mandatory case. If you need clarification for this, feel free to ask
Vladimir Nikolic
Greenhorn

Joined: Nov 10, 2010
Posts: 8
yeah it works, thank you very much
Sumeet Singh Aryan
Ranch Hand

Joined: Jul 30, 2008
Posts: 43
see this is the power of team work

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: jsf + richfaces modal panel problem