Thanks Vishy ,
this is i am already doing , issue is my ajax code is not firing , it only
fire when i click the check box. i didn't understand why it is not firing on
uncheck.
rit
vishy_sb wrote:
>
> Well you need to put the component (say component) which you want to make
> invisible into target and then set
> component.setOutputMarkupPlaceholderTag(true).
>
> Let me know if that works.
>
> vishy
>
>
> rit wrote:
>>
>> I have strange situation while handling Ajax on check box.
>>
>> I have a scenario , On click of check box i need to hide one component
>> and on uncheck i need to show the component back . when i select the
>> check box my Ajax fires and component hide , but when i unselect the
>> check box , my ajax doesn't fires .
>>
>> Please help me .
>>
>> my code is :
>>
>> Object obj = this.get("e_joint_cover");
>> if (obj instanceof MCheckbox) {
>> final MCheckbox eJointCover =
>> (MCheckbox)obj;
>> eJointCover.add(new
>> AjaxFormComponentUpdatingBehavior("onclick") {
>> private static final long
>> serialVersionUID = 1L;
>> protected void
>> onUpdate(AjaxRequestTarget target) {
>>
>> if (jointCoverValue.equalsIgnoreCase("false")){
>>
>>
>> //ServiceUtility.setPanelVisible(component, true);
>>
>> LpiComponent.setVisible(true);
>> }else{
>>
>> //ServiceUtility.setPanelVisible(component, false);
>>
>> LpiComponent.setVisible(false);
>> }
>>
>> target.addComponent(container.get("lpi_insured_two_details_comp"));
>>
>>
>> }
>> });
>> }
>>
>>
>>
>>
>
>
--
View this message in context:
http://www.nabble.com/CheckBox-handling-with-Ajax.-tp18781515p18790110.html
Sent from the Wicket - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]