Re: [Wicket-user] setVesible for the component after onEvent

2007-07-19 Thread Timo Rantalaiho
On Mon, 16 Jul 2007, Igor Vaynberg wrote:
 try calling setoutputmarkupplaceholdertag(true) on all components you are
 planning to call setvisible(false) when you create them

By the way, would it be a good idea to rename that method to
something more descriptive such as enableAjaxUpdates()? I
think that it anyway also has the side effect of calling 
setOutputMarkupId(true).

- Timo

-- 
Timo Rantalaiho   
Reaktor Innovations OyURL: http://www.ri.fi/ 

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] setVesible for the component after onEvent

2007-07-19 Thread Martijn Dashorst
No, because we have discussed the naming already quite a bit and the
api is already widely used (not only in apps, but also in libraries).

Martijn

On 7/19/07, Timo Rantalaiho [EMAIL PROTECTED] wrote:
 On Mon, 16 Jul 2007, Igor Vaynberg wrote:
  try calling setoutputmarkupplaceholdertag(true) on all components you are
  planning to call setvisible(false) when you create them

 By the way, would it be a good idea to rename that method to
 something more descriptive such as enableAjaxUpdates()? I
 think that it anyway also has the side effect of calling
 setOutputMarkupId(true).

 - Timo

 --
 Timo Rantalaiho
 Reaktor Innovations OyURL: http://www.ri.fi/ 

 -
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user



-- 
Wicket joins the Apache Software Foundation as Apache Wicket
Apache Wicket 1.3.0-beta2 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0-beta2/

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] setVesible for the component after onEvent

2007-07-17 Thread James Law
Here's the pieces that I used. Sounds like Igor's approach is better, 
but here it is if you can't do it that way.
in your css:
.invisible{
display: none;
  }
.visible{
display: inline;
  }



Now, the component side (proficiencyChoice is a dropdown)

proficiencyChoice.setOutputMarkupId(true);
//define the model that will return the stylesheet 
(visible/not visible) for the select box proficiencyChoice
IModel modelForStylesheet = new Model()
 {
 public Object getObject( Component c )
 {
 if (mdl.isSelected())
 return visible;
 else
 return invisible;
 }
 };
 proficiencyChoice.add( new AttributeModifier (  class, 
true, modelForStylesheet  ));
rvitem.add(proficiencyChoice);
--James

kenixwong wrote:
 I am a wicket newbie too:)..

 can i know how u used CSS to control it ? can give any idea to me as well? 

 thanks ar



 James Law wrote:
   
 I am a wicket newbie, but when I had a similar thing I wanted to do, I 
 just used CSS to make the component invisible/visible (display: none). 
 The ajax behavior just changed the style. I am pretty certain setVisible 
 is not the best/easiest way to handle this.

 James

 kenixwong wrote:
 
 I'd like to be able to click a set of radio box and then make a component
 visible or invisible using Ajax or else. Is that any idea for it? 

 As i read the radioGroup and radioChoice, can i know what is the
 different
 btw both? 

 Here is my partial code:
 categoryField = new TextField(category);
 categoryField.setOutputMarkupId(true);

 final RadioGroup radioGroup = new RadioGroup(RadioGroup, new Model());
 listView = new ListView(ListView, optionClassList)
 {
 protected void populateItem (final ListItem item)
 {
 Radio radio = new Radio(radio, item.getModel());
 radio.add (new AjaxEventBehavior(onclick)
  {
  protected void onEvent (AjaxRequestTarget target)
 {
 if(item.getModelObject ().equals(abc)){
 target.addComponent 
 (departmentChoice.setVisible(false));
  }else{
 target.addComponent 
 (categoryField.setVisible(false));
   }
 }
  });
 item.add(radio);
 item.add(new Label(label, (String)item.getModelObject ()));
 }
 };
 radioGroup.add (listView);
 add(radioGroup);
 

 It work, but oaly the first time. Mean after i clicked on the radio few
 times, it nothing happen. 

 thanks for help... 
   
   
 -
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user


 

   


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] setVesible for the component after onEvent

2007-07-17 Thread kenixwong

