Hi,

I have a DropDownChoice that I  implemented an
AjxFormComponentUpdatingBehavior onUpdate() method.  I have been battling
with a problem with its onUpdate() not being triggered/executed every time
user selects a choice from the DropDownChoice.  In Firefox, it sometimes is
triggered, sometime not; in IE9/Safari/Chrome, it's not triggered at all.  

Now I have another DropDownChoice with onUpdate() behavior implemented, it
seems to work every time.  The only difference I can see is that this
DropDownChoice is directly placed in a Form; while the one that does not
work is placed in a table under a Form. 

The one that works:

<form id="createMPForm" wicket:id="createMPForm">

        <div data-role="fieldcontain" data-theme="b" wicket:id="profileTypeRow">
             
                <label for="profileType" class="select"
wicket:id="profileTypeLabel">Profile Type:</label>
                <select name="profileType" id="profileType" wicket:id="type"
data-theme="b">
                        <option>default</option>
                        <option>OXE</option>
                        <option>OT</option>
                </select>
        </div>

The one that does not work some times:

<form id="createForm" wicket:id="createForm">
<div id="user">
        

          
             
 
                 <label for="userType" wicket:id="userTypeLabel"
class="requiredLabel">User Type</label>
                 <select id="userType" name="userType" wicket:id="userType">
                  <option>default</option>
                   <option>OXE</option>
                   <option>OT</option>
                </select> 
            

The java code for two DropDownChoice is similar, where userTypeBox is a
DropDownChoice component:

                userTypeBox.add(new 
AjaxFormComponentUpdatingBehavior("onChange") {
                        private static final long serialVersionUID = 1L;
                        protected void onUpdate(AjaxRequestTarget target) {
                                resetFieldsPerUserType(target);
                                target.add(salutationRow);
                                target.add(firstNameRow);
                                target.add(lastNameRow);
                                target.add(metaProfileRow);

Anyone can tell me if being directly under a Form or not would make the
difference here?  Thanks!!



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/AjaxFormComponentUpdatingBehavior-onUpdate-not-triggered-sometimes-tp4655361.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to