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!

Radio Button event with ajax

843844Jan 12 2010 — edited Jan 12 2010
Hi friends,

I have radio buttons inside tabpanel. Now i need to implement event in this radio button such that i am able to update values in my back bean and update certain section on page as well.

This is the xhtml i am using.

<h:selectOneRadio value="percent" title="Select any one of the choice" styleClass="font_normal5">
<f:selectItem itemLabel="#{msgs.hundred}" itemValue="percent" />
<f:selectItem itemLabel="#{msgs.your_share}" itemValue="share" />
<f:selectItem itemLabel="#{msgs.bureau_share}" itemValue="bureau" />
<a4j:support event="onclick" ajaxSingle="true" reRender="container" immediate="true" actionListener="#{financialDetailsHandler.processValueChange}"/> //to rerender
</h:selectOneRadio>

<div id="container" class="transaction_structure1"> //this whole div should be updated
<div class="transaction_leftstructure">
<p class="transaction_lineheight">
#{msgs.osnd} :
#{msgs.original_currency}
#{msgs.outstanding_qualifier}


#{msgs.incurred} :
#{msgs.outstanding_amount} :
#{msgs.previously_paid} :
#{msgs.outstanding_fees} :
#{msgs.settlement_amt} :
#{msgs.vat} :
</p>
</div>
<div class="rightstructure10">
<p class="transaction_lineheight">
<h:outputText value="#{financialDetailsHandler.financialDetailsBean.name}"/>
//this shpuld update
<h:outputText value="#{financialDTO.originalCurrency}"/>
<h:outputText value="#{financialDTO.outstandingQual}"/>
</p>
</div>
</div>



//Method which gets called in my method

public void processValueChange(ActionEvent vce)
{
System.out.println("ABC");
HtmlAjaxSupport value = (HtmlAjaxSupport)vce.getComponent();
HtmlSelectOneRadio radio=(HtmlSelectOneRadio)value.getParent();
radioValue = (String)radio.getSubmittedValue();
System.out.println(radioValue);
if(radioValue.equalsIgnoreCase("percent")) {
financialDetailsBean.setName("kush");
}
if(radioValue.equals("share")) {
financialDetailsBean.setName("Nilesh");
}
System.out.println(financialDetailsBean.getName());
}


Here the main problem is my code is not getting updated, however event gets fired as system.out.println is printed in glassfish logs.

As far as i know, a4j support tag is used to rerender the div again based on id(using ajax).

But why value inside my div is not getting updated.

Please Help!!!

Comments

StefanP-Oracle

Hi

RMI use random ports for communication between the stub and the remote object

for pass this traffic to firewall,

the solution is to tunnel RMI traffic over HTTP

please check:

https://docs.oracle.com/javase/8/docs/platform/rmi/spec/rmi-arch6.html

3.5 RMI Through Firewalls Via Proxies

Regards

Stefan

3363700

Hi Stefan

thank for your answer,

However i have found here:

https://docs.oracle.com/javase/8/docs/api/java/rmi/server/RMISocketFactory.html

that the http tunnelling is deprecated, and "are subject to removal ..."

There's just no other way to use RMI with a Firewall?

Best Regards

Marco

1 - 2
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Feb 9 2010
Added on Jan 12 2010
1 comment
451 views