Tribune

Home » Liferay Portal » English » 3. Development

Vista Combinata Vista Piatta Vista ad Albero
Discussioni [ Precedente | Successivo ]
toggle
lutz Bremen
Variable --> Portlet
10 maggio 2012 7.46
Risposta

lutz Bremen

Punteggio: Expert

Messaggi: 291

Data di Iscrizione: 20 ottobre 2011

Messaggi recenti

Hey guys,

could please somebody help me with a my question.

I want a variable to be given to the search portlet and this should show the results.

so in fact i got a input field on top of the page where i wanna type in a word like "hello". then when i click on the submit button it changes to a page like /web/edv/suche and there should be shown the searchresults in the regular search portlet for the word "hello".

so the problem is how do i gve the "hello" from my texfield to the portlet?

here is my textfield code:

1
2<form id="aui_3_2_0_11519" method="GET" action="/web/edv/suche" name="customsearch">
3                <input type="text" value="" size="30" name="_3_keywords">
4                <input type="submit" value="Suche">
5            </form>


so the variable is named "_3_keyword".

I hope someone knows an answer.

thanks in advance
Priyanka Dhingra
RE: Variable --> Portlet
11 maggio 2012 21.18
Risposta

Priyanka Dhingra

Punteggio: Liferay Master

Messaggi: 501

Data di Iscrizione: 19 dicembre 2011

Messaggi recenti

Hi,
you want the value to be shown after submission only then you can set it in your portlet class using setAttribute and then get in jsp
lutz Bremen
RE: Variable --> Portlet
25 maggio 2012 0.43
Risposta

lutz Bremen

Punteggio: Expert

Messaggi: 291

Data di Iscrizione: 20 ottobre 2011

Messaggi recenti

ok thats not the answer i expected, but thank you.

I'll try to get the word that the user is typing in to get into my search portlet.
Amit Doshi
RE: Variable --> Portlet
25 maggio 2012 10.47
Risposta

Amit Doshi

Punteggio: Liferay Master

Messaggi: 549

Data di Iscrizione: 29 dicembre 2010

Messaggi recenti

Priyanka : -

you want the value to be shown after submission only then you can set it in your portlet class using setAttribute and then get in jsp


GetAttribute and SetAttribute within in the request scope only. It will not work while communicating from one portlet to another portlet.

lutz :-

I think you required IPC(Interportlet communication) between two portlets.

Here is the link that might help you. It will meet your requirements.

http://www.liferay.com/community/wiki/-/wiki/Main/Portlet+to+Portlet+Communication
http://www.liferay.com/community/wiki/-/wiki/Main/Inter-portlet+communication
http://www.liferay.com/community/forums/-/message_boards/message/10158348

Regards,
Amit Doshi
Hitoshi Ozawa
RE: Variable --> Portlet
26 maggio 2012 6.20
Risposta

Hitoshi Ozawa

Punteggio: Liferay Legend

Messaggi: 7949

Data di Iscrizione: 23 marzo 2010

Messaggi recenti

it changes to a page like /web/edv/suche and there should be shown the searchresults in the regular search portlet for the word "hello".


I think this means he's redirecting to another page in the same portlet instead of showing result in a different portlet.
lutz Bremen
RE: Variable --> Portlet
1 giugno 2012 1.20
Risposta

lutz Bremen

Punteggio: Expert

Messaggi: 291

Data di Iscrizione: 20 ottobre 2011

Messaggi recenti

yes i wgot that form that is in the theme and i want the word that i type into that form to be transfered to the searchportlet.