Re: Dropdown choice value being set to default

2013-02-23 Thread venkat
Makes Sense. Let me try working wiht Model rather than Model object,
however still one doubt itches on my mind, how come when the selected
option is not equal to defaultModelObject it is able to Change that. Thanks
for your time!!!

Thanks
Venkat

On Sat, Feb 23, 2013 at 12:32 AM, Paul Bors [via Apache Wicket] 
ml-node+s1842946n4656699...@n4.nabble.com wrote:

 TabbedPanel is a Panel so I don't think that might affect you negative.

 And since your drop down changes, you know for sure it is refreshed.
 Since it goes back to the default value rather than the one you expected
 after you changed the model object you know that something is wrong there.
 Maybe the object you set it to is not one of the options?

 That's why I was suggesting not using setDefaultModelObject() since that's
 not type safe right?
 Try grabbing the type safe model, and see if setting its object to one of
 the options in the list (pay attention to the choice renderer you're using
 too).

 ~ Thank you,
Paul Bors

 On Fri, Feb 22, 2013 at 12:33 PM, venkat [hidden 
 email]http://user/SendEmail.jtp?type=nodenode=4656699i=0
 wrote:

  Hi Pal,
 
  Thanks for your quick response, Have the same, on popup submit have done
 as
  below
 
  sourceComponent.setDefaultModelObject(newSelection);
 
  some how post render it is setting it to default for the case when newly
  selected value and the already selected value is same. One doubt i have
 is
  , my drop down is resided in a panel under a tabbed panel . Is not it
 some
  thing wong with Tabbed Panel ?
 
  Thanks
 
  Venkat
 
 
 
 
 
 
  On Fri, Feb 22, 2013 at 10:57 PM, Paul Bors [via Apache Wicket] 
  [hidden email] http://user/SendEmail.jtp?type=nodenode=4656699i=1
 wrote:
 
   I think your question is too vauge for a quick response but...
  
   Why not hold on to a reference of the model for the component you're
   trying
   to change (the drop-down) and update it directly from the pop-up
 rather
   than setting the default module object? Use Ajax and add the drop-down
 to
   your target when you click the submit button on the pop-up.
  
   ~ Thank you,
  Paul Bors
  
   On Fri, Feb 22, 2013 at 8:45 AM, venkat [hidden email]
  http://user/SendEmail.jtp?type=nodenode=4656695i=0
   wrote:
  
Hi ,
   
I have a scenario, where from a Page link have to render a popup
 window
   and
on submit of the popup window have to set the drop down selected
 value
 from
popup window.
   
My dropdown bix is inside a panel of Tab.
   
It works fine when the already selected value of drop down and new
  value
being set from doprdown are different. however when both the values
 are
same
it sets the selected value to default choice.
   
Am using this code in Wicket Modal Window OnClose() event
   
sourceComponent.setDefaultModelObject(newlyselectedValue);
   
I would appreciate a quick response.
   
Thanks in advance!
   
   
   
--
View this message in context:
   
  
 
 http://apache-wicket.1842946.n4.nabble.com/Dropdown-choice-value-being-set-to-default-tp4656684.html
Sent from the Users forum mailing list archive at Nabble.com.
   
   
 -
To unsubscribe, e-mail: [hidden email]
  http://user/SendEmail.jtp?type=nodenode=4656695i=1
For additional commands, e-mail: [hidden email]
  http://user/SendEmail.jtp?type=nodenode=4656695i=2
   
   
   ~ Thank you,
   [hidden email]http://user/SendEmail.jtp?type=nodenode=4656699i=2
  
  
   --
If you reply to this email, your message will be added to the
 discussion
   below:
  
  
 
 http://apache-wicket.1842946.n4.nabble.com/Dropdown-choice-value-being-set-to-default-tp4656684p4656695.html
   To unsubscribe from Dropdown choice value being set to default, click
  here
 
 
   .
   NAML
 
 http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewerid=instant_html%21nabble%3Aemail.namlbase=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespacebreadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml

  
  
 
 
 
 
  --
  View this message in context:
 
 http://apache-wicket.1842946.n4.nabble.com/Dropdown-choice-value-being-set-to-default-tp4656684p4656697.html

  Sent from the Users forum mailing list archive at Nabble.com.
 
  -
  To unsubscribe, e-mail: [hidden 
  email]http://user/SendEmail.jtp?type=nodenode=4656699i=3
  For additional commands, e-mail: [hidden 
  email]http://user/SendEmail.jtp?type=nodenode=4656699i=4
 
 
  ~ Thank you,
 p...@bors.ws


 --
   If you reply to this email, your message will be added to the
 discussion below:

 http://apache-wicket.1842946.n4.nabble.com/Dropdown-choice-value-being-set-to-default

RE: Dropdown choice value being set to default

2013-02-23 Thread Paul Bors
The magic of matching values with your objects is in the ChoiceRenderer as
that's the one that matches between your domain objects and the HTML's
option id=##Display Value/option in your drop down.