sorry,igor... i cant get what u mean ... can u explain more? or show me some
example?  thanks



igor.vaynberg wrote:
 
 in that case you have to call setvisible, but add the parent of the
 component to the ajaxrequesttarget instead
 
 -igor
 
 
 On 7/16/07, kenixwong [EMAIL PROTECTED] wrote:


 i m using wicket 1.2.4, setoutputmarkupplaceholdertag(true) is came from
 wicket 1.3.0?



 igor.vaynberg wrote:
 
  On 7/16/07, kenixwong [EMAIL PROTECTED] wrote:
 
 
 
  It work, but oaly the first time. Mean after i clicked on the radio
 few
  times, it nothing happen.
 
 
  try calling setoutputmarkupplaceholdertag(true) on all components you
 are
  planning to call setvisible(false) when you create them
 
  -igor
 
 
 
  thanks for help...
  --
  View this message in context:
 
 http://www.nabble.com/setVesible-for-the-component-after-onEvent-tf4086024.html#a11613360
  Sent from the Wicket - User mailing list archive at Nabble.com.
 
 
 
 -
  This SF.net email is sponsored by DB2 Express
  Download DB2 Express C - the FREE version of DB2 express and take
  control of your XML. No limits. Just data. Click to get it now.
  http://sourceforge.net/powerbar/db2/
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 
 
 -
  This SF.net email is sponsored by DB2 Express
  Download DB2 Express C - the FREE version of DB2 express and take
  control of your XML. No limits. Just data. Click to get it now.
  http://sourceforge.net/powerbar/db2/
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 

 --
 View this message in context:
 http://www.nabble.com/setVesible-for-the-component-after-onEvent-tf4086024.html#a11641371
 Sent from the Wicket - User mailing list archive at Nabble.com.


 -
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user

 
 -
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 

-- 
View this message in context: 
http://www.nabble.com/setVesible-for-the-component-after-onEvent-tf4086024.html#a11661017
Sent from the Wicket - User mailing list archive at Nabble.com.


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] setVesible for the component after onEvent

2007-07-17 Thread Igor Vaynberg
On 7/17/07, kenixwong [EMAIL PROTECTED] wrote:


 sorry,igor... i cant get what u mean ... can u explain more? or show me
 some
 example?  thanks


you gotta learn how to use the internets

http://www.nabble.com/forum/Search.jtp?forum=13974local=yquery=visible+ajax+container

try the first result

-igor




igor.vaynberg wrote:
 
  in that case you have to call setvisible, but add the parent of the
  component to the ajaxrequesttarget instead
 
  -igor
 
 
  On 7/16/07, kenixwong [EMAIL PROTECTED] wrote:
 
 
  i m using wicket 1.2.4, setoutputmarkupplaceholdertag(true) is came
 from
  wicket 1.3.0?
 
 
 
  igor.vaynberg wrote:
  
   On 7/16/07, kenixwong [EMAIL PROTECTED] wrote:
  
  
  
   It work, but oaly the first time. Mean after i clicked on the radio
  few
   times, it nothing happen.
  
  
   try calling setoutputmarkupplaceholdertag(true) on all components you
  are
   planning to call setvisible(false) when you create them
  
   -igor
  
  
  
   thanks for help...
   --
   View this message in context:
  
 
 http://www.nabble.com/setVesible-for-the-component-after-onEvent-tf4086024.html#a11613360
   Sent from the Wicket - User mailing list archive at Nabble.com.
  
  
  
 
 -
   This SF.net email is sponsored by DB2 Express
   Download DB2 Express C - the FREE version of DB2 express and take
   control of your XML. No limits. Just data. Click to get it now.
   http://sourceforge.net/powerbar/db2/
   ___
   Wicket-user mailing list
   Wicket-user@lists.sourceforge.net
   https://lists.sourceforge.net/lists/listinfo/wicket-user
  
  
  
 
 -
   This SF.net email is sponsored by DB2 Express
   Download DB2 Express C - the FREE version of DB2 express and take
   control of your XML. No limits. Just data. Click to get it now.
   http://sourceforge.net/powerbar/db2/
   ___
   Wicket-user mailing list
   Wicket-user@lists.sourceforge.net
   https://lists.sourceforge.net/lists/listinfo/wicket-user
  
  
 
  --
  View this message in context:
 
 http://www.nabble.com/setVesible-for-the-component-after-onEvent-tf4086024.html#a11641371
  Sent from the Wicket - User mailing list archive at Nabble.com.
 
 
 
 -
  This SF.net email is sponsored by DB2 Express
  Download DB2 Express C - the FREE version of DB2 express and take
  control of your XML. No limits. Just data. Click to get it now.
  http://sourceforge.net/powerbar/db2/
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 
 
 -
  This SF.net email is sponsored by DB2 Express
  Download DB2 Express C - the FREE version of DB2 express and take
  control of your XML. No limits. Just data. Click to get it now.
  http://sourceforge.net/powerbar/db2/
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 

 --
 View this message in context:
 http://www.nabble.com/setVesible-for-the-component-after-onEvent-tf4086024.html#a11661017
 Sent from the Wicket - User mailing list archive at Nabble.com.


 -
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] setVesible for the component after onEvent

