• 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

Navigation to new JSP based on condition

 
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic