You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Gonzalo Aguilar Delgado <ga...@eto-marketing.com> on 2009/08/13 13:43:11 UTC

Portlet and ... 2.0 (How to pass parameters?)

Hi all!, 

I have some questions about parameter passing in portal environment. I
saw that WebPage class can have access to the Application class
but not the portlet class. This makes a little tricky to handle requests
because:

We can set session paramaters. And can call functions inside Application
(WicketExamplesMenuApplication.getExamples()).

@Override
public void onClick()
{
	int index = ((LoopItem)getParent()).getIteration();
	ExampleApplication ea =
WicketExamplesMenuApplication.getExamples().get(
		index + 1);
	PortletSession session =
((PortletRequestContext)RequestContext.get()).getPortletRequest()
		.getPortletSession();

session.setAttribute(WicketExamplesMenuPortlet.EXAMPLE_APPLICATION_ATTR,
ea);
}

But it will be the portlet class the responsible for handling
processing. So the only way to pass information from the onClick
function to the
portlet application for rendering (for example) is using the portlet
session.

But I suppose that's not the preferred way.


What's the best way to pass information to the portlet class? Is there
any way to use the portlet class like we use the application class
(WicketExamplesMenuApplication.getExamples() ->
WicketExamplesMenuPortlet.getExamples())


I also saw that in the portlet example, the examples structure is
initialized by the WicketExamplesMenuPortlet and sent to the
WicketExamplesMenuApplication using the servlet context. But this will
overbloat the servlet attributes storage space. Also this should be
solved if webpages could access to the portlet class directly.

Why to do this way?



I want to know all this because I want to use shared render parameters
(I put there a user id and all the portlets update accordingly). To do
this I will do:



        1.- Onclick: Put the Id on the session like above.
        2.- Portlet.DoView: Recover id from session and store it in
        shared render params.
        3.- Delete it from session.
        

Is this the correct way to do it?


Thank you very much in advance...



Re: Portlet and ... 2.0 (How to pass parameters?)

Posted by Gonzalo Aguilar Delgado <ga...@aguilardelgado.com>.
Hi Rob, 

I want to do it because my application is composed of several portlets.
If you click on one customer, for ex. you will want 
other portlets to show information relative to the customer you have
just clicked.

This is why you will need shared-parameters. That is inside portlet 2.0
spec.

The other way to do it is with events. But this is not mature enough.




El jue, 13-08-2009 a las 22:01 +0200, Rob Sonke escribió:

> Could you maybe explain why you need it? Do you want to pass data inside 
> your portlet or to another portlet?
> 
> Rob
> 
> On 8/13/09 1:43 PM, Gonzalo Aguilar Delgado wrote:
> > Hi all!,
> >
> > I have some questions about parameter passing in portal environment. I
> > saw that WebPage class can have access to the Application class
> > but not the portlet class. This makes a little tricky to handle requests
> > because:
> >
> > We can set session paramaters. And can call functions inside Application
> > (WicketExamplesMenuApplication.getExamples()).
> >
> > @Override
> > public void onClick()
> > {
> > 	int index = ((LoopItem)getParent()).getIteration();
> > 	ExampleApplication ea =
> > WicketExamplesMenuApplication.getExamples().get(
> > 		index + 1);
> > 	PortletSession session =
> > ((PortletRequestContext)RequestContext.get()).getPortletRequest()
> > 		.getPortletSession();
> >
> > session.setAttribute(WicketExamplesMenuPortlet.EXAMPLE_APPLICATION_ATTR,
> > ea);
> > }
> >
> > But it will be the portlet class the responsible for handling
> > processing. So the only way to pass information from the onClick
> > function to the
> > portlet application for rendering (for example) is using the portlet
> > session.
> >
> > But I suppose that's not the preferred way.
> >
> >
> > What's the best way to pass information to the portlet class? Is there
> > any way to use the portlet class like we use the application class
> > (WicketExamplesMenuApplication.getExamples() ->
> > WicketExamplesMenuPortlet.getExamples())
> >
> >
> > I also saw that in the portlet example, the examples structure is
> > initialized by the WicketExamplesMenuPortlet and sent to the
> > WicketExamplesMenuApplication using the servlet context. But this will
> > overbloat the servlet attributes storage space. Also this should be
> > solved if webpages could access to the portlet class directly.
> >
> > Why to do this way?
> >
> >
> >
> > I want to know all this because I want to use shared render parameters
> > (I put there a user id and all the portlets update accordingly). To do
> > this I will do:
> >
> >
> >
> >          1.- Onclick: Put the Id on the session like above.
> >          2.- Portlet.DoView: Recover id from session and store it in
> >          shared render params.
> >          3.- Delete it from session.
> >
> >
> > Is this the correct way to do it?
> >
> >
> > Thank you very much in advance...
> >
> >
> >
> >    
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org

