Re: Article: Introducing Apache Wicket

2008-01-31 Thread Sam Barnum

Question on detachable models:

You use detachable models in the contact edit page.  It seems like  
this would cause your changes to be lost if the edit process takes  
more than one request to complete.


If you use the no-arg constructor, the loadableDetachableModel  
creates a new contact at the beginning of every request.  If you  
enter a name that's too long, a validation message is displayed. Then  
the detach() is called on the model, and a new Contact is loaded on  
the next request, erasing your temporary changes.


I may well be misunderstanding something, I'm fairly new to this  
stuff.  It seems that for edit pages you want a non-detachable model,  
which gets serialized to the session.


Thanks for taking the time to write this article, and thanks in  
advance for any clarification on this topic.


--
Sam Barnum
360 Works
http://www.360works.com
415.865.0952



On Jan 28, 2008, at 11:02 AM, Nick Heudecker wrote:


It's finally up:
http://www.theserverside.com/news/thread.tss?thread_id=48234

Thanks to the various reviewers that helped improve both the  
content and
quality of the article, including Martijn, Eelco, Igor, Gerolf and  
Talios.


--
Nick Heudecker
Professional Wicket Training  Consulting
http://www.systemmobile.com

Eventful - Intelligent Event Management
http://www.eventfulhq.com




Re: Article: Introducing Apache Wicket

2008-01-31 Thread Igor Vaynberg
if there is a form error then the changes are never applied to the
pojo in the first place. wicket's form workflow is atomic - the model
object is ever updated when all required,type conversion,validation
was successful on all form components in the form. if something failed
wicket will keep the input and display it again when the form is
rerendered.

makes sense?

-igor


On Jan 31, 2008 6:42 PM, Sam Barnum [EMAIL PROTECTED] wrote:
 Question on detachable models:

 You use detachable models in the contact edit page.  It seems like
 this would cause your changes to be lost if the edit process takes
 more than one request to complete.

 If you use the no-arg constructor, the loadableDetachableModel
 creates a new contact at the beginning of every request.  If you
 enter a name that's too long, a validation message is displayed. Then
 the detach() is called on the model, and a new Contact is loaded on
 the next request, erasing your temporary changes.

 I may well be misunderstanding something, I'm fairly new to this
 stuff.  It seems that for edit pages you want a non-detachable model,
 which gets serialized to the session.

 Thanks for taking the time to write this article, and thanks in
 advance for any clarification on this topic.

 --
 Sam Barnum
 360 Works
 http://www.360works.com
 415.865.0952




 On Jan 28, 2008, at 11:02 AM, Nick Heudecker wrote:

  It's finally up:
  http://www.theserverside.com/news/thread.tss?thread_id=48234
 
  Thanks to the various reviewers that helped improve both the
  content and
  quality of the article, including Martijn, Eelco, Igor, Gerolf and
  Talios.
 
  --
  Nick Heudecker
  Professional Wicket Training  Consulting
  http://www.systemmobile.com
 
  Eventful - Intelligent Event Management
  http://www.eventfulhq.com



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Article: Introducing Apache Wicket

2008-01-31 Thread Nick Heudecker
Answer inline.

On Jan 31, 2008 8:42 PM, Sam Barnum [EMAIL PROTECTED] wrote:

 Question on detachable models:

 You use detachable models in the contact edit page.  It seems like
 this would cause your changes to be lost if the edit process takes
 more than one request to complete.

 If you use the no-arg constructor, the loadableDetachableModel
 creates a new contact at the beginning of every request.  If you
 enter a name that's too long, a validation message is displayed. Then
 the detach() is called on the model, and a new Contact is loaded on
 the next request, erasing your temporary changes.


If validation fails, the input isn't copied to the Contact object.  The form
input is only copied to the Contact object when the form successfully
submits.




 I may well be misunderstanding something, I'm fairly new to this
 stuff.  It seems that for edit pages you want a non-detachable model,
 which gets serialized to the session.


I had the same misconception when I started using  Wicket.




 Thanks for taking the time to write this article, and thanks in
 advance for any clarification on this topic.

 --
 Sam Barnum
 360 Works
 http://www.360works.com
 415.865.0952



 On Jan 28, 2008, at 11:02 AM, Nick Heudecker wrote:

  It's finally up:
  http://www.theserverside.com/news/thread.tss?thread_id=48234
 
  Thanks to the various reviewers that helped improve both the
  content and
  quality of the article, including Martijn, Eelco, Igor, Gerolf and
  Talios.
 
  --
  Nick Heudecker
  Professional Wicket Training  Consulting
  http://www.systemmobile.com
 
  Eventful - Intelligent Event Management
  http://www.eventfulhq.com




