a) is what I am doing now.

b) is where the problem was, which is what the original question was about.
Please see my opening post.


igor.vaynberg wrote:
> 
> there are two ways to do it:
> 
> a) use a bookmarkablepagelink to go to the cart page and pass in the
> itemid+quantity to be added. this means that the cart page is
> responsible for adding the item to the cart.
> 
> b) use a stateless link to add the item to cart, then
> setResponsePage(CartPage.class) <== to a class not an instance to
> maintain a clean url with a redirect.
> 
> -igor
> 
> 
> On Wed, May 7, 2008 at 10:49 PM, Ritz123 <[EMAIL PROTECTED]> wrote:
>>
>>  Add To Cart links are on the product list page. I want the links to take
>> the
>>  users to view cart page where they can see the cart content.
>>
>>
>>
>>
>>
>>  igor.vaynberg wrote:
>>  >
>>  > so you want it to add something to cart, and then go where? to the
>>  > same page? to the cart page?
>>  >
>>  > -igor
>>  >
>>  >
>>  > On Wed, May 7, 2008 at 9:11 AM, Ritz123 <[EMAIL PROTECTED]>
>> wrote:
>>  >>
>>  >>  Actually I want to "add the product to the cart" and not go to the
>>  >> detail
>>  >>  page. They both are similar operation in a way, but there is one
>> major
>>  >>  difference. View Product has dedicated functionality of just viewing
>> the
>>  >>  product and nothing more, but "View Cart" page will be overloaded
>> with
>>  >> "add
>>  >>  to cart" functionality if I am understanding your point correctly.
>>  >>
>>  >>  This actually brings up interesting design question with Wicket,
>> what
>>  >> would
>>  >>  be the best way to handle these kind of scenarios? In struts world,
>> I
>>  >> had
>>  >>  CartAction - which took care of all the operations (Add, View,
>> Update
>>  >> and
>>  >>  Delete) for Cart, what would be the equivalent design in Wicket?
>>  >>
>>  >>  All the books and available material covers more of "syntactic" part
>> of
>>  >>  Wicket - but none covers the design - that I have found. I may be
>>  >> missing
>>  >>  something and will appreciate any pointers.
>>  >>
>>  >>
>>  >>
>>  >>
>>  >>
>>  >>
>>  >>  igor.vaynberg wrote:
>>  >>  >
>>  >>  > that's what stateless kinks do. If you want to go t a detail page
>> use
>>  >>  > a bookmarkable link, not a stateles one.
>>  >>  >
>>  >>  > -igor
>>  >>  >
>>  >>  >
>>  >>  > On 5/6/08, Ritz123 <[EMAIL PROTECTED]> wrote:
>>  >>  >>
>>  >>  >> Hi,
>>  >>  >>
>>  >>  >> I have a page containing bunch of products and addToCart link
>> next to
>>  >>  >> each
>>  >>  >> product. On clicking the add to cart link, would like to add
>> product
>>  >> to
>>  >>  >> cart. I had Link and onClick() to do this - but recently
>> encountered
>>  >> page
>>  >>  >> expired message which is expected since the page becomes stateful
>> due
>>  >> to
>>  >>  >> the
>>  >>  >> Link.
>>  >>  >>
>>  >>  >> Obviously this page is supposed to be stateless and hence I
>> changed
>>  >> Link
>>  >>  >> to
>>  >>  >> StatelessLink using final product id inside the onclick. Now on
>>  >>  >> application
>>  >>  >> reload(due to hotdeploy) to simulate session expiry, dont get
>> session
>>  >>  >> expired message but link behaves weird in the sense, it seems to
>> be
>>  >>  >> reloading the contained page instead of going to the
>> setResponsePage.
>>  >>  >>
>>  >>  >> Seems like I may be missing something. Is this the right approach
>> in
>>  >>  >> terms
>>  >>  >> of making the page stateless?
>>  >>  >> --
>>  >>  >> View this message in context:
>>  >>  >>
>> http://www.nabble.com/Stateless-link-usage-tp17093682p17093682.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]
>>  >>  >>
>>  >>  >>
>>  >>  >
>>  >>  >
>> ---------------------------------------------------------------------
>>  >>  > To unsubscribe, e-mail: [EMAIL PROTECTED]
>>  >>  > For additional commands, e-mail: [EMAIL PROTECTED]
>>  >>  >
>>  >>  >
>>  >>  >
>>  >>
>>  >>  --
>>  >>  View this message in context:
>>  >> http://www.nabble.com/Stateless-link-usage-tp17093682p17108713.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]
>>  >>
>>  >>
>>  >
>>  > ---------------------------------------------------------------------
>>  > To unsubscribe, e-mail: [EMAIL PROTECTED]
>>  > For additional commands, e-mail: [EMAIL PROTECTED]
>>  >
>>  >
>>  >
>>
>>  --
>>  View this message in context:
>> http://www.nabble.com/Stateless-link-usage-tp17093682p17120171.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]
>>
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Stateless-link-usage-tp17093682p17127282.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]

Reply via email to