Re: Portlet and ... 2.0 (How to pass parameters?)

Posted by Rob Sonke <ro...@tigrou.nl>.
Could you maybe explain why you need it? Do you want to pass data inside 
your portlet or to another portlet?

Rob

On 8/13/09 1:43 PM, Gonzalo Aguilar Delgado wrote:
> Hi all!,
>
> I have some questions about parameter passing in portal environment. I
> saw that WebPage class can have access to the Application class
> but not the portlet class. This makes a little tricky to handle requests
> because:
>
> We can set session paramaters. And can call functions inside Application
> (WicketExamplesMenuApplication.getExamples()).
>
> @Override
> public void onClick()
> {
> 	int index = ((LoopItem)getParent()).getIteration();
> 	ExampleApplication ea =
> WicketExamplesMenuApplication.getExamples().get(
> 		index + 1);
> 	PortletSession session =
> ((PortletRequestContext)RequestContext.get()).getPortletRequest()
> 		.getPortletSession();
>
> session.setAttribute(WicketExamplesMenuPortlet.EXAMPLE_APPLICATION_ATTR,
> ea);
> }
>
> But it will be the portlet class the responsible for handling
> processing. So the only way to pass information from the onClick
> function to the
> portlet application for rendering (for example) is using the portlet
> session.
>
> But I suppose that's not the preferred way.
>
>
> What's the best way to pass information to the portlet class? Is there
> any way to use the portlet class like we use the application class
> (WicketExamplesMenuApplication.getExamples() ->
> WicketExamplesMenuPortlet.getExamples())
>
>
> I also saw that in the portlet example, the examples structure is
> initialized by the WicketExamplesMenuPortlet and sent to the
> WicketExamplesMenuApplication using the servlet context. But this will
> overbloat the servlet attributes storage space. Also this should be
> solved if webpages could access to the portlet class directly.
>
> Why to do this way?
>
>
>
> I want to know all this because I want to use shared render parameters
> (I put there a user id and all the portlets update accordingly). To do
> this I will do:
>
>
>
>          1.- Onclick: Put the Id on the session like above.
>          2.- Portlet.DoView: Recover id from session and store it in
>          shared render params.
>          3.- Delete it from session.
>
>
> Is this the correct way to do it?
>
>
> Thank you very much in advance...
>
>
>
>    

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


Re: If you want to use form in modal window component make sure that you put the modal window itself in another form (nesting forms is legal in Wicket).

Posted by nino martinez wael <ni...@gmail.com>.
I've certainly not done it so.

I think it means that if your form has a modal window in it, form
components in the modal window should be in a form it self so it is
self contained.

2009/8/14 Stefan Lindner <li...@visionet.de>:
> Could someone please explain this a little bit more: " If you want to use form in modal window component make sure that you put the modal window itself in another form (nesting forms is legal in Wicket)"
>
> Does it mean HTML
>
>        <form><div wicket:id="modalWindow"/></form>
>
> and Java
>
>        ModalWindow mw = new ModalWindow("modalWindow");
>        mw.setcontent(newPanelWithFormInside);
>
> is recomended?
>
>
> Stefan
>

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


If you want to use form in modal window component make sure that you put the modal window itself in another form (nesting forms is legal in Wicket).

Posted by Stefan Lindner <li...@visionet.de>.
Could someone please explain this a little bit more: " If you want to use form in modal window component make sure that you put the modal window itself in another form (nesting forms is legal in Wicket)"

Does it mean HTML

	<form><div wicket:id="modalWindow"/></form>

and Java

	ModalWindow mw = new ModalWindow("modalWindow");
	mw.setcontent(newPanelWithFormInside);

is recomended?


Stefan

Manipulate POST Parameters

