you shouldnt have to do any of that form updating yourself...it should
all be done before your link's onsubmit is called, there is a reason
why its called a submitlink

-igor


On Tue, Mar 18, 2008 at 7:47 PM, Trevor Campbell <[EMAIL PROTECTED]> wrote:
>
>  Thanks Maurice,
>
>  I was able to get this to work by copying PagingNavigator,
> PagingNavigation, PagingNavigationLink and PagingNavigationIncrementLink.
>
>  The only substantial changes I made were to make PagingNavigationLink and
> PagingNavigationIncrementLink extend SubmitLink and then in the onsubit to
> do some horrible stuff to update the models.
>
>          public void onSubmit()
>          {
>                  pageable.setCurrentPage(getPageNumber());
>                  FormComponent.IVisitor visitor = new
> FormComponent.IVisitor(){
>                      @Override
>                      public Object formComponent(IFormVisitorParticipant
> formComponent)
>                      {
>                          if (formComponent instanceof FormComponent)
>                          {
>                              ((FormComponent) formComponent).validate();
>                              ((FormComponent) formComponent).updateModel();
>                          }
>                          if (formComponent.processChildren())
>                          {
>                                  return
> Component.IVisitor.CONTINUE_TRAVERSAL;
>                          }
>                          else
>                          {
>                                  return
> Component.IVisitor.CONTINUE_TRAVERSAL_BUT_DONT_GO_DEEPER;
>                          }
>                      }
>                  };
>                  getForm().visitFormComponents(visitor);
>          }
>
>  I still haven't got the autoEnable and linksTo functionality working,  but
> it is just some cosmetics.
>
>  Trev
>
>  Maurice Marrink wrote:
>
>  That is a known issue, unfortunately you will need to create your own
> version of a submittingpagingnavigator. The api for those classes is
> however not very extendable friendly so you probably end up
> copy-pasting large portions of code.
> I believe Martijn is planning on refactoring that component, just not
> for wicket 1.3.x.
>
> As an alternative you might be able to use ajaxcheckboxes?
>
> Maurice
>
> On Tue, Mar 18, 2008 at 12:30 PM, Trevor Campbell <[EMAIL PROTECTED]>
> wrote:
>
>
>  I have a form containing a GridView with a PagingNavigator.
>  Within each cell I have an image and a CheckBox. When a user submits
>  the form I collect all the image refs from the selected cells and
>  process them.
>
>  My problem is I would like to do this across multiple pages. So the user
>  scenario is:
>  A user goes through the pages using the navigator and selects, using the
>  checkboxes, what images they like and then presses a select button.
>
>  Unfortunately the selections are not preserved when I use a
>  PagingNavigator on the form. A paging navigator renders links rather
>  than a submit, so any selections are lost.
>
>  Any ideas how to get around this??
>
>
>  ---------------------------------------------------------------------
>  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]
>
>
>
>  --------------------------------------------------------------------- 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]

Reply via email to