Re: CheckBox handling with Ajax.

2008-08-02 Thread rit

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]



CheckBox handling with Ajax.

2008-08-01 Thread rit

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.-tp18781515p18781515.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]



Inline JavaScript form submit

2008-07-10 Thread rit

Hi All,

I have an added Behaviour on button to prevent double submitting . i have
added inline script 

button.setOnClickScript(this.disabled = true; this.className =
this.className + ' disabled'; );

which is working fine for me and disabling my button on first click , but
the issue is after disabling submit button it should called my perform
method.  which is not getting called . it just refresh my page. 

i have even tried couple of things like return true , this.form.submit ,
even use onComponentTag like
onComponentTag(Component component, ComponentTag tag) {
if(!(component instanceof MButton)) return;
super.onComponentTag(component, tag);
tag.put(onClick,this.disabled = true; this.className = 
this.className +
' disabled'; return true;);
}
nothing workign for me .

Please suggest

Thanks
Rits
-- 
View this message in context: 
http://www.nabble.com/Inline-JavaScript-form-submit-tp18385509p18385509.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]



wicket-1.3.0-beta2 - Type valiation Error

2008-03-19 Thread rit

After migrating from wicket-1.2.6 to wicket-1.3.0-beta2 I had the following
problem: 

The problem with the type Validation  and Requried one .

I have a scenario where i have Component inside another component . and i
have to validate inside component.
Wicket - 1-2.6 was good in that , as it's goes two level up , but wicket
i.3.0 doesn't goes two level up ..

it's goes only one level up .. 
String message = localizer.getString(resource, formComponent.getParent(),
);

Can any1 suggest me how to solve this Issue.

I am getting this sort of error -  ( validation field that it should be
numeric ) 

Could not locate error message for error:
[org.apache.wicket.validation.ValidationError message=[null],
keys=[IConverter.BigDecimal, IConverter],
variables=[[locale=en_GB],[exception=org.apache.wicket.util.convert.ConversionException:
Cannot parse 'q' using format
[EMAIL PROTECTED],[type=BigDecimal]]]


Thanks
RIT'S
-- 
View this message in context: 
http://www.nabble.com/wicket-1.3.0-beta2---Type-valiation-Error-tp16146530p16146530.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]