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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T14:40:18+00:00 2026-06-17T14:40:18+00:00

I created xhtml page with one inputText and one commandButton component. When I clicked

  • 0

I created xhtml page with one inputText and one commandButton component. When I clicked on button is displaying overlayPanel with pickList and one commandButton under list. I want to get all target values and put it into inputText (this component must be only one). Can you help me how to do it?

Below is xhtml code that I wrote for now:

<h:panelGrid id="displayPlayers" columns="3">
        <ui:repeat value="#{pickListBean.players.target}" var="player"> 
            <p:inputText id="input2" value="#{player.name}" />
        </ui:repeat> 
        <p:commandButton id="overPanBtn2" value="overPanBtn2" type="button" />
    </h:panelGrid>

    <p:overlayPanel id="chartPanel2" for="overPanBtn2" hideEffect="fade">
        <p:pickList id="pickList4" value="#{pickListBean.players}" var="player" itemLabel="#{player}" itemValue="#{player}" converter="playerConverter">
            <p:column style="width:75%;">  
                #{player.name}  
            </p:column>
            <p:column style="width:75%;">  
                #{player.number}  
            </p:column>
        </p:pickList>
        <p:commandButton id="playerSubmit4" value="Ok" update="displayPlayers" style="margin-top:5px" />
    </p:overlayPanel>

I will be grateful for help.

  • 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-17T14:40:19+00:00Added an answer on June 17, 2026 at 2:40 pm

    In your case it should be something like that, you only have to follow the showcase example:

    XHTML

    <p:pickList id="pickList4" value="#{pickListBean.players}" var="player" itemLabel="#{player}" itemValue="#{player}" converter="playerConverter">
        <p:ajax event="transfer" listener="#{pickListBean.onTransfer}" update="msg" />
        <p:column style="width:75%;">  
                #{player.name}  
        </p:column>
        <p:column style="width:75%;">  
                #{player.number}  
        </p:column>
    </p:pickList>
    

    BACKING BEAN

    String selectedPlayerNames;
    
    //GETTER
    
    public void onTransfer(TransferEvent event) {
        selectedPlayerNames = "";
        for (Player p : players.getTarget()){
            selectedPlayerNames += p.getName() + " ";
            }
    }
    

    Just call the event when transfer happens, and save the targeted values into the String. Then bind this String property to a p:inputText.

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

Sidebar

Related Questions

Can you create a complete website with only one page? So using XHTML, CSS,
I have created a page where I want to get the JSON response from
I created a web-site for a client with W3C Valid XHTML and CSS Code,
I have created a web site which is valid to strict XHTML and passes
I use embedded SVG in XHTML and want to create animations from Javascript, but
I have 9 DTD files example xhtml dtd1 xhtml dtd2 I want to create
I have created a custom facelets component and I need to set some value
I have created a makefile for the generation of a simple web page. The
I am solving how to pass values from one page to another without making
I am creating Tridion GUI Extension, in this i have created a button (InsertCP)

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.