Re: How to combine a form and a link that submit the same page?

2010-07-09 Thread Kevin Stembridge
Thanks for the pointers Martin.

Nope, I'm not parsing parameters manually.
I don't have paging buttons, just links that are not part of a form.

I decided to sidestep the whole issue by using the DataView and DataProvider
classes. I was hoping to do things in a more stateless way but I guess
that's more trouble than its worth for now.

Thanks for the help.




On 9 July 2010 00:21, Martin Makundi martin.maku...@koodaripalvelut.comwrote:

 Hi!

 Few points to consider:

 1. I hope you do not parse pageParameters manually, let wicket handle
 that for simple cases.

 2. Don't allow your paging buttons to submit data, set
 button.setDefaultFormProcessing(false);

 3. Separate your search form and other forms from each other:

 form search form
 search criteria
 /form

 div other content
  form some other forms.../form
 /div


 **
 Martin


 2010/7/9 Kevin Stembridge kevin.stembri...@gmail.com:
  Hi folks,
 
  I'm trying to write a page that displays search results. The page
 contains a
  form allowing the user to input search criteria. It also displays the
 list
  of results with links for paging back and forth through the result set.
 
  I'm having a bit of trouble because the pageParameters coming from the
 form
  can be in conflict with the pageParameters coming from the paging
 navigation
  links.
 
  For example:
  A user enters a name in the form, submits it and the results are
 displayed.
  If they then use the paging navigation link to display the second page,
 the
  query parameters will contain the name first entered in the form. If the
  user enters a new name in the form and submits it again, the page
 parameters
  will contain both names.
 
  So the question is, when I submit the form, how do I ignore any
  pageParameters that weren't actually from the form?
 
  Cheers,
  Kevin
 

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




Re: How to combine a form and a link that submit the same page?

2010-07-09 Thread Martin Makundi
If you want to make dataview stateless I believe you can achieve it
with some url encoding scheme... ;]

2010/7/9 Kevin Stembridge kevin.stembri...@gmail.com:
 Thanks for the pointers Martin.

 Nope, I'm not parsing parameters manually.
 I don't have paging buttons, just links that are not part of a form.

 I decided to sidestep the whole issue by using the DataView and DataProvider
 classes. I was hoping to do things in a more stateless way but I guess
 that's more trouble than its worth for now.

 Thanks for the help.




 On 9 July 2010 00:21, Martin Makundi 
 martin.maku...@koodaripalvelut.comwrote:

 Hi!

 Few points to consider:

 1. I hope you do not parse pageParameters manually, let wicket handle
 that for simple cases.

 2. Don't allow your paging buttons to submit data, set
 button.setDefaultFormProcessing(false);

 3. Separate your search form and other forms from each other:

 form search form
 search criteria
 /form

 div other content
  form some other forms.../form
 /div


 **
 Martin


 2010/7/9 Kevin Stembridge kevin.stembri...@gmail.com:
  Hi folks,
 
  I'm trying to write a page that displays search results. The page
 contains a
  form allowing the user to input search criteria. It also displays the
 list
  of results with links for paging back and forth through the result set.
 
  I'm having a bit of trouble because the pageParameters coming from the
 form
  can be in conflict with the pageParameters coming from the paging
 navigation
  links.
 
  For example:
  A user enters a name in the form, submits it and the results are
 displayed.
  If they then use the paging navigation link to display the second page,
 the
  query parameters will contain the name first entered in the form. If the
  user enters a new name in the form and submits it again, the page
 parameters
  will contain both names.
 
  So the question is, when I submit the form, how do I ignore any
  pageParameters that weren't actually from the form?
 
  Cheers,
  Kevin
 

 -
 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



How to combine a form and a link that submit the same page?

2010-07-08 Thread Kevin Stembridge
Hi folks,

I'm trying to write a page that displays search results. The page contains a
form allowing the user to input search criteria. It also displays the list
of results with links for paging back and forth through the result set.

I'm having a bit of trouble because the pageParameters coming from the form
can be in conflict with the pageParameters coming from the paging navigation
links.

For example:
A user enters a name in the form, submits it and the results are displayed.
If they then use the paging navigation link to display the second page, the
query parameters will contain the name first entered in the form. If the
user enters a new name in the form and submits it again, the page parameters
will contain both names.

So the question is, when I submit the form, how do I ignore any
pageParameters that weren't actually from the form?

Cheers,
Kevin


Re: How to combine a form and a link that submit the same page?

2010-07-08 Thread Martin Makundi
Hi!

Few points to consider:

1. I hope you do not parse pageParameters manually, let wicket handle
that for simple cases.

2. Don't allow your paging buttons to submit data, set
button.setDefaultFormProcessing(false);

3. Separate your search form and other forms from each other:

form search form
search criteria
/form

div other content
  form some other forms.../form
/div


**
Martin


2010/7/9 Kevin Stembridge kevin.stembri...@gmail.com:
 Hi folks,

 I'm trying to write a page that displays search results. The page contains a
 form allowing the user to input search criteria. It also displays the list
 of results with links for paging back and forth through the result set.

 I'm having a bit of trouble because the pageParameters coming from the form
 can be in conflict with the pageParameters coming from the paging navigation
 links.

 For example:
 A user enters a name in the form, submits it and the results are displayed.
 If they then use the paging navigation link to display the second page, the
 query parameters will contain the name first entered in the form. If the
 user enters a new name in the form and submits it again, the page parameters
 will contain both names.

 So the question is, when I submit the form, how do I ignore any
 pageParameters that weren't actually from the form?

 Cheers,
 Kevin


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