You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by PDiefent <pd...@gmail.com> on 2016/04/26 15:19:55 UTC

Palette - AJAX functionality

Hello,
I've migrated my Wicket 6 application to Wicket 7 and I got some problems
with a modal window containing a palette component.
In Wicket 7 no updates are visible between the two lists
(available/selected). If I try to move one entry to the opposite list there
is only a short flicker but no entry will be moved.
Unfortunaletly there is no AJAX related example available for Wicket 7 ...
Thanks for any hints
Peter

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Palette-AJAX-functionality-tp4674433.html
Sent from the Users forum mailing list archive at Nabble.com.

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


Re: Palette - AJAX functionality

Posted by PDiefent <pd...@gmail.com>.
Hi Sven,
thanks for your help - looks promising now!
Now I only have to improve the CSS ...
Peter

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Palette-AJAX-functionality-tp4674433p4674460.html
Sent from the Users forum mailing list archive at Nabble.com.

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


Re: Palette - AJAX functionality

Posted by Sven Meier <sv...@meiers.net>.
Hi,

there are multiple things going wrong here:

- you didn't read Palette's javadoc:
  * <strong>Ajaxifying the palette</strong>: If you want to update a 
Palette with an
  * {@link AjaxFormComponentUpdatingBehavior}, you have to attach it to 
the contained
  * {@link Recorder} by overriding {@link #newRecorderComponent()} and 
calling
  * {@link #processInput()}:

- the following example code was bogus (my bad) and should read:

     Palette palette=new Palette(...) {
         protected Recorder newRecorderComponent()
         {
              Recorder recorder=super.newRecorderComponent();
              recorder.add(new AjaxFormComponentUpdatingBehavior("change") {
                 protected void onUpdate(AjaxRequestTarget target) {
                     processInput(); // let Palette process input too
                     ...
                 }
             });
              return recorder;
         }
     }

- as written in the Javadoc too, you have to use unique ids, so your 
example has to be changed to use an id for the choices:

         IChoiceRenderer<TxNewAccount> renderer = new 
ChoiceRenderer<TxNewAccount>("newAccName", "newAccIntAcc");

I'll improved the Javadoc, please let us know whether this fixes your issue.

Have fun
Sven




On 27.04.2016 08:32, PDiefent wrote:
> Hi Sven,
> thanks for your reply. Please find a QickStart attached.
> Peter
> palette.7z
> <http://apache-wicket.1842946.n4.nabble.com/file/n4674453/palette.7z>
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/Palette-AJAX-functionality-tp4674433p4674453.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>


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


Re: Palette - AJAX functionality

Posted by PDiefent <pd...@gmail.com>.
Hi Sven, 
thanks for your reply. Please find a QickStart attached.
Peter
palette.7z
<http://apache-wicket.1842946.n4.nabble.com/file/n4674453/palette.7z>  

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Palette-AJAX-functionality-tp4674433p4674453.html
Sent from the Users forum mailing list archive at Nabble.com.

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


Re: Palette - AJAX functionality

Posted by Sven Meier <sv...@meiers.net>.
Hi,

have you checked whether an Ajax is triggered, possibly losing the 
current selection?

A quickstart would help :)

Sven

On 26.04.2016 15:19, PDiefent wrote:
> Hello,
> I've migrated my Wicket 6 application to Wicket 7 and I got some problems
> with a modal window containing a palette component.
> In Wicket 7 no updates are visible between the two lists
> (available/selected). If I try to move one entry to the opposite list there
> is only a short flicker but no entry will be moved.
> Unfortunaletly there is no AJAX related example available for Wicket 7 ...
> Thanks for any hints
> Peter
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/Palette-AJAX-functionality-tp4674433.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>


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