-- 
Nick Heudecker
Professional Wicket Training  Consulting
http://www.systemmobile.com

Eventful - Intelligent Event Management
http://www.eventfulhq.com


Re: Article: Introducing Apache Wicket

2008-01-30 Thread dozgurc

i came across a problem with this article's code. i will try to explain the
use case. after you insert a few contacts, open another browser, you can see
same screen on both browsers. after deleting a contact from a browser you
are still seeing deleted contact. after that, click the deleted contact's
edit link. you will see different contact that you can edit. it is because
detachable model can load different subset of records and component only
gets the index of a record from http request, not id of a record. how can i
solve this problem?
-- 
View this message in context: 
http://www.nabble.com/Article%3A-Introducing-Apache-Wicket-tp15142773p15183311.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]



Re: Article: Introducing Apache Wicket

2008-01-30 Thread Johan Compagner
the loadable detachable model should have the pk of the contact itself thats
behind the edit link

On Jan 30, 2008 3:59 PM, dozgurc [EMAIL PROTECTED] wrote:


 i came across a problem with this article's code. i will try to explain
 the
 use case. after you insert a few contacts, open another browser, you can
 see
 same screen on both browsers. after deleting a contact from a browser you
 are still seeing deleted contact. after that, click the deleted contact's
 edit link. you will see different contact that you can edit. it is because
 detachable model can load different subset of records and component only
 gets the index of a record from http request, not id of a record. how can
 i
 solve this problem?
 --
 View this message in context:
 http://www.nabble.com/Article%3A-Introducing-Apache-Wicket-tp15142773p15183311.html
 Sent from the Wicket - User mailing list archive at 
 Nabble.comhttp://nabble.com/
 .


 -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




Re: Article: Introducing Apache Wicket

2008-01-30 Thread Nick Heudecker
I think the link in the ListView uses the index of the object in the list,
not the primary key.  That's likely the problem.

On Jan 30, 2008 9:37 AM, Johan Compagner [EMAIL PROTECTED] wrote:

 the loadable detachable model should have the pk of the contact itself
 thats
 behind the edit link

 On Jan 30, 2008 3:59 PM, dozgurc [EMAIL PROTECTED] wrote:

 
  i came across a problem with this article's code. i will try to explain
  the
  use case. after you insert a few contacts, open another browser, you can
  see
  same screen on both browsers. after deleting a contact from a browser
 you
  are still seeing deleted contact. after that, click the deleted
 contact's
  edit link. you will see different contact that you can edit. it is
 because
  detachable model can load different subset of records and component only
  gets the index of a record from http request, not id of a record. how
 can
  i
  solve this problem?
  --
  View this message in context:
 
 http://www.nabble.com/Article%3A-Introducing-Apache-Wicket-tp15142773p15183311.html
  Sent from the Wicket - User mailing list archive at Nabble.com
 http://nabble.com/
  .
 
 
  -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 




-- 
Nick Heudecker
Professional Wicket Training  Consulting
http://www.systemmobile.com

Eventful - Intelligent Event Management
http://www.eventfulhq.com


Re: Article: Introducing Apache Wicket

2008-01-29 Thread jweekend

Karthik,
Thanks for the kind words. 
Just to put the record straight, it was one of our new developers at
jWeekend,  Dmitry Kandalov, that came back with the most useful parts of the
feedback we gave when we reviewed your article and it's always a pleasure
for us to try to help with anything that will increase awareness of how good
Wicket is.
Regards - Cemal
http://jWeekend.co.uk http://jWeekend.co.uk 


karthikg wrote:
 
 This is really nice - covers the basics so well unlike the one that I
 posted
 :) - actually thanks to martijn, cemal, i added a little bit of context to
 my post. I think it makes sense to link to this article first when writing
 a
 blog post - it just clears up the basics so nicely.
 One nice addition to the article IMHO could be a reference of some kind to
 wicket behavior-s.
 
 regards,
 Karthik
 
 
 On Jan 28, 2008 1:02 PM, Nick Heudecker [EMAIL PROTECTED] wrote:
 
 It's finally up:
 http://www.theserverside.com/news/thread.tss?thread_id=48234

 Thanks to the various reviewers that helped improve both the content and
 quality of the article, including Martijn, Eelco, Igor, Gerolf and
 Talios.

 --
 Nick Heudecker
 Professional Wicket Training  Consulting
 http://www.systemmobile.com

 Eventful - Intelligent Event Management
 http://www.eventfulhq.com

 
 
 
 -- 
 -- karthik --
 
 

