Re: Values got lost from Property model or compound property model on ajax call

2012-08-05 Thread Sven Meier

How does getShoppingCart() look like?

You're probably switching the shopping cart instance *after* you've 
created the CompoundPropertyModel.


Sven

On 08/05/2012 08:33 PM, vinitty wrote:

I can not paste the exact code but i am putting replica of that code

public class BillingAddressPanel extends Panel   {

public BillingAddressPanel()
{
  final CompoundPropertyModel model =  new
CompoundPropertyModel(getShoppingCart());
 // use CompoundPropertyModel.
 setDefaultModel(model);

 add(new Label(WKT_FIRST_NAME).setEscapeModelStrings(false));
 add(new Label(WKT_LAST_NAME).setEscapeModelStrings(false));
 add(new Label(KEY_BILLADDR_COMPANY).setEscapeModelStrings(false));
 add(new Label(WKT_ADDRESS_ONE).setEscapeModelStrings(false));
 add(new Label(WKT_ADDRESS_TWO).setEscapeModelStrings(false));
 add(new Label(KEY_BILLADDR_APT_SUITE).setEscapeModelStrings(false));
 add(new Label(WKT_CITY).setEscapeModelStrings(false));
 add(new Label(KEY_BILLADDR_STATE).setEscapeModelStrings(false));

add(new AjaxLink(){
@Override
 public void onClick(AjaxRequestTarget target) {
 logger.debug("[CompleteOrderLink] [onClick] Starts ");

 WebRequest  webRequest  = (WebRequest)
RequestCycle.get().getRequest();
 WebResponse webResponse = (WebResponse)
RequestCycle.get().getResponse();
  
		Here I am not able to get the value from ShoppingCart.getFirstName, last

Name , all values got blank

}
})


}






--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Values-got-lost-from-Property-model-or-compound-property-model-on-ajax-call-tp4651001p4651004.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




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



Re: Values got lost from Property model or compound property model on ajax call

2012-08-05 Thread vinitty
I can not paste the exact code but i am putting replica of that code 

public class BillingAddressPanel extends Panel   {

public BillingAddressPanel() 
{
 final CompoundPropertyModel model =  new
CompoundPropertyModel(getShoppingCart());
// use CompoundPropertyModel.
setDefaultModel(model);

add(new Label(WKT_FIRST_NAME).setEscapeModelStrings(false));
add(new Label(WKT_LAST_NAME).setEscapeModelStrings(false));
add(new Label(KEY_BILLADDR_COMPANY).setEscapeModelStrings(false));
add(new Label(WKT_ADDRESS_ONE).setEscapeModelStrings(false));
add(new Label(WKT_ADDRESS_TWO).setEscapeModelStrings(false));
add(new Label(KEY_BILLADDR_APT_SUITE).setEscapeModelStrings(false));
add(new Label(WKT_CITY).setEscapeModelStrings(false));
add(new Label(KEY_BILLADDR_STATE).setEscapeModelStrings(false));

add(new AjaxLink(){
@Override
public void onClick(AjaxRequestTarget target) {
logger.debug("[CompleteOrderLink] [onClick] Starts ");

WebRequest  webRequest  = (WebRequest)
RequestCycle.get().getRequest();
WebResponse webResponse = (WebResponse)
RequestCycle.get().getResponse();
 
Here I am not able to get the value from 
ShoppingCart.getFirstName, last
Name , all values got blank

}
})


}






--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Values-got-lost-from-Property-model-or-compound-property-model-on-ajax-call-tp4651001p4651004.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: Values got lost from Property model or compound property model on ajax call

2012-08-05 Thread Andrea Del Bene

Hi,

can you provide some more details? Can you attach the code of ajax link?

Please help me
i have page and using compound property model i am showing the values
on clicking ajax link values got lost from the model




--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Values-got-lost-from-Property-model-or-compound-property-model-on-ajax-call-tp4651001.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




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



Values got lost from Property model or compound property model on ajax call

2012-08-05 Thread vinitty
Please help me 
i have page and using compound property model i am showing the values 
on clicking ajax link values got lost from the model




--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Values-got-lost-from-Property-model-or-compound-property-model-on-ajax-call-tp4651001.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