You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Doug Leeper <do...@yahoo.com> on 2012/08/12 15:44:57 UTC

Portlet / ServetWebRequest / WICKET-4387 fix - Introduced a bug???

Troubleshooting my issue where my portlet won't work upon a page refresh, I
came across this in ServletWebRequest.

                 if (forwardAttributes != null || errorAttributes != null)
		{
			if (LOG.isDebugEnabled())
			{
				LOG.debug("Setting filterPrefix('{}') to '' because there is either an
error or a forward. {}, {}",
						new Object[] {filterPrefix, forwardAttributes, errorAttributes});
			}
			// the filter prefix is not needed when the current request is internal
			// see WICKET-4387
  			this.filterPrefix = "";   <<<-------- HERE
		} else
		{
			this.filterPrefix = filterPrefix;
		}


This results in not creating the proper URLs for standard resource classes
such as wicket-ajax.js.  The filterPrefix is needed to load the resources.

When actually set to this.filterPrefix = filterPrefix;

My portlet works as expected.

Any idea how to work around this as this is wicket core?  

Can this code check if in a portal and not clear out this value?



--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Portlet-ServetWebRequest-WICKET-4387-fix-Introduced-a-bug-tp4651153.html
Sent from the Users forum mailing list archive at Nabble.com.

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


Re: Portlet / ServetWebRequest / WICKET-4387 fix - Introduced a bug???

Posted by Doug Leeper <do...@yahoo.com>.
Closure on this one.

Peter Pastrnak did indicate that there was a bug with the "latest"
distribution.  There is a fix that will be available in the next release
from my understanding.  

Peter did send me the updated files and I confirmed that it did fix my
issue.

Thanks Peter!



--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Portlet-ServetWebRequest-WICKET-4387-fix-Introduced-a-bug-tp4651153p4651159.html
Sent from the Users forum mailing list archive at Nabble.com.

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


Re: Portlet / ServetWebRequest / WICKET-4387 fix - Introduced a bug???

Posted by Martin Grigorov <mg...@apache.org>.
On Sun, Aug 12, 2012 at 7:10 PM, pasto <pe...@gmail.com> wrote:
> I think, that this has been fixed in wicket-portlet version 1.5.7.2, which
> can be downloaded from https://issues.apache.org/jira/browse/WICKET-4019
> (which seems to be currently down for maintenance). I checked github, but
> there is also an old version, maybe because wicketstuff 1.5.8 has not been
> released yet (I'm not very familiar with github and wicket release process).
> As I'm not sure, if it is possible to use for wicketstuff version something
> like "1.5.8-SNAPSHOT" (Martin might know), you can just wait and download it
> from there. (or just use the one I sent you by email ;).

Yes, the better bet is to clone the project and build it locally.
There is http://ci.wicketstuff.org/ but as Apache Jenkins instances it
is no very reliable :-/

>
>
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/Portlet-ServetWebRequest-WICKET-4387-fix-Introduced-a-bug-tp4651153p4651156.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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


Re: Portlet / ServetWebRequest / WICKET-4387 fix - Introduced a bug???

Posted by pasto <pe...@gmail.com>.
I think, that this has been fixed in wicket-portlet version 1.5.7.2, which
can be downloaded from https://issues.apache.org/jira/browse/WICKET-4019
(which seems to be currently down for maintenance). I checked github, but
there is also an old version, maybe because wicketstuff 1.5.8 has not been
released yet (I'm not very familiar with github and wicket release process).
As I'm not sure, if it is possible to use for wicketstuff version something
like "1.5.8-SNAPSHOT" (Martin might know), you can just wait and download it
from there. (or just use the one I sent you by email ;).



--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Portlet-ServetWebRequest-WICKET-4387-fix-Introduced-a-bug-tp4651153p4651156.html
Sent from the Users forum mailing list archive at Nabble.com.

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


Re: Portlet / ServetWebRequest / WICKET-4387 fix - Introduced a bug???

Posted by Martin Grigorov <mg...@apache.org>.
Hi,

You may need to introduce PortletWebRequest that borrows code from
ServletWebRequest.
Setup it with WebApplication#newWebRequest()

On Sun, Aug 12, 2012 at 4:44 PM, Doug Leeper <do...@yahoo.com> wrote:
> Troubleshooting my issue where my portlet won't work upon a page refresh, I
> came across this in ServletWebRequest.
>
>                  if (forwardAttributes != null || errorAttributes != null)
>                 {
>                         if (LOG.isDebugEnabled())
>                         {
>                                 LOG.debug("Setting filterPrefix('{}') to '' because there is either an
> error or a forward. {}, {}",
>                                                 new Object[] {filterPrefix, forwardAttributes, errorAttributes});
>                         }
>                         // the filter prefix is not needed when the current request is internal
>                         // see WICKET-4387
>                         this.filterPrefix = "";   <<<-------- HERE
>                 } else
>                 {
>                         this.filterPrefix = filterPrefix;
>                 }
>
>
> This results in not creating the proper URLs for standard resource classes
> such as wicket-ajax.js.  The filterPrefix is needed to load the resources.
>
> When actually set to this.filterPrefix = filterPrefix;
>
> My portlet works as expected.
>
> Any idea how to work around this as this is wicket core?
>
> Can this code check if in a portal and not clear out this value?
>
>
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/Portlet-ServetWebRequest-WICKET-4387-fix-Introduced-a-bug-tp4651153.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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