-- 
View this message in context: 
http://www.nabble.com/Article%3A-Introducing-Apache-Wicket-tp15142773p15159499.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]



Re: Article: Introducing Apache Wicket

2008-01-29 Thread Nick Heudecker
Thanks.

On Jan 29, 2008 6:08 PM, Andy Czerwonka [EMAIL PROTECTED] wrote:


 Nick Heudecker [EMAIL PROTECTED] wrote in message
 news:[EMAIL PROTECTED]
  It's finally up:
  http://www.theserverside.com/news/thread.tss?thread_id=48234
 
  Thanks to the various reviewers that helped improve both the content and
  quality of the article, including Martijn, Eelco, Igor, Gerolf and
 Talios.
 

 Nice work Nick.




 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




Re: Article: Introducing Apache Wicket

2008-01-28 Thread Eelco Hillenius
Very cool Nick, thanks a lot.

Eelco

On Jan 28, 2008 11:02 AM, Nick Heudecker [EMAIL PROTECTED] wrote:
 It's finally up:
 http://www.theserverside.com/news/thread.tss?thread_id=48234

 Thanks to the various reviewers that helped improve both the content and
 quality of the article, including Martijn, Eelco, Igor, Gerolf and Talios.

 --
 Nick Heudecker
 Professional Wicket Training  Consulting
 http://www.systemmobile.com

 Eventful - Intelligent Event Management
 http://www.eventfulhq.com


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Article: Introducing Apache Wicket

2008-01-28 Thread karthik Guru
This is really nice - covers the basics so well unlike the one that I posted
:) - actually thanks to martijn, cemal, i added a little bit of context to
my post. I think it makes sense to link to this article first when writing a
blog post - it just clears up the basics so nicely.
One nice addition to the article IMHO could be a reference of some kind to
wicket behavior-s.

regards,
Karthik


On Jan 28, 2008 1:02 PM, Nick Heudecker [EMAIL PROTECTED] wrote:

 It's finally up:
 http://www.theserverside.com/news/thread.tss?thread_id=48234

 Thanks to the various reviewers that helped improve both the content and
 quality of the article, including Martijn, Eelco, Igor, Gerolf and Talios.

 --
 Nick Heudecker
 Professional Wicket Training  Consulting
 http://www.systemmobile.com

 Eventful - Intelligent Event Management
 http://www.eventfulhq.com




-- 
-- karthik --


Re: Article: Introducing Apache Wicket

2008-01-28 Thread Martijn Dashorst
On 1/28/08, Nick Heudecker [EMAIL PROTECTED] wrote:

 It's finally up:
 http://www.theserverside.com/news/thread.tss?thread_id=48234


It took them a while... though nice timing IMO. news about 1.3 was getting a
bit old, so...

Thanks for writing it!

Martijn


Thanks to the various reviewers that helped improve both the content and
 quality of the article, including Martijn, Eelco, Igor, Gerolf and Talios.

 --
 Nick Heudecker
 Professional Wicket Training  Consulting
 http://www.systemmobile.com

 Eventful - Intelligent Event Management
 http://www.eventfulhq.com




-- 
Buy Wicket in Action: http://manning.com/dashorst
Apache Wicket 1.3.0 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0


Re: Article: Introducing Apache Wicket

2008-01-28 Thread Nick Heudecker
Thanks.  I didn't want to bog the reader down with too many concepts at
once.  I'm hoping to make this a series on TSS to allow for more in-depth
coverage.

On Jan 28, 2008 3:44 PM, karthik Guru [EMAIL PROTECTED] wrote:

 This is really nice - covers the basics so well unlike the one that I
 posted
 :) - actually thanks to martijn, cemal, i added a little bit of context to
 my post. I think it makes sense to link to this article first when writing
 a
 blog post - it just clears up the basics so nicely.
 One nice addition to the article IMHO could be a reference of some kind to
 wicket behavior-s.

 regards,
 Karthik


 On Jan 28, 2008 1:02 PM, Nick Heudecker [EMAIL PROTECTED] wrote:

  It's finally up:
  http://www.theserverside.com/news/thread.tss?thread_id=48234
 
  Thanks to the various reviewers that helped improve both the content and
  quality of the article, including Martijn, Eelco, Igor, Gerolf and
 Talios.
 
  --
  Nick Heudecker
  Professional Wicket Training  Consulting
  http://www.systemmobile.com
 
  Eventful - Intelligent Event Management
  http://www.eventfulhq.com
 



 --
 -- karthik --




-- 
Nick Heudecker
Professional Wicket Training  Consulting
http://www.systemmobile.com

Eventful - Intelligent Event Management
http://www.eventfulhq.com