• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

value in render is not taking its form on an Ajax refresh

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello!!

I have the below code

<a4j:jsFunction name="selectGroupForManagingCtns"
action="#{ctnGrpMgmtController.loadCTNsForAGroup}"
render="ctnListPanel,ctnTable">
<a4j:param name="name" assignTo="#{ctnGrpMgmtController.groupId}" /> </a4j:jsFunction>
</a4j:jsFunction>


After loadCTNsForAGroup is executed in the backing bean, the required components are not rendered after an ajax refresh. Have to make an F5 to view them.

Please help.
 
Saloon Keeper
Posts: 27762
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you're using RichFaces version 3, the attribute you specify on the jsFunction is named "reRender", not "render". Mis-coding it will cause the attribute to be silently ignored.

Also, backing beans are not Controllers. They are Models. Controllers are logic that synchronize the View against the Model and vice versa. JSF action methods and listeners don't do that. They provide business logic and are, strictly speaking, outside of the MVC domain entirely. The actual View synchronization that reflects Model value changes is done by the JSF framework. In the case of AJAX, that includes a little prompting courtesy of the reRender attribute.
 
Lakshmi Karancheti
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
what is use is RichFaces4, in which rerender is deprecated
 
Tim Holloway
Saloon Keeper
Posts: 27762
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Lakshmi Karancheti wrote:what is use is RichFaces4, in which rerender is deprecated



Hence my qualification for RichFaces 3.

The Richfaces 4 docs are horrible and often obscured by the RichFaces 3 docs, but I dug around just to confirm the finer points of this tag. Digressing for a moment to pedantry (again), "reRender" isn't merely "deprecated" in RF4, it's entirely replaced.

In Java terms, "deprecated" means that you'll get warnings, but the deprecated function will still work, providing a smoother migration path and reducing the likelihood that an emergency "1-line fix" won't require a major rewrite on a critical production system in a panic. The lack of true deprecation in RF 4 is what's keeping some major projects of mine mired in RF3, since the last time I saw breakage of this magnitude was when VB6 turned into VB.Net.

Everything in your example looks fine to me. I would confirm (via breakpoint) that the action method is, in fact, being invoked, and I'd use a web traffic tracer (such as FireBug) to see what's coming back from it. It's also possible that if you are incorporating jQuery into your Views that whichever version you are invoking is conflicting with the jQuery version that RichFaces itself yanks in.
 
Rancher
Posts: 989
9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Also check the id's of the components in the page source. You may need to reference them via formName:componentId depending on your component hierarchies.
 
Lakshmi Karancheti
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Tim Holloway wrote:

Lakshmi Karancheti wrote:what is use is RichFaces4, in which rerender is deprecated



Hence my qualification for RichFaces 3.

The Richfaces 4 docs are horrible and often obscured by the RichFaces 3 docs, but I dug around just to confirm the finer points of this tag. Digressing for a moment to pedantry (again), "reRender" isn't merely "deprecated" in RF4, it's entirely replaced.

In Java terms, "deprecated" means that you'll get warnings, but the deprecated function will still work, providing a smoother migration path and reducing the likelihood that an emergency "1-line fix" won't require a major rewrite on a critical production system in a panic. The lack of true deprecation in RF 4 is what's keeping some major projects of mine mired in RF3, since the last time I saw breakage of this magnitude was when VB6 turned into VB.Net.

Everything in your example looks fine to me. I would confirm (via breakpoint) that the action method is, in fact, being invoked, and I'd use a web traffic tracer (such as FireBug) to see what's coming back from it. It's also possible that if you are incorporating jQuery into your Views that whichever version you are invoking is conflicting with the jQuery version that RichFaces itself yanks in.











Hi Tim,

Thanks for correcting me.

I have been tracking the action method through logs, and yes it is returning the list, it has to.

Am using JavaScript here.

Thanks,
Lakshmi.
 
reply
    Bookmark Topic Watch Topic
  • New Topic