• Post Reply Bookmark Topic Watch Topic
  • New Topic

Managed Bean not loaded

 
Shriram Gopalakrishnan
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My Application starts with a HomepagelinkServlet which renders the home page and all the links corresponding to each module. In one such link I have used the <h:commandLink> which would call a method in the action and render JSP, But when the JSP is loaded to has reference to managed-beans given the config files. For some reason when I click this link from home page it does not work but when I move to some other link and come back to this it would work fine.

The bottom line is that my managed bean does not get loaded during startup. Is there anything which is missing.
 
Krishna Srinivasan
Ranch Hand
Posts: 1879
Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What you mean by Managed bean not loaded? Are you getting any exception in the server start up? If you use the command link inside datatable there is some problem in JSF. Can you post the code you have written?
 
Shriram Gopalakrishnan
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for reply. No! I am not getting any exception.


This is the command link which I have created to access an method in action class. The action method is called properly and returns the outcome message which also starts rendering findReplace.jsp as given above. But the problem is findReplace.jsp refers to managed bean FinderBean which does not come from the same config.


<h:commandLink action="#{findReplaceAction.findAndReplace}" value="Find & Replace"> </h:commandLink>

Method in FindReplaceAction Class:

public String findAndReplace(){
return "findReplace";
}
Navigation Rule:

<navigation-rule>
<from-view-id>*</from-view-id>
<navigation-case>
<from-action>#{findReplaceAction.findAndReplace}</from-action>
<from-outcome>findReplace</from-outcome>
<to-view-id>/findReplace.jsp</to-view-id>
<redirect/>
</navigation-case>
</navigation-rule>
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!