It might be that you're using the default ChoiceRenderer and maybe is not
mapping right to your domain object (setObject as you called it should have
worked).

~ Thank you,
  Paul Bors

-Original Message-
From: venkat [mailto:venkatesh.b...@gmail.com] 
Sent: Saturday, February 23, 2013 3:29 AM
To: users@wicket.apache.org
Subject: Re: Dropdown choice value being set to default

Makes Sense. Let me try working wiht Model rather than Model object, however
still one doubt itches on my mind, how come when the selected option is not
equal to defaultModelObject it is able to Change that. Thanks for your
time!!!

Thanks
Venkat

On Sat, Feb 23, 2013 at 12:32 AM, Paul Bors [via Apache Wicket] 
ml-node+s1842946n4656699...@n4.nabble.com wrote:

 TabbedPanel is a Panel so I don't think that might affect you negative.

 And since your drop down changes, you know for sure it is refreshed.
 Since it goes back to the default value rather than the one you 
 expected after you changed the model object you know that something is
wrong there.
 Maybe the object you set it to is not one of the options?

 That's why I was suggesting not using setDefaultModelObject() since 
 that's not type safe right?
 Try grabbing the type safe model, and see if setting its object to one 
 of the options in the list (pay attention to the choice renderer 
 you're using too).

 ~ Thank you,
Paul Bors

 On Fri, Feb 22, 2013 at 12:33 PM, venkat [hidden 
 email]http://user/SendEmail.jtp?type=nodenode=4656699i=0
 wrote:

  Hi Pal,
 
  Thanks for your quick response, Have the same, on popup submit have 
  done
 as
  below
 
  sourceComponent.setDefaultModelObject(newSelection);
 
  some how post render it is setting it to default for the case when 
  newly selected value and the already selected value is same. One 
  doubt i have
 is
  , my drop down is resided in a panel under a tabbed panel . Is not 
  it
 some
  thing wong with Tabbed Panel ?
 
  Thanks
 
  Venkat
 
 
 
 
 
 
  On Fri, Feb 22, 2013 at 10:57 PM, Paul Bors [via Apache Wicket]  
  [hidden email] 
  http://user/SendEmail.jtp?type=nodenode=4656699i=1
 wrote:
 
   I think your question is too vauge for a quick response but...
  
   Why not hold on to a reference of the model for the component 
   you're trying to change (the drop-down) and update it directly 
   from the pop-up
 rather
   than setting the default module object? Use Ajax and add the 
   drop-down
 to
   your target when you click the submit button on the pop-up.
  
   ~ Thank you,
  Paul Bors
  
   On Fri, Feb 22, 2013 at 8:45 AM, venkat [hidden email]
  http://user/SendEmail.jtp?type=nodenode=4656695i=0
   wrote:
  
Hi ,
   
I have a scenario, where from a Page link have to render a popup
 window
   and
on submit of the popup window have to set the drop down selected
 value
 from
popup window.
   
My dropdown bix is inside a panel of Tab.
   
It works fine when the already selected value of drop down and 
new
  value
being set from doprdown are different. however when both the 
values
 are
same
it sets the selected value to default choice.
   
Am using this code in Wicket Modal Window OnClose() event
   
sourceComponent.setDefaultModelObject(newlyselectedValue);
   
I would appreciate a quick response.
   
Thanks in advance!
   
   
   
--
View this message in context:
   
  
 
 http://apache-wicket.1842946.n4.nabble.com/Dropdown-choice-value-being
 -set-to-default-tp4656684.html
Sent from the Users forum mailing list archive at Nabble.com.
   
   
 -
To unsubscribe, e-mail: [hidden email]
  http://user/SendEmail.jtp?type=nodenode=4656695i=1
For additional commands, e-mail: [hidden email]
  http://user/SendEmail.jtp?type=nodenode=4656695i=2
   
   
   ~ Thank you,
   [hidden 
   email]http://user/SendEmail.jtp?type=nodenode=4656699i=2
  
  
   --
If you reply to this email, your message will be added to the
 discussion
   below:
  
  
 
 http://apache-wicket.1842946.n4.nabble.com/Dropdown-choice-value-being
 -set-to-default-tp4656684p4656695.html
   To unsubscribe from Dropdown choice value being set to default, 
   click
  here
 
 
   .
   NAML
 
 http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?ma
 cro=macro_viewerid=instant_html%21nabble%3Aemail.namlbase=nabble.nam
 l.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-n
 abble.view.web.template.NodeNamespacebreadcrumbs=notify_subscribers%2
 1nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant
 _email%21nabble%3Aemail.naml

  
  
 
 
 
 
  --
  View this message in context:
 
 http://apache-wicket.1842946.n4.nabble.com

Dropdown choice value being set to default

2013-02-22 Thread venkat
Hi , 

I have a scenario, where from a Page link have to render a popup window and
on submit of the popup window have to set the drop down selected value  from
popup window.

My dropdown bix is inside a panel of Tab. 

It works fine when the already selected value of drop down and new value
being set from doprdown are different. however when both the values are same
it sets the selected value to default choice.

Am using this code in Wicket Modal Window OnClose() event

sourceComponent.setDefaultModelObject(newlyselectedValue);

I would appreciate a quick response. 

Thanks in advance! 



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Dropdown-choice-value-being-set-to-default-tp4656684.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Dropdown choice value being set to default

2013-02-22 Thread Paul Bors
I think your question is too vauge for a quick response but...

Why not hold on to a reference of the model for the component you're trying
to change (the drop-down) and update it directly from the pop-up rather
than setting the default module object? Use Ajax and add the drop-down to
your target when you click the submit button on the pop-up.

~ Thank you,
   Paul Bors

On Fri, Feb 22, 2013 at 8:45 AM, venkat venkatesh.b...@gmail.com wrote:

 Hi ,

 I have a scenario, where from a Page link have to render a popup window and
 on submit of the popup window have to set the drop down selected value
  from
 popup window.

 My dropdown bix is inside a panel of Tab.

 It works fine when the already selected value of drop down and new value
 being set from doprdown are different. however when both the values are
 same
 it sets the selected value to default choice.

 Am using this code in Wicket Modal Window OnClose() event

 sourceComponent.setDefaultModelObject(newlyselectedValue);

 I would appreciate a quick response.

 Thanks in advance!



 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/Dropdown-choice-value-being-set-to-default-tp4656684.html
 Sent from the Users forum mailing list archive at Nabble.com.

 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org




Re: Dropdown choice value being set to default

2013-02-22 Thread Paul Bors
TabbedPanel is a Panel so I don't think that might affect you negative.

And since your drop down changes, you know for sure it is refreshed.
Since it goes back to the default value rather than the one you expected
after you changed the model object you know that something is wrong there.
Maybe the object you set it to is not one of the options?

That's why I was suggesting not using setDefaultModelObject() since that's
not type safe right?
Try grabbing the type safe model, and see if setting its object to one of
the options in the list (pay attention to the choice renderer you're using
too).

~ Thank you,
   Paul Bors

On Fri, Feb 22, 2013 at 12:33 PM, venkat venkatesh.b...@gmail.com wrote:

 Hi Pal,

 Thanks for your quick response, Have the same, on popup submit have done as
 below

 sourceComponent.setDefaultModelObject(newSelection);

 some how post render it is setting it to default for the case when newly
 selected value and the already selected value is same. One doubt i have is
 , my drop down is resided in a panel under a tabbed panel . Is not it some
 thing wong with Tabbed Panel ?

 Thanks

 Venkat






 On Fri, Feb 22, 2013 at 10:57 PM, Paul Bors [via Apache Wicket] 
 ml-node+s1842946n4656695...@n4.nabble.com wrote:

  I think your question is too vauge for a quick response but...
 
  Why not hold on to a reference of the model for the component you're
  trying
  to change (the drop-down) and update it directly from the pop-up rather
  than setting the default module object? Use Ajax and add the drop-down to
  your target when you click the submit button on the pop-up.
 
  ~ Thank you,
 Paul Bors
 
  On Fri, Feb 22, 2013 at 8:45 AM, venkat [hidden email]
 http://user/SendEmail.jtp?type=nodenode=4656695i=0
  wrote:
 
   Hi ,
  
   I have a scenario, where from a Page link have to render a popup window
  and
   on submit of the popup window have to set the drop down selected value
from
   popup window.
  
   My dropdown bix is inside a panel of Tab.
  
   It works fine when the already selected value of drop down and new
 value
   being set from doprdown are different. however when both the values are
   same
   it sets the selected value to default choice.
  
   Am using this code in Wicket Modal Window OnClose() event
  
   sourceComponent.setDefaultModelObject(newlyselectedValue);
  
   I would appreciate a quick response.
  
   Thanks in advance!
  
  
  
   --
   View this message in context:
  
 
 http://apache-wicket.1842946.n4.nabble.com/Dropdown-choice-value-being-set-to-default-tp4656684.html
   Sent from the Users forum mailing list archive at Nabble.com.
  
   -
   To unsubscribe, e-mail: [hidden email]
 http://user/SendEmail.jtp?type=nodenode=4656695i=1
   For additional commands, e-mail: [hidden email]
 http://user/SendEmail.jtp?type=nodenode=4656695i=2
  
  
  ~ Thank you,
  p...@bors.ws
 
 
  --
   If you reply to this email, your message will be added to the discussion
  below:
 
 
 http://apache-wicket.1842946.n4.nabble.com/Dropdown-choice-value-being-set-to-default-tp4656684p4656695.html
  To unsubscribe from Dropdown choice value being set to default, click
 here
 http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=4656684code=dmVua2F0ZXNoLmJveWFAZ21haWwuY29tfDQ2NTY2ODR8NzM2MzA0ODk5
 
  .
  NAML
 http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewerid=instant_html%21nabble%3Aemail.namlbase=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespacebreadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml
 
 




 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/Dropdown-choice-value-being-set-to-default-tp4656684p4656697.html
 Sent from the Users forum mailing list archive at Nabble.com.

 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org