Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Actionlistener called twice.

843844Oct 5 2007 — edited Oct 5 2007
Hi,

In jsf page I'm having following two components.

<t:commandLink forceId="true" id="export"
value="#{msgs.Export}"
rendered="#{user.config}"
actionListener="#{bean.export}"/>

<h:selectOneListbox id="record"
title="#{msgs.RecordsPerPage}" size="1"
styleClass="formField" onchange="submit()"
value="#{bean.recordsPerPageDisplayText}"
valueChangeListener="#{bean.recordsPerPageChanged}">
<f:selectItem itemValue="10"/>
<f:selectItem itemValue="20"/>
</h:selectOneListbox>

When i change the value of the listbox the "valuechangelistener" is called.
Now if i click "export" command link first and then change the value of listbox then both (commandlink actionlistener and listbox valuechangelistener) are called.

I'm not able to find out why the actionlistener on the commandlink is called again on the litbox valuechange action.

Please help me.

Thanks,
Pallavi.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 2 2007
Added on Oct 5 2007
4 comments
482 views