Posted by Hop Ney <xs...@yahoo.com>.
In my JAVA code, I can change the values of my Form Components by merely changing the values through
'getModelObject' method. 

I am using PAROS (http://www.parosproxy.org/) to proxy my request. When I check the POST parameters, the values have not change. 
But when I debug my application, the ModelObject Value for my Component has alrready been altered.

Please help.


      Try the new Yahoo! Messenger. Now with all you love about messenger and more! http://ph.messenger.yahoo.com

Re: Portlet and ... 2.0 (How to pass parameters?)

Posted by Gonzalo Aguilar Delgado <ga...@aguilardelgado.com>.
Spam detection software, running on the system "azul3.aguilardelgado.com", has
identified this incoming email as possible spam.  The original message
has been attached to this so you can view it (if it isn't spam) or label
similar future email.  If you have any questions, see
the administrator of that system for details.

Content preview:  Hi Rob, Yep, of course is more beautiful!!! :D But I did not
   know that you can cast a PortletResponse to an action response... [...] 

Content analysis details:   (5.5 points, 5.0 required)

 pts rule name              description
---- ---------------------- --------------------------------------------------
 0.5 RCVD_IN_PBL            RBL: Received via a relay in Spamhaus PBL
                            [87.223.212.129 listed in zen.spamhaus.org]
 1.6 RCVD_IN_SORBS_DUL      RBL: SORBS: sent directly from dynamic IP address
                            [87.223.212.129 listed in dnsbl.sorbs.net]
 1.0 EXTRA_MPART_TYPE       Header has extraneous Content-type:...type= entry
 2.3 DATE_IN_PAST_96_XX     Date: is 96 hours or more before Received: date
 0.0 HTML_MESSAGE           BODY: HTML included in message
 0.1 RDNS_DYNAMIC           Delivered to trusted network by host with
                            dynamic-looking rDNS
 0.0 DYN_RDNS_AND_INLINE_IMAGE Contains image, and was sent by dynamic
                            rDNS

The original message was not completely plain text, and may be unsafe to
open with some email clients; in particular, it may contain a virus,
or confirm that your address can receive spam.  If you wish to view
it, it may be safer to save it to a file and open it with an editor.


Re: Portlet and ... 2.0 (How to pass parameters?)

Posted by Rob Sonke <ro...@tigrou.nl>.
It's up to you but I think there is a more beautiful/easier way. Just 
configure the public render params the same in the portlet.xml. Use this 
to set params in e.g. an onClick:

ActionResponse actionResponse = (ActionResponse) 
((PortletRequestContext)PortletRequestContext.get()).getPortletResponse();
actionResponse.setRenderParameter(name.getValue(), value);

And this to retrieve a parameter anywhere:
PortletRequestContext prc = (PortletRequestContext)RequestContext.get();
Map<String, String[]> map = prc.getPortletRequest().getPublicParameterMap();
map.get(name.getValue());

But that's up to you :)

Rob

On 8/14/09 1:50 AM, Gonzalo Aguilar Delgado wrote:
> Hi all!
>
> I managed to do it with wicket 1.4. This is how:
>
> Define it in portlet.xml
>
> <portlet-app>
> ...
> <public-render-parameter>
>          <identifier>crmportal:userId</identifier>
>          <qname
> xmlns:x="http://www.level2crm.com/params">x:userId</qname>
> </public-render-parameter>
> </portlet-app>
>
> Every portlet that will use it must also be configured with:
> <portlet>
> ...
> <supported-public-render-parameter>crmportal:userId</supported-public-render-parameter>
> </portlet>
>
> After doing this the portlet must have access to this parameter. But as
> I have not access from Page processing to the
> Wicket Portlet class I should hold the variable in session for a while:
>
>                                  Link link = new Link("id", new
> PropertyModel<String>(userObject, "uuid.uuid"))
> 				{
> 					@Override
> 					public void onClick()
> 					{
> 					
> 						UUID uuid =  (UUID) this.getModelObject();
> 						
> 						PortletSession session =
> ((PortletRequestContext)RequestContext.get()).getPortletRequest()
> 							.getPortletSession();
> 						session.setAttribute(CustomerListPortlet.CURRENT_UUID,
> uuid.toString());
> 					}
> 				};
>
>
> And after in the function processActionResponseState we can set the
> public parameter after we recover it from session.
>
> 	@Override
> 	protected void processActionResponseState(String wicketURL,
> 			String wicketFilterPath, String wicketFilterQuery,
> 			PortletRequest request, ActionResponse response,
> 			WicketResponseState responseState) throws PortletException,
> 			IOException {
> 		
> 		PortletSession session = request.getPortletSession();
> 		String uuid = (String)session.getAttribute(CURRENT_UUID);
> 		if(uuid!=null)
> 		{
> 			response.setRenderParameter("crmportal:userId", uuid);
> 		}
> 		
> 		// TODO Auto-generated method stub
> 		super.processActionResponseState(wicketURL, wicketFilterPath,
> 				wicketFilterQuery, request, response, responseState);
> 	}
>
>
>
> The other portlets will see this public render parameter as normal
> parameter (NOTE: I don't know why not differentiate from the rest of
> parameters. Can it have security considerations?).
>
> This is accessible directly in the page (This is other portlet and other
> application inside the portal):
> 	IModel loadableUserModel = new LoadableDetachableModel() {
> 		
> 		@Override
> 		protected Object load(){
> 			User selectedUser = null;
> 			String value =
> ((PortletRequestContext)RequestContext.get()).getPortletRequest().getParameter("crmportal:userId");
> 			if(value!=null)
> 			{
> 				UuidUserType uuid = UuidUserType.fromString(value);
> 				selectedUser = userDAO.find(uuid);
> 				
> 				if(!userDAO.isAttached(selectedUser))
> 				{
> 					userDAO.save(selectedUser); //Attach it
> 				}
> 				
> 				Set<ContactBasicDetail>  setDetails =
> selectedUser.getContactBasicDetails();
> 				setDetails.isEmpty();
> 				
> 				return setDetails.toArray();
> 			}
> 			return null;
> 		}
> 		
> 		
> 	};
>
>
> It seems to work right.
>
> But means are subject of discussion...
>
> Tnx
>
>
> El jue, 13-08-2009 a las 13:43 +0200, Gonzalo Aguilar Delgado escribió:
>
>    
>> Hi all!,
>>
>> I have some questions about parameter passing in portal environment. I
>> saw that WebPage class can have access to the Application class
>> but not the portlet class. This makes a little tricky to handle requests
>> because:
>>
>> We can set session paramaters. And can call functions inside Application
>> (WicketExamplesMenuApplication.getExamples()).
>>
>> @Override
>> public void onClick()
>> {
>> 	int index = ((LoopItem)getParent()).getIteration();
>> 	ExampleApplication ea =
>> WicketExamplesMenuApplication.getExamples().get(
>> 		index + 1);
>> 	PortletSession session =
>> ((PortletRequestContext)RequestContext.get()).getPortletRequest()
>> 		.getPortletSession();
>>
>> session.setAttribute(WicketExamplesMenuPortlet.EXAMPLE_APPLICATION_ATTR,
>> ea);
>> }
>>
>> But it will be the portlet class the responsible for handling
>> processing. So the only way to pass information from the onClick
>> function to the
>> portlet application for rendering (for example) is using the portlet
>> session.
>>
>> But I suppose that's not the preferred way.
>>
>>
>> What's the best way to pass information to the portlet class? Is there
>> any way to use the portlet class like we use the application class
>> (WicketExamplesMenuApplication.getExamples() ->
>> WicketExamplesMenuPortlet.getExamples())
>>
>>
>> I also saw that in the portlet example, the examples structure is
>> initialized by the WicketExamplesMenuPortlet and sent to the
>> WicketExamplesMenuApplication using the servlet context. But this will
>> overbloat the servlet attributes storage space. Also this should be
>> solved if webpages could access to the portlet class directly.
>>
>> Why to do this way?
>>
>>
>>
>> I want to know all this because I want to use shared render parameters
>> (I put there a user id and all the portlets update accordingly). To do
>> this I will do:
>>
>>
>>
>>          1.- Onclick: Put the Id on the session like above.
>>          2.- Portlet.DoView: Recover id from session and store it in
>>          shared render params.
>>          3.- Delete it from session.
>>
>>
>> Is this the correct way to do it?
>>
>>
>> Thank you very much in advance...
>>
>>
>>      
>    

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


Re: Portlet and ... 2.0 (How to pass parameters?)

Posted by Gonzalo Aguilar Delgado <ga...@aguilardelgado.com>.
Hi all!

I managed to do it with wicket 1.4. This is how:

Define it in portlet.xml

<portlet-app>
...
<public-render-parameter>
        <identifier>crmportal:userId</identifier>
        <qname
xmlns:x="http://www.level2crm.com/params">x:userId</qname>
</public-render-parameter>
</portlet-app>

Every portlet that will use it must also be configured with:
<portlet>
...
<supported-public-render-parameter>crmportal:userId</supported-public-render-parameter>
</portlet>

After doing this the portlet must have access to this parameter. But as
I have not access from Page processing to the
Wicket Portlet class I should hold the variable in session for a while:

                                Link link = new Link("id", new
PropertyModel<String>(userObject, "uuid.uuid"))
				{
					@Override
					public void onClick()
					{
					
						UUID uuid =  (UUID) this.getModelObject();
						
						PortletSession session =
((PortletRequestContext)RequestContext.get()).getPortletRequest()
							.getPortletSession();
						session.setAttribute(CustomerListPortlet.CURRENT_UUID,
uuid.toString());
					}
				};


And after in the function processActionResponseState we can set the
public parameter after we recover it from session.

	@Override
	protected void processActionResponseState(String wicketURL,
			String wicketFilterPath, String wicketFilterQuery,
			PortletRequest request, ActionResponse response,
			WicketResponseState responseState) throws PortletException,
			IOException {
		
		PortletSession session = request.getPortletSession();
		String uuid = (String)session.getAttribute(CURRENT_UUID);
		if(uuid!=null)
		{
			response.setRenderParameter("crmportal:userId", uuid);
		}
		
		// TODO Auto-generated method stub
		super.processActionResponseState(wicketURL, wicketFilterPath,
				wicketFilterQuery, request, response, responseState);
	}



The other portlets will see this public render parameter as normal
parameter (NOTE: I don't know why not differentiate from the rest of
parameters. Can it have security considerations?). 

This is accessible directly in the page (This is other portlet and other
application inside the portal):
	IModel loadableUserModel = new LoadableDetachableModel() {
		
		@Override
		protected Object load(){
			User selectedUser = null;
			String value =
((PortletRequestContext)RequestContext.get()).getPortletRequest().getParameter("crmportal:userId");
			if(value!=null)
			{
				UuidUserType uuid = UuidUserType.fromString(value);
				selectedUser = userDAO.find(uuid);
				
				if(!userDAO.isAttached(selectedUser))
				{
					userDAO.save(selectedUser); //Attach it
				}
				
				Set<ContactBasicDetail> setDetails =
selectedUser.getContactBasicDetails();
				setDetails.isEmpty();
				
				return setDetails.toArray();
			}
			return null;
		}
		
		
	};


It seems to work right.

But means are subject of discussion...

Tnx


El jue, 13-08-2009 a las 13:43 +0200, Gonzalo Aguilar Delgado escribió:

> Hi all!, 
> 
> I have some questions about parameter passing in portal environment. I
> saw that WebPage class can have access to the Application class
> but not the portlet class. This makes a little tricky to handle requests
> because:
> 
> We can set session paramaters. And can call functions inside Application
> (WicketExamplesMenuApplication.getExamples()).
> 
> @Override
> public void onClick()
> {
> 	int index = ((LoopItem)getParent()).getIteration();
> 	ExampleApplication ea =
> WicketExamplesMenuApplication.getExamples().get(
> 		index + 1);
> 	PortletSession session =
> ((PortletRequestContext)RequestContext.get()).getPortletRequest()
> 		.getPortletSession();
> 
> session.setAttribute(WicketExamplesMenuPortlet.EXAMPLE_APPLICATION_ATTR,
> ea);
> }
> 
> But it will be the portlet class the responsible for handling
> processing. So the only way to pass information from the onClick
> function to the
> portlet application for rendering (for example) is using the portlet
> session.
> 
> But I suppose that's not the preferred way.
> 
> 
> What's the best way to pass information to the portlet class? Is there
> any way to use the portlet class like we use the application class
> (WicketExamplesMenuApplication.getExamples() ->
> WicketExamplesMenuPortlet.getExamples())
> 
> 
> I also saw that in the portlet example, the examples structure is
> initialized by the WicketExamplesMenuPortlet and sent to the
> WicketExamplesMenuApplication using the servlet context. But this will
> overbloat the servlet attributes storage space. Also this should be
> solved if webpages could access to the portlet class directly.
> 
> Why to do this way?
> 
> 
> 
> I want to know all this because I want to use shared render parameters
> (I put there a user id and all the portlets update accordingly). To do
> this I will do:
> 
> 
> 
>         1.- Onclick: Put the Id on the session like above.
>         2.- Portlet.DoView: Recover id from session and store it in
>         shared render params.
>         3.- Delete it from session.
>         
> 
> Is this the correct way to do it?
> 
> 
> Thank you very much in advance...
> 
> 

Re: SV: Portlet and ... 2.0 (How to pass parameters?)

Posted by Gonzalo Aguilar Delgado <ga...@aguilardelgado.com>.

El jue, 13-08-2009 a las 14:46 +0200, Wilhelmsen Tor Iver escribió:

> > But it will be the portlet class the responsible for handling
> > processing. So the only way to pass information from the onClick
> > function to the
> > portlet application for rendering (for example) is using the portlet
> > session.
> 
> But why would you want to go via the Application? The WicketPortlet is mostly just the "front controller" responsible for mapping between the "portlet world" and the "Wicket world": Either use a custom WebSession for the portlet app, or pass the values you need in the PageParameters you send to the response page in your onClick()/onSubmit(). This assumes the onClick() is for a link on a Page that is part of the portlet application. Rendering is left to these Pages.


I have no means to access my portlet from the page. How can you do it?



> 
> > I also saw that in the portlet example, the examples structure is
> > initialized by the WicketExamplesMenuPortlet and sent to the
> > WicketExamplesMenuApplication using the servlet context. But this will
> > overbloat the servlet attributes storage space. Also this should be
> > solved if webpages could access to the portlet class directly.
> > 
> > Why to do this way?
> 
> The Examples portlet is a bit strange compared to how you would normally do things it seems.


Yep. I configured the application in 5 different ways. I have to mix
Spring+ Wicket+Hibernate+Portlets... It's a mess. 
But now it works perfectly. And curiously is a way I've never seen
before. You don't need portlet beans... Normally you do...



> 
> >         1.- Onclick: Put the Id on the session like above.
> >         2.- Portlet.DoView: Recover id from session and store it in
> >         shared render params.
> >         3.- Delete it from session.
> > 
> > 
> > Is this the correct way to do it?
> 
> You could try making "normal" PortletURLs instead of using Wicket Link elements; use setProperty()/addProperty() to set the portlet parameter. Presumably Wicket's Portlet API implementation will deal with the mapping just as it does today with mapping to and from PageParameters.


Nope. With normal parameters the other portlets must not see them!!! If
so it's a security error. Every portlet must be isolated.





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

SV: Portlet and ... 2.0 (How to pass parameters?)

Posted by Wilhelmsen Tor Iver <To...@arrive.no>.
> But it will be the portlet class the responsible for handling
> processing. So the only way to pass information from the onClick
> function to the
> portlet application for rendering (for example) is using the portlet
> session.

But why would you want to go via the Application? The WicketPortlet is mostly just the "front controller" responsible for mapping between the "portlet world" and the "Wicket world": Either use a custom WebSession for the portlet app, or pass the values you need in the PageParameters you send to the response page in your onClick()/onSubmit(). This assumes the onClick() is for a link on a Page that is part of the portlet application. Rendering is left to these Pages.

> I also saw that in the portlet example, the examples structure is
> initialized by the WicketExamplesMenuPortlet and sent to the
> WicketExamplesMenuApplication using the servlet context. But this will
> overbloat the servlet attributes storage space. Also this should be
> solved if webpages could access to the portlet class directly.
> 
> Why to do this way?

The Examples portlet is a bit strange compared to how you would normally do things it seems.

>         1.- Onclick: Put the Id on the session like above.
>         2.- Portlet.DoView: Recover id from session and store it in
>         shared render params.
>         3.- Delete it from session.
> 
> 
> Is this the correct way to do it?

You could try making "normal" PortletURLs instead of using Wicket Link elements; use setProperty()/addProperty() to set the portlet parameter. Presumably Wicket's Portlet API implementation will deal with the mapping just as it does today with mapping to and from PageParameters.

- Tor Iver

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