• Post Reply Bookmark Topic Watch Topic
  • New Topic

Navigation to new JSP based on condition

 
Pardha Reddy
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I have a issue in navigating to a new JSP based on condition.

Scenario:

1) I have a search Screen which display records based on search criteria.
2) After displaying the records, there is view / edit icon beside every record so user can see the detail page. Its working good when i click edit button.
3) Whenever the search results size is 1, it should display view / edit page directly instead of displaying search page with one record and click on edit icon.

Here i have a problem. I am briefing the code scenario.
public class Handler{
pubic String searchMethod throws ...{

collection = getSearchResults();
if(collection.size == 1)
{
return "#{handler.detailPage}";
}


return "#{handler.searchMethod}""

}
}
Whenever collection size is 1, it should suppose to go to detail Page. But still in search Page. I declare all the things in navigation case and rule attributes of faces-config
and verified.
One more thing is i am using Websphere portal server and these two JSP pages are not two different portlets.

Thanks in advance for any info / clue.

Thanks
Pardha
 
Pardha Reddy
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I found the mistake what I did

I use <from-action> instead of <from-outcome> in <navigation-case> of faces-config

Thanks
Pardha
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!