2007-07-17 Thread kenixwong

:( sorry , igor... everytime when i faced the problem, i sure will search
from net. Just i not sure what u going to write as above matter... 

anyway, thanks for your fast reply and help... 


igor.vaynberg wrote:
 
 On 7/17/07, kenixwong [EMAIL PROTECTED] wrote:


 sorry,igor... i cant get what u mean ... can u explain more? or show me
 some
 example?  thanks
 
 
 you gotta learn how to use the internets
 
 http://www.nabble.com/forum/Search.jtp?forum=13974local=yquery=visible+ajax+container
 
 try the first result
 
 -igor
 
 
 
 
 igor.vaynberg wrote:
 
  in that case you have to call setvisible, but add the parent of the
  component to the ajaxrequesttarget instead
 
  -igor
 
 
  On 7/16/07, kenixwong [EMAIL PROTECTED] wrote:
 
 
  i m using wicket 1.2.4, setoutputmarkupplaceholdertag(true) is came
 from
  wicket 1.3.0?
 
 
 
  igor.vaynberg wrote:
  
   On 7/16/07, kenixwong [EMAIL PROTECTED] wrote:
  
  
  
   It work, but oaly the first time. Mean after i clicked on the radio
  few
   times, it nothing happen.
  
  
   try calling setoutputmarkupplaceholdertag(true) on all components
 you
  are
   planning to call setvisible(false) when you create them
  
   -igor
  
  
  
   thanks for help...
   --
   View this message in context:
  
 
 http://www.nabble.com/setVesible-for-the-component-after-onEvent-tf4086024.html#a11613360
   Sent from the Wicket - User mailing list archive at Nabble.com.
  
  
  
 
 -
   This SF.net email is sponsored by DB2 Express
   Download DB2 Express C - the FREE version of DB2 express and take
   control of your XML. No limits. Just data. Click to get it now.
   http://sourceforge.net/powerbar/db2/
   ___
   Wicket-user mailing list
   Wicket-user@lists.sourceforge.net
   https://lists.sourceforge.net/lists/listinfo/wicket-user
  
  
  
 
 -
   This SF.net email is sponsored by DB2 Express
   Download DB2 Express C - the FREE version of DB2 express and take
   control of your XML. No limits. Just data. Click to get it now.
   http://sourceforge.net/powerbar/db2/
   ___
   Wicket-user mailing list
   Wicket-user@lists.sourceforge.net
   https://lists.sourceforge.net/lists/listinfo/wicket-user
  
  
 
  --
  View this message in context:
 
 http://www.nabble.com/setVesible-for-the-component-after-onEvent-tf4086024.html#a11641371
  Sent from the Wicket - User mailing list archive at Nabble.com.
 
 
 
 -
  This SF.net email is sponsored by DB2 Express
  Download DB2 Express C - the FREE version of DB2 express and take
  control of your XML. No limits. Just data. Click to get it now.
  http://sourceforge.net/powerbar/db2/
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 
 
 -
  This SF.net email is sponsored by DB2 Express
  Download DB2 Express C - the FREE version of DB2 express and take
  control of your XML. No limits. Just data. Click to get it now.
  http://sourceforge.net/powerbar/db2/
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 

 --
 View this message in context:
 http://www.nabble.com/setVesible-for-the-component-after-onEvent-tf4086024.html#a11661017
 Sent from the Wicket - User mailing list archive at Nabble.com.


 -
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user

 -
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 

-- 
View this message in context: 
http://www.nabble.com/setVesible-for-the-component-after-onEvent-tf4086024.html#a11661695
Sent from the Wicket - User mailing list archive at Nabble.com.


-
This SF.net email is sponsored by DB2 Express
Download DB2 

Re: [Wicket-user] setVesible for the component after onEvent

2007-07-17 Thread Igor Vaynberg
On 7/17/07, kenixwong [EMAIL PROTECTED] wrote:


 :( sorry , igor... everytime when i faced the problem, i sure will search
 from net. Just i not sure what u going to write as above matter...


first search result is this

http://www.nabble.com/Changing-visibility-via-ajax-tf1974532.html#a5418508

which explains how to wrap something in a container and repaint that
instead.

-igor




anyway, thanks for your fast reply and help...


 igor.vaynberg wrote:
 
  On 7/17/07, kenixwong [EMAIL PROTECTED] wrote:
 
 
  sorry,igor... i cant get what u mean ... can u explain more? or show me
  some
  example?  thanks
 
 
  you gotta learn how to use the internets
 
 
 http://www.nabble.com/forum/Search.jtp?forum=13974local=yquery=visible+ajax+container
 
  try the first result
 
  -igor
 
 
 
 
  igor.vaynberg wrote:
  
   in that case you have to call setvisible, but add the parent of the
   component to the ajaxrequesttarget instead
  
   -igor
  
  
   On 7/16/07, kenixwong [EMAIL PROTECTED] wrote:
  
  
   i m using wicket 1.2.4, setoutputmarkupplaceholdertag(true) is came
  from
   wicket 1.3.0?
  
  
  
   igor.vaynberg wrote:
   
On 7/16/07, kenixwong [EMAIL PROTECTED] wrote:
   
   
   
It work, but oaly the first time. Mean after i clicked on the
 radio
   few
times, it nothing happen.
   
   
try calling setoutputmarkupplaceholdertag(true) on all components
  you
   are
planning to call setvisible(false) when you create them
   
-igor
   
   
   
thanks for help...
--
View this message in context:
   
  
 
 http://www.nabble.com/setVesible-for-the-component-after-onEvent-tf4086024.html#a11613360
Sent from the Wicket - User mailing list archive at Nabble.com.
   
   
   
  
 
 -
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user
   
   
   
  
 
 -
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user
   
   
  
   --
   View this message in context:
  
 
 http://www.nabble.com/setVesible-for-the-component-after-onEvent-tf4086024.html#a11641371
   Sent from the Wicket - User mailing list archive at Nabble.com.
  
  
  
 
 -
   This SF.net email is sponsored by DB2 Express
   Download DB2 Express C - the FREE version of DB2 express and take
   control of your XML. No limits. Just data. Click to get it now.
   http://sourceforge.net/powerbar/db2/
   ___
   Wicket-user mailing list
   Wicket-user@lists.sourceforge.net
   https://lists.sourceforge.net/lists/listinfo/wicket-user
  
  
  
 
 -
   This SF.net email is sponsored by DB2 Express
   Download DB2 Express C - the FREE version of DB2 express and take
   control of your XML. No limits. Just data. Click to get it now.
   http://sourceforge.net/powerbar/db2/
   ___
   Wicket-user mailing list
   Wicket-user@lists.sourceforge.net
   https://lists.sourceforge.net/lists/listinfo/wicket-user
  
  
 
  --
  View this message in context:
 
 http://www.nabble.com/setVesible-for-the-component-after-onEvent-tf4086024.html#a11661017
  Sent from the Wicket - User mailing list archive at Nabble.com.
 
 
 
 -
  This SF.net email is sponsored by DB2 Express
  Download DB2 Express C - the FREE version of DB2 express and take
  control of your XML. No limits. Just data. Click to get it now.
  http://sourceforge.net/powerbar/db2/
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 
 -
  This SF.net email is sponsored by DB2 Express
  Download DB2 Express C - the FREE version of DB2 express and take
  control of your XML. No limits. Just data. Click to get it now.
  http://sourceforge.net/powerbar/db2/
  ___
  Wicket-user mailing list
  

[Wicket-user] setVesible for the component after onEvent

2007-07-16 Thread kenixwong

I'd like to be able to click a set of radio box and then make a component
visible or invisible using Ajax or else. Is that any idea for it? 

As i read the radioGroup and radioChoice, can i know what is the different
btw both? 

Here is my partial code:
categoryField = new TextField(category);
categoryField.setOutputMarkupId(true);

final RadioGroup radioGroup = new RadioGroup(RadioGroup, new Model());
listView = new ListView(ListView, optionClassList)
{
protected void populateItem (final ListItem item)
{
Radio radio = new Radio(radio, item.getModel());
radio.add (new AjaxEventBehavior(onclick)
 {
 protected void onEvent (AjaxRequestTarget target)
{
if(item.getModelObject ().equals(abc)){
target.addComponent 
(departmentChoice.setVisible(false));
 }else{
target.addComponent 
(categoryField.setVisible(false));
  }
}
 });
item.add(radio);
item.add(new Label(label, (String)item.getModelObject ()));
}
};
radioGroup.add (listView);
add(radioGroup);


It work, but oaly the first time. Mean after i clicked on the radio few
times, it nothing happen. 

thanks for help... 
-- 
View this message in context: 
http://www.nabble.com/setVesible-for-the-component-after-onEvent-tf4086024.html#a11613360
Sent from the Wicket - User mailing list archive at Nabble.com.


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] setVesible for the component after onEvent

2007-07-16 Thread James Law
I am a wicket newbie, but when I had a similar thing I wanted to do, I 
just used CSS to make the component invisible/visible (display: none). 
The ajax behavior just changed the style. I am pretty certain setVisible 
is not the best/easiest way to handle this.

James

kenixwong wrote:
 I'd like to be able to click a set of radio box and then make a component
 visible or invisible using Ajax or else. Is that any idea for it? 

 As i read the radioGroup and radioChoice, can i know what is the different
 btw both? 

 Here is my partial code:
 categoryField = new TextField(category);
 categoryField.setOutputMarkupId(true);

 final RadioGroup radioGroup = new RadioGroup(RadioGroup, new Model());
 listView = new ListView(ListView, optionClassList)
 {
   protected void populateItem (final ListItem item)
   {
   Radio radio = new Radio(radio, item.getModel());
   radio.add (new AjaxEventBehavior(onclick)
{
protected void onEvent (AjaxRequestTarget target)
   {
   if(item.getModelObject ().equals(abc)){
   target.addComponent 
 (departmentChoice.setVisible(false));
}else{
   target.addComponent 
 (categoryField.setVisible(false));
 }
   }
  });
   item.add(radio);
   item.add(new Label(label, (String)item.getModelObject ()));
   }
 };
 radioGroup.add (listView);
 add(radioGroup);
   

 It work, but oaly the first time. Mean after i clicked on the radio few
 times, it nothing happen. 

 thanks for help... 
   


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] setVesible for the component after onEvent

