Hi,

Welcome to Wicket!

Wicket's Page is like a complete HTML page in the browser.
The only way to include one HTML page in another in the browser is by using
(i)frames. So in Wicket it is the same, see InlineFrame.java.

If you want to reuse just part of the page then you need Wicket Panel. A
panel is usually associated with any container-like HTML element that could
be in the <body> (e.g. <div>, <ul>, <span>, etc.).
So you need to create MyPanel (that extends from Panel) and then add it to
PageA, PageB, ...
This Panel can be a <div> that is the only child of <body>!


On Tue, May 22, 2018 at 12:57 PM, JavaTraveler <meteor.ei...@gmail.com>
wrote:

> Hello everyone,
>
> I'm extremely new to the wicket Framework. Trying to learn since last week
> :)
>
> I'm searching for some help.
>
> I have made a page that I want to become a side bar. This page has an ejb
> injection in it:
>
> private static final long serialVersionUID = 1L;
>
>         @EJB(name="ejb/marques") private MarqueLocal marqueDAO;
>         @EJB(name="ejb/types") private TypeLocal typeDAO;
>
> //      private ServiceLocal svc= new Service();
>
>
>         final Marque marqueModel = new Marque();
>         final Type typeModel = new Type();
>
>         Form<?> form = new Form("formFiltre");
>
>         private List<Marque> marques = new ArrayList<Marque>();
>
>         private List<Type> types= new ArrayList<Type>();
>
>
>         public Sidebarleft(final PageParameters parameters) {
>                 super(parameters);
>
>                 marques = marqueDAO.getAll();
>                 final DropDownChoice<Marque> marque = new
> DropDownChoice<Marque>("marque",
> new PropertyModel<Marque>(marqueModel.getLibMarque(), "marques"),
> marques);
>
>                 types = typeDAO.getAll();
>                 final DropDownChoice<Type> type= new
> DropDownChoice<Type>("type", new
> PropertyModel<Type>(typeModel.getLibType(), "types"), types);
>
>
>                 add(form);
>
>                 form.add(marque);
>                 form.add(type);
>     }
>
>
> This works. But, if I want to call this page in another. I only find this
> solution, wich doesnt work since my constructor has no string parameter :
>                 add(sidebarleft = new Sidebarleft("sidebarleft"));
>
>
> Does anyone have any idea ?
>
> In advance, I thank you very much for your help.
>
>
>
> --
> Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-
> f1842947.html
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

Reply via email to