You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by taygolf <ta...@gmail.com> on 2010/08/18 17:59:50 UTC

CloseButtonCallback questions

ok guys I have an issue. I have a popup modal with a datatable. Inside the
data table I have an actionPanel that allows the user to select a value to
pass it back to the main page. All of this works fine and I do some
processing inside the onColick for the select link and I set the
WindowClosedCallback so I can pass my value back to the main page. Again all
of this works fine.

My problem is when the user clicks on the CloseButtonCallback. I would
simply like this button to close the modal without doing anything but of
course it calls everything inside of my windowClosedCallback.

Is there a way to stop the ClosedButtonCallback from calling the
windowClosedCallback. Is there a different way to handle my processing
besides calling windowClosedCallback?

Any advice would be great.

Thanks

T
-- 
View this message in context: http://apache-wicket.1842946.n4.nabble.com/CloseButtonCallback-questions-tp2330058p2330058.html
Sent from the Wicket - User 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: CloseButtonCallback questions

Posted by James Carman <ja...@carmanconsulting.com>.
You can have a variable that contains an indication that something was
done.  In the CloseButtonCallback you clear that variable and in the
WindowClosedCallback you check to see whether that variable reports
that something was done.  If it was, you report to the calling page.
For me, the variable was "selected" (the modal showed a list of things
the user could select).  In my WindowClosedCallback, I did a:

if(selected != null)
{
  callingPage.onSelected(selected)
}

In the CloseButtonCallback, just make sure you do:

selected = null;


On Wed, Aug 18, 2010 at 11:59 AM, taygolf <ta...@gmail.com> wrote:
>
> ok guys I have an issue. I have a popup modal with a datatable. Inside the
> data table I have an actionPanel that allows the user to select a value to
> pass it back to the main page. All of this works fine and I do some
> processing inside the onColick for the select link and I set the
> WindowClosedCallback so I can pass my value back to the main page. Again all
> of this works fine.
>
> My problem is when the user clicks on the CloseButtonCallback. I would
> simply like this button to close the modal without doing anything but of
> course it calls everything inside of my windowClosedCallback.
>
> Is there a way to stop the ClosedButtonCallback from calling the
> windowClosedCallback. Is there a different way to handle my processing
> besides calling windowClosedCallback?
>
> Any advice would be great.
>
> Thanks
>
> T
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/CloseButtonCallback-questions-tp2330058p2330058.html
> Sent from the Wicket - User 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