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!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Help: JSF and a4j

843844Jun 20 2008 — edited Jun 23 2008
Hi,

I am pretty new on JSF and Ajax and wonder if someone could help me to resolve this problem:
- I have 2 text boxes (Email Address and CC Address) and one check box (CC). When the checkbox is checked, it should copy the value from text box 1 to text box 2. Just simple like that. Here is how I did it:

<rich:inplaceInput value="#{emailBean.toAddresses}" id="toAddress" inputWidth="350" minInputWidth="350" required="true"/>
<rich:inplaceInput value="#{emailBean.ccAddresses}" id="ccAddress" inputWidth="350" minInputWidth="350"/>

<h:selectBooleanCheckbox id="ccMeCheckbox" valueChangeListener="#{emailReportBean.ccMe}">
<a4j:support event="onclick" reRender="ccAddress"/>
</h:selectBooleanCheckbox>

In the backingBean, here is what I did:
public void setCcAddresses(String ccAddresses) {
if (ccMe == Boolean.TRUE){
this.ccAddresses = this.fromAddress;
} else {
this.ccAddresses = ccAddresses;
}
}

But it is not working :(. Could someone help and tell me if I am missing anything. Thank you!

Comments

Processing
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Jul 21 2008
Added on Jun 20 2008
4 comments
215 views