0

I have an Application built it JSF2.0 with Primefaces3.5.This application was built from Scratch based on the leagacy application which was built on ASP.There is a screen named "XX" in the ASP application and the same screen is available in my JSF Application.

My Problem is

  1. How to redirect the screen to "http://url.redirect.com:8956/XX/faces/datat.faces" which is in my JSF application from the ASP Application?
  2. How to get the parameter from the URL that I am passing form the ASP code in JSF?
  3. The parameters which I am passing in the URL I need to assign them inside the data.faces and load the results for the parameters in the screen when the screen gets loaded.

    Example : Say, If I have 100 textfield in the "data.faces" and those text field will show their values retrieved from DB only when I pass the above mentioned 3 parameters [which was passed from ASP to My JSF Application] and click the search button inside the same "data.faces" form.The click of search button should happen in page loading like directly calling the on load method and I should not click manually to get the results for 100 textfields.

How can I achieve the above functionalities ? I am parallely searching for the results for my question and I really appreciate if anybody could help me out.

Question simplified:

From ASP > Redirecting to > JSF URL > Passing three parameters from ASP to JSF in the URL >load the results in the JSF page that gets loaded on loading once the URL is launched.

BalusC
  • 992,635
  • 352
  • 3,478
  • 3,452
techy360
  • 351
  • 3
  • 7
  • 26

1 Answers1

0

JSF 2 gives you a possibility to read URL GET parameters.

You can shift your params via

http://url.redirect.com:8956/XX/faces/datat.faces?p1=v1&p2=v2&v3=p3

into the JSF, and from there via

<f:metadata>
    <f:param name="p1" value="#{bean.p1}" />
    <f:param name="p2" value="#{bean.p2}" />
    <f:param name="p3" value="#{bean.p3}" />
</f:metadata>

into your managed bean, where getter/setter for the Strings-Variables p1, p2, p3 should be provided. (see the helpful answer "Process GET parameters" for further details)

Regarding the ASP-to-JSF question, I would recommend you to open a new question with only that one point as content. Multiple tasks in one question, especially when with multiple technologies (like ASP and JSF), might scare possible helpers and prevent them from answering partially. :-)

Community
  • 1
  • 1
L-Ray
  • 1,629
  • 1
  • 15
  • 26
  • Thats really helpful.I will raise different questions for the same. – techy360 Jan 09 '14 at 10:54
  • Well, for the JSF-parameter handover the upper solution should work. So just a ASP.net question, I guess. Would be great if you could mark the answer as correct if it works out for you - this gives me some features and other people might find the solution better, too. All of all - good luck and good efforts! :-) – L-Ray Jan 09 '14 at 11:08