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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T12:21:24+00:00 2026-06-13T12:21:24+00:00

Modify.xhtml <table border=0 align=left cellpadding=10 cellspacing=0> <tr> <td>通訊地址 : </td> <td><p:selectOneMenu value=#{modify.comAddressContry} style=width: 120px>

  • 0

Modify.xhtml

                <table border="0" align="left" cellpadding="10" cellspacing="0">
                 <tr>   
                    <td>通訊地址 : </td>
                    <td><p:selectOneMenu value="#{modify.comAddressContry}" style="width: 120px">
                            <f:selectItem itemLabel="--選擇城市--" itemValue="--選擇城市--"/>
                            <f:selectItems value="#{modify.tw.country_map}"/>
                            <p:ajax update="district_change_com"  event="change" listener="#{modify.com_country_change()}"/>
                        </p:selectOneMenu>
                    </td>
                    <td><p:selectOneMenu id="district_change_com" value="#{modify.comAddressDistrict}" style="width: 120px">
                            <f:selectItem itemLabel="--選擇地區--" itemValue="--選擇地區--" />
                            <f:selectItems value="#{modify.tw.district_map}"/>
                            <p:ajax update="com_all" listener="#{modify.com_zipcode_change()}"/>
                        </p:selectOneMenu>                          
                    </td>
                    <td><p:inputText id="com_all" value="#{modify.comAddressAll}" style="width: 300px"/></td>
                    <td>通訊地電話 : </td>
                    <td><p:inputText value="#{modify.houseAddressTel}" maxlength="11" /></td>
                </tr>
                <tr>   
                    <td>戶籍地址 :</td>
                    <td><p:selectOneMenu value="#{modify.houseAddressContry}" style="width: 120px">
                            <f:selectItem itemLabel="--選擇城市--" itemValue="--選擇城市--"/>
                            <f:selectItems value="#{modify.tw.country_map}"/>
                            <p:ajax update="district_change"  event="change" listener="#{modify.country_change()}"/>
                        </p:selectOneMenu>
                    </td>
                    <td><p:selectOneMenu id="district_change" value="#{modify.houseAddressDistrict}" style="width: 120px">
                            <f:selectItem itemLabel="--選擇地區--" itemValue="--選擇地區--" />
                            <f:selectItems value="#{modify.tw.district_map}"/>
                            <p:ajax update="house_all" listener="#{modify.zipcode_change()}"/>
                        </p:selectOneMenu>                          
                    </td>
                    <td><p:inputText id="house_all" value="#{modify.houseAddressAll}" style="width: 300px"/></td>
                    <td>戶籍地電話 : </td>
                    <td><p:inputText value="#{modify.houseAddressTel}" maxlength="11" /></td>
                </tr>
            </table>

I am trying for double combo select function in PrimeFaces. It works well when I use it once but when I use it twice in the same page(in the same form) the page show validation error when I submit the chosen data. Have any ideas for this problem?

  • 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-13T12:21:25+00:00Added an answer on June 13, 2026 at 12:21 pm

    That can happen if the bean is request scoped and thus recreated on every single HTTP request (note that every ajax request also counts as a separate HTTP request). On every submit, JSF will validate the submitted dropdown value against the list of available items. However, if the bean is request scoped, this list will be reinitialized to default everytime. So if the default initialized list of the cascaded dropdown list does not represent the right list as it was at the moment the user submitted the form, then you will get a “Validation Error: Value is not valid”.

    Placing the bean in the view scope, so that it lives as long as you’re interacting with the same view, also by ajax requests, should solve the problem.

    @ManagedBean
    @ViewScoped
    public class Modify {
        // ...
    }
    

    See also:

    • How to choose the right bean scope?
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to modify the output stream to search/replace some XHTML tags returned
modify hashes in an array {:sku=>TP-PA211, :desc=>description, :qty=>, :qty2=>1 en su sucursal, :price=>30.02 D}
I want to modify a PDF document with PHP. I found the libs FPDF
I am attempting to modify some existing C++ code to work with my needs,
Possible Duplicate: Modify the URL without reloading the page I'm looking for a way
I'd like to modify the action attribute of the element to include whatever text
I want to modify something in Settings.secure database, just as the android Settings app
I'm trying to modify an svg tag with javascript to make it resizable, but
I tried to modify the sintax using 2to3 tool by running command python C:\Python32\Tools\scripts\2to3.py
I am trying to modify the android lvl library and as part of this

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.