You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by JavaTraveler <me...@gmail.com> on 2018/05/22 09:57:17 UTC

Difficulties

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-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Difficulties

Posted by JavaTraveler <me...@gmail.com>.
Hello !
I managed to do so, and make it a panel, with <wicket:panel>.
But The button still refuse to work ^^
I'm trying anything I can find.

Any idea ?

--
Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html

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


Re: Difficulties

Posted by JavaTraveler <me...@gmail.com>.
All right sorry, it's ok, it works !

I was using, without realising it, a JSF form ^^

Really sorry for the trouble.

--
Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html

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


Re: Difficulties

Posted by Maxim Solodovnik <so...@gmail.com>.
I would make it panel instead of page
In this case you can update panel with search results via ajax ...

WBR, Maxim
(from mobile, sorry for the typos)

On Tue, May 22, 2018, 22:55 JavaTraveler <me...@gmail.com> wrote:

> Yes it is. It shouldn't be ?
>
> My idea was to make a template. A sidebar for searching always available.
>
> --
> Sent from:
> http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

Re: Difficulties

Posted by JavaTraveler <me...@gmail.com>.
Yes it is. It shouldn't be ?

My idea was to make a template. A sidebar for searching always available.

--
Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html

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


Re: Difficulties

Posted by Martin Grigorov <mg...@apache.org>.
Is the button's Form also inside the IFrame ?

On Tue, May 22, 2018 at 5:49 PM, JavaTraveler <me...@gmail.com>
wrote:

> On that subject, I have another question if you don't mind.
> I got troubles with IFrame. I have a submit button in a form inside the
> iFrame. This button doesn't do anything.
>
> But if I do the same button outside of the iframe, everything works fine.
>
> Is this normal ?
>
> --
> Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-
> f1842947.html
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

Re: Difficulties

Posted by JavaTraveler <me...@gmail.com>.
On that subject, I have another question if you don't mind.
I got troubles with IFrame. I have a submit button in a form inside the
iFrame. This button doesn't do anything.

But if I do the same button outside of the iframe, everything works fine.

Is this normal ?

--
Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html

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


Re: Difficulties

Posted by JavaTraveler <me...@gmail.com>.
It works, that's great, thank you so much ! :D

--
Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html

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


Re: Difficulties

Posted by Martin Grigorov <mg...@apache.org>.
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 <me...@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-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>