Win a copy of Spring Boot in Practice this week in the Spring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Liutauras Vilda
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Mikalai Zaikin
  • Himai Minh

jsf + richfaces modal panel problem

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
 
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
try to do the following



inside your rich:componentControl tag
 
Vladimir Nikolic
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
nope, now the panel is not showing
 
Sumeet Singh Aryan
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
use the following



inside h:commandLink

remove the rich:componentControl

this works fine in my case
 
Vladimir Nikolic
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
yeah it works, thank you very much
 
Sumeet Singh Aryan
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
see this is the power of team work

 
reply
    Bookmark Topic Watch Topic
  • New Topic