Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 408981
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T17:44:42+00:00 2026-05-12T17:44:42+00:00

As I debug my seam application, it dawns on me that I don’t really

  • 0

As I debug my seam application, it dawns on me that I don’t really understand how parameter passing works. The following terminology really has me confused. So I am asking this very general question in the hopes of getting a good explanation of what works with what and what certain things are for.

First of all, to get from one page to the next you can use h:commandButton or s:button. I understand that s:button does not submit a form, but that doesn’t help me understand the difference. If you are not submitting a form by going from one page to the next, then what are you doing?

My app involves entering information in a form, hitting a button and then going to a new page that displays results after running a query. It seems I have seen this activity take place with s:button, so how is that if it’s not “submitting a form”? I feel I’m missing something fundamental here.

As for the parameters themselves…from what I have seen you can pass parameters using one of 3 methods:

  1. f:param. This seems to occur more often in combo with s:button than h:commandbutton. Why is that?
  2. Also, you can “pass” (or something) parameters using your page.xml file. The parameter seems to have to appear in both the source page.xml and the target page.xml to make it show up in the URL.
  3. Last of all, there is the option of adding @RequestParameter annotation to your backing bean. I gather that is also used when you set f:param in your view. Does that mean the one in page.xml gets overlooked? I notice in the registration example of the seam distribution, the user bean gets populated without any parameters being passed via page.xml for f:param. How is that possible?

I’m sure this question reveals a great deal of ignorance.

Hopefully one of you eloquent people will “get” what I’m asking and give me an explanation of this process.

Thanks in advance.

TDR

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T17:44:42+00:00Added an answer on May 12, 2026 at 5:44 pm

    If you are not submitting a form by
    going from one page to the next, then
    what are you doing?

    Navigating to another page without submitting any form fields.

    My app involves entering information
    in a form, hitting a button and then
    going to a new page that displays
    results after running a query. It
    seems I have seen this activity take
    place with s:button

    s:button won’t submit the form, so the values on your page will not be applied to the model. You must use a commandButton/Link for this. The activity you may have seen is passing an already populated value to another page.

    f:param

    Used more often with s:button/link as these are often used for navigation. You can use f:param to pass an already populated value across to another page. h:commandButton/Link is used for submitting forms so the values are in form fields. Of course there is nothing stopping you from using f:param for this to.

    page.xml

    the params used here are for applying request parameters to the model and vice versa.

    @RequestParameter

    Can be used in conjunction with all of the above but is a little pointless when used with page.xml params as they can be used to do the same job

    Example

    If you start with this page:

    http://mydomain.com/myapp/home.seam?name=damo
    

    And the home.page.xml has:

    <param name="name" value="#{person.name}"/>
    

    Then when the page is loaded person.setName("damo") will be called as there is a matching request parameter in the URL.

    You can store the value of the param in the link to the next page:

    <s:link value="Go to Page 2" view="/page2.xhtml">
      <f:param name="name" value="#{person.name}"/>
    </s:link>
    

    When you click the link and navigate to http://mydomain.com/myapp/page2.seam
    And the page2.page.xml has:

    <param name="name" value="#{someOtherBean.name}"/>
    

    Then someOtherBean.setName("damo") will be called.

    Page2 may have a s:button like this:

    <s:button value="Say Hello" action="#{someOtherBean.sayHello}">
      <f:param name="subject" value="#{someOtherBean.name}"/>
    </s:button>
    

    And the method could be:

    @Name("someOtherBean")
    public class SomeOtherBean {
    
      @RequestParameter("subject")  //same value as the 'name' in f:param
      private String subject;
    
      public void sayHello() {
        System.out.println("Hello "+subject);
      }
    }
    

    Hope this helps!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been mocking out some seam components using the following signature: @Name(myService) @Install(debug
When i debug my application, it gives an error that SelectCommand.Connection Property is not
I have the following problem. I have a Seam web application which features e-mail
SKIP TO UPDATE 3 I want to enable the Seam debug page on Weblogic
The debug build of some code utilizing SFHFKeychainUtils that is working without complaint on
I'm trying to create a composite component for use in my Seam application, and
I debug my Silverlight application and when I put breakpoint in push button even,
Debug breakpoint's works fine in all other 38 units of my system. But, in
During debug process, I noticed that script dies on $stmt->fetch() or die($stmt->error); line. There
I'm trying to debug an Outlook 2007 VBA script that's fired by a rule.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.