In the onClick() handler of your link, you can call setResponsePage()
with either the id in question, or pass in the full object:

add(new Link("showSubFamily"){
                         private static final long serialVersionUID = 1L;
                         @Override
                         public void onClick() {
                                 setResponsePage(new SubFamilyPage(id)); // or:
setResponsePage(new SubFamilyPage(family));
                         }
                 });


Of course, the SubFamilyPage needs a constructor that accepts the used
parameter.

Hope that helped.

Bert

On Mon, Jan 18, 2010 at 10:58, Ashika Umanga Umagiliya
<auma...@biggjapan.com> wrote:
> My Domain model has 'Family' which has many 'SubFamily' objects.
>
> I managed to display the 'Family' information using a DataTable in
> 'FamilyPage'.
> Now I want to do is,when user clicks on a 'Family Id' the 'SubFamilyPage'
> should open and display relavant subfamilies in a datatable.
> I want to know how this events work together , I am wondering whether I have
> to use HTTP parameters like in JSP pages.
>
> Sorry for my ignorant , I am quite a newbie to Wicket.
>
> Regards.
>
> FamilyPage                 SubFamilesPage
>
> |FamiliesTable|          |SubFamilesTable|
> |_____________|          |_______________|
> | FamilidId 1 |--------->| sub families  |
> | FamilidId 1 |          | belong to id 1|
>
>
> ---------------------------------------------------------------------
> 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

Reply via email to