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 8493179
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T22:56:04+00:00 2026-06-10T22:56:04+00:00

VIEW <h:form id=main_form> <p:inputText id=title required=true label=Title value=#{myBean.myLink.title} immediate=true /> <p:selectOneMenu id=scope required=true label=Scope

  • 0

VIEW

<h:form id="main_form">
    <p:inputText id="title" required="true" label="Title" value="#{myBean.myLink.title}" immediate="true" />

    <p:selectOneMenu id="scope" required="true" label="Scope" value="#{myBean.myLink.scope}" immediate="true" >
        <f:selectItem itemLabel="Please choose" itemValue="" />
        <f:selectItems value="#{myBean.availableScopes}" id="selScope"/>
    </p:selectOneMenu>

    <p:inputText id="link" required="true" label="URL" value="#{myBean.myLink.link}" immediate="true">      
        <p:ajax event="blur" update="msgLink" listener="#{myBean.checkUrl}" />
    </p:inputText>

    ... msgLink and other (required) elements

    ... submit button
</h:form>

Managed Bean

@Component("myBean")
@Scope("session")
public class MyBean implements Serializable {

    private Link myLink;
    private Map<String, String> availableScopes;

    public MyBean() {
        this.availableScopes = new HashMap<String, String>();
        this.availableScopes.put("Intranet", "Intranet");
        this.availableScopes.put("Internet", "Internet");   
    }

    // setter/getters etc.

    public void checkUrl() {
        System.out.println(myLink.getTitle());  // works
        System.out.println(myLink.getScope());  // DOES NOT work
        System.out.println(myLink.getLink());   // works
    }

}
  • I want to check the URL depending of the selected scope before submitting the form. But the called method can access the inputText values of the object. Not the value chosen in selectOneMenu.
  • I have tried it with getExternalContext().getSessionMap().get("scope") but the SessionMap is null at that time.

Any chance to access the selected value of the combo box?

Thanks
Jim

  • 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-06-10T22:56:06+00:00Added an answer on June 10, 2026 at 10:56 pm

    The <p:ajax> (and <f:ajax>) inside an UIInput component executes/processes by default the current UIInput component (@this) only, not others.

    If you want to execute/process all those UIInput components when the listener method is to be invoked, then you should specify that as such in <p:ajax process> (or <f:ajax execute>) attribute:

    <p:inputText id="title" ... />
    
    <p:selectOneMenu id="scope" ... >
        ...
    </p:selectOneMenu>
    
    <p:inputText id="link" ...>      
        <p:ajax process="title scope link" ... />
    </p:inputText>
    

    Unrelated to the concrete problem, I wonder how all those immediate="true" attributes are useful in this context. Are you certain you need them?

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

Sidebar

Related Questions

my view: <form action=<?=base_url()?>index.php/frontend/main_con/temp> <input type=text name=temp> <input type=submit/> </form> Controller: function temp(){ echo
I have below html code in one of the opensource project. <form action=/wiki/bin/view/Main/Search> <div
When click a button,I want to popup a view form bottom,like this! Any help
I have a form view which people use to update a record in the
In Microsoft Access 2007 under (Form View), how do you make text in a
I making an application to view videos form youtube, and I think it is
I am doing a JBoss SEAM project and when I view a form I
I'm running Delphi 2009. When I try to view a form in the form
My main form in my application has a datagrid view that can have 1
I am having a tree-view on my main form with initially some nodes as

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.