2007-07-16 Thread Igor Vaynberg

On 7/16/07, kenixwong [EMAIL PROTECTED] wrote:




It work, but oaly the first time. Mean after i clicked on the radio few
times, it nothing happen.



try calling setoutputmarkupplaceholdertag(true) on all components you are
planning to call setvisible(false) when you create them

-igor



thanks for help...

--
View this message in context:
http://www.nabble.com/setVesible-for-the-component-after-onEvent-tf4086024.html#a11613360
Sent from the Wicket - User mailing list archive at Nabble.com.


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] setVesible for the component after onEvent

2007-07-16 Thread kenixwong

i m using wicket 1.2.4, setoutputmarkupplaceholdertag(true) is came from
wicket 1.3.0? 

thanks


igor.vaynberg wrote:
 
 On 7/16/07, kenixwong [EMAIL PROTECTED] wrote:



 It work, but oaly the first time. Mean after i clicked on the radio few
 times, it nothing happen.
 
 
 try calling setoutputmarkupplaceholdertag(true) on all components you are
 planning to call setvisible(false) when you create them
 
 -igor
 
 
 
 thanks for help...
 --
 View this message in context:
 http://www.nabble.com/setVesible-for-the-component-after-onEvent-tf4086024.html#a11613360
 Sent from the Wicket - User mailing list archive at Nabble.com.


 -
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user

 
 -
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 

-- 
View this message in context: 
http://www.nabble.com/setVesible-for-the-component-after-onEvent-tf4086024.html#a11641371
Sent from the Wicket - User mailing list archive at Nabble.com.


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] setVesible for the component after onEvent

2007-07-16 Thread kenixwong

I am a wicket newbie too:)..

can i know how u used CSS to control it ? can give any idea to me as well? 

thanks ar



James Law wrote:
 
 I am a wicket newbie, but when I had a similar thing I wanted to do, I 
 just used CSS to make the component invisible/visible (display: none). 
 The ajax behavior just changed the style. I am pretty certain setVisible 
 is not the best/easiest way to handle this.
 
 James
 
 kenixwong wrote:
 I'd like to be able to click a set of radio box and then make a component
 visible or invisible using Ajax or else. Is that any idea for it? 

 As i read the radioGroup and radioChoice, can i know what is the
 different
 btw both? 

 Here is my partial code:
 categoryField = new TextField(category);
 categoryField.setOutputMarkupId(true);

 final RadioGroup radioGroup = new RadioGroup(RadioGroup, new Model());
 listView = new ListView(ListView, optionClassList)
 {
  protected void populateItem (final ListItem item)
  {
  Radio radio = new Radio(radio, item.getModel());
  radio.add (new AjaxEventBehavior(onclick)
   {
   protected void onEvent (AjaxRequestTarget target)
  {
  if(item.getModelObject ().equals(abc)){
  target.addComponent 
 (departmentChoice.setVisible(false));
   }else{
  target.addComponent 
 (categoryField.setVisible(false));
}
  }
  });
  item.add(radio);
  item.add(new Label(label, (String)item.getModelObject ()));
  }
 };
 radioGroup.add (listView);
 add(radioGroup);
  

 It work, but oaly the first time. Mean after i clicked on the radio few
 times, it nothing happen. 

 thanks for help... 
   
 
 
 -
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 

-- 
View this message in context: 
http://www.nabble.com/setVesible-for-the-component-after-onEvent-tf4086024.html#a11641408
Sent from the Wicket - User mailing list archive at Nabble.com.


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] setVesible for the component after onEvent

2007-07-16 Thread Igor Vaynberg

in that case you have to call setvisible, but add the parent of the
component to the ajaxrequesttarget instead

-igor


On 7/16/07, kenixwong [EMAIL PROTECTED] wrote:



i m using wicket 1.2.4, setoutputmarkupplaceholdertag(true) is came from
wicket 1.3.0?



igor.vaynberg wrote:

 On 7/16/07, kenixwong [EMAIL PROTECTED] wrote:



 It work, but oaly the first time. Mean after i clicked on the radio few
 times, it nothing happen.


 try calling setoutputmarkupplaceholdertag(true) on all components you
are
 planning to call setvisible(false) when you create them

 -igor



 thanks for help...
 --
 View this message in context:

http://www.nabble.com/setVesible-for-the-component-after-onEvent-tf4086024.html#a11613360
 Sent from the Wicket - User mailing list archive at Nabble.com.



-
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user



-
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user



--
View this message in context:
http://www.nabble.com/setVesible-for-the-component-after-onEvent-tf4086024.html#a11641371
Sent from the Wicket - User mailing list archive at Nabble.com.


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user