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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T11:13:25+00:00 2026-05-23T11:13:25+00:00

I have a JSF-2.0 dialog which has three p:inputText fields who’s contents I want

  • 0

I have a JSF-2.0 dialog which has three p:inputText fields who’s contents I want to make accessible to a bean when the p:commandButton is pressed. I have tried using f:attribute but that either passes the exact text of what I place into ‘value’ OR I get null if I try something like:

<h:form id="form">  
            <p:dataTable var="config" value="#{configBean.configList}" selection="#{configBean.selectedConfigs}">
                <p:column selectionMode="multiple">               
                    <f:facet name="header">  
                            Delete?  
                    </f:facet>                      
                </p:column> 



            <p:column headerText="Name">
                <h:outputText value="#{config.name}" />  
            </p:column>  

            <p:column headerText="Key">
                <h:outputText value="#{config.key}" />  
            </p:column>  

            <p:column headerText="Value">
                <h:outputText value="#{config.value}" />  
            </p:column>  
        </p:dataTable>

        <p:commandButton value="Add Row" 
                         oncomplete="addRowDialog.show()"/>
        <p:commandButton value="Delete" 
                         action="#{configBean.deleteSelectedConfigs}"/>

        <p:dialog header="Add Row" widgetVar="addRowDialog"  id="dialog"
                  width="250" height="300" showEffect="explode" hideEffect="explode">  

            <h:outputLabel for="name2" value="Name:"/>
            <p:inputText id="name2" name="name2" required="true"/>

            <p:commandButton value="Submit" actionListener="#{configBean.addNewConfigProperty}" onclick="addRowDialog.hide()" update="config">              
            <f:attribute name="name1" value="#{requestScope.name2}"/>
            </p:commandButton>
        </p:dialog>                              
    </h:form>  

is it possible to pass the value of what is found in the inputText this way?

  • 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-23T11:13:26+00:00Added an answer on May 23, 2026 at 11:13 am

    Use the value attribute of p:inputText to bind it’s content to a backing bean value:

    <p:inputText id="name2" value="#{myBean.myTextField}" required="true"/>
    

    And in your bean:

    String myTextField;
    // add getter and setter
    

    If you want to bind the inputText to a different datatype you need a converter.

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

Sidebar

Related Questions

I have a JSF page on which I want to have a checkbox that,
I have a JSF 2.0 application on Tomcat with many <h:inputText> fields to input
I have a JSF/Seam web app which has a page with a form which,
I have JSF page has two drop down lists and I want to load
I have JSF code like: <h:inputText id=from value=#{fromToMBean.fromName}/> I would like to get this
i have a jsf page which displays an image from an url http://ichart.finance.yahoo.com/z?s=^NSEI&t=1d&q=l&l=on&z=l&p=s&a=v&p=s i
I have a JSF data table <h:dataTable id=memberTable value=#{bean.pList} border=0 rowClasses=rowEven rowOdd var=item> <h:column
I have a JSF 2 application which creates some SVG content. How can i
I have a problem with using jQuery Dialog and Ajax submit in JSF. I
I have jsf application in which I have to use a facelet custom component

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.