entityreference show, but links do not work (requestHandlerException)

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

entityreference show, but links do not work (requestHandlerException)

hans_bakker
David?
In webtools the entityreference still work but when i click on a
specific entity on the left, or on 'view data' or 'artifact info'

i get the error message:
org.ofbiz.webapp.control.RequestHandlerException: No defitinition found
for view with name [&]
--
http://www.antwebsystems.com :
Quality OFBiz support for competitive rates....


Reply | Threaded
Open this post in threaded view
|

Re: entityreference show, but links do not work (requestHandlerException)

hans_bakker
it looks like the following string: /control/view//webtools/
is added to the begin of the url causing this problem.....

not only happens in webtools but at many places.....

On Mon, 2009-02-09 at 22:17 +0700, Hans Bakker wrote:
> David?
> In webtools the entityreference still work but when i click on a
> specific entity on the left, or on 'view data' or 'artifact info'
>
> i get the error message:
> org.ofbiz.webapp.control.RequestHandlerException: No defitinition found
> for view with name [&]
--
Antwebsystems.com: Quality OFBiz services for competitive prices

Reply | Threaded
Open this post in threaded view
|

Re: entityreference show, but links do not work (requestHandlerException)

David E Jones-3

On Feb 9, 2009, at 7:34 PM, Hans Bakker wrote:

> it looks like the following string: /control/view//webtools/
> is added to the begin of the url causing this problem.....
>
> not only happens in webtools but at many places.....

Could you be more specific about these "many places"?

I don't think I'll find them by randomly poking around...

Thanks,
-David


> On Mon, 2009-02-09 at 22:17 +0700, Hans Bakker wrote:
>> David?
>> In webtools the entityreference still work but when i click on a
>> specific entity on the left, or on 'view data' or 'artifact info'
>>
>> i get the error message:
>> org.ofbiz.webapp.control.RequestHandlerException: No defitinition  
>> found
>> for view with name [&]
> --
> Antwebsystems.com: Quality OFBiz services for competitive prices
>

Reply | Threaded
Open this post in threaded view
|

Re: entityreference show, but links do not work (requestHandlerException)

hans_bakker
Hi David, please read my original email:

>> In webtools the entityreference still work but when i click on a
> >> specific entity on the left, or on 'view data' or 'artifact info'
> >>
> >> i get the error message:
> >> org.ofbiz.webapp.control.RequestHandlerException: No defitinition  
> >> found
> >> for view with name [&]
>
>
> regards,
> Hans


On Mon, 2009-02-09 at 19:42 -0700, David E Jones wrote:

> On Feb 9, 2009, at 7:34 PM, Hans Bakker wrote:
>
> > it looks like the following string: /control/view//webtools/
> > is added to the begin of the url causing this problem.....
> >
> > not only happens in webtools but at many places.....
>
> Could you be more specific about these "many places"?
>
> I don't think I'll find them by randomly poking around...
>
> Thanks,
> -David
>
>
> > On Mon, 2009-02-09 at 22:17 +0700, Hans Bakker wrote:
> >> David?
> >> In webtools the entityreference still work but when i click on a
> >> specific entity on the left, or on 'view data' or 'artifact info'
> >>
> >> i get the error message:
> >> org.ofbiz.webapp.control.RequestHandlerException: No defitinition  
> >> found
> >> for view with name [&]
> > --
> > Antwebsystems.com: Quality OFBiz services for competitive prices
> >
>
--
Antwebsystems.com: Quality OFBiz services for competitive prices

Reply | Threaded
Open this post in threaded view
|

Re: entityreference show, but links do not work (requestHandlerException)

David E Jones-3

Wait, so by "many places" do you mean many places on that same screen?

I guess I'm having a hard time understanding this...

-David


On Feb 9, 2009, at 7:57 PM, Hans Bakker wrote:

> Hi David, please read my original email:
>>> In webtools the entityreference still work but when i click on a
>>>> specific entity on the left, or on 'view data' or 'artifact info'
>>>>
>>>> i get the error message:
>>>> org.ofbiz.webapp.control.RequestHandlerException: No defitinition
>>>> found
>>>> for view with name [&]
>>
>>
>> regards,
>> Hans
>
>
> On Mon, 2009-02-09 at 19:42 -0700, David E Jones wrote:
>> On Feb 9, 2009, at 7:34 PM, Hans Bakker wrote:
>>
>>> it looks like the following string: /control/view//webtools/
>>> is added to the begin of the url causing this problem.....
>>>
>>> not only happens in webtools but at many places.....
>>
>> Could you be more specific about these "many places"?
>>
>> I don't think I'll find them by randomly poking around...
>>
>> Thanks,
>> -David
>>
>>
>>> On Mon, 2009-02-09 at 22:17 +0700, Hans Bakker wrote:
>>>> David?
>>>> In webtools the entityreference still work but when i click on a
>>>> specific entity on the left, or on 'view data' or 'artifact info'
>>>>
>>>> i get the error message:
>>>> org.ofbiz.webapp.control.RequestHandlerException: No defitinition
>>>> found
>>>> for view with name [&]
>>> --
>>> Antwebsystems.com: Quality OFBiz services for competitive prices
>>>
>>
> --
> Antwebsystems.com: Quality OFBiz services for competitive prices
>

Reply | Threaded
Open this post in threaded view
|

Re: entityreference show, but links do not work (requestHandlerException)

hans_bakker
In reply to this post by David E Jones-3
We are trying to finish the myportal conversion and are a bit stuck
now..... besides that the links in the entity reference not works

click on "preferences" in myportal
in the log it says:
Exception: java.lang.IllegalArgumentException
Message: Could not resolve location to URL:
component://myportal/widget/MyPortalScreens.xml

regards,
Hans

On Mon, 2009-02-09 at 19:42 -0700, David E Jones wrote:

> On Feb 9, 2009, at 7:34 PM, Hans Bakker wrote:
>
> > it looks like the following string: /control/view//webtools/
> > is added to the begin of the url causing this problem.....
> >
> > not only happens in webtools but at many places.....
>
> Could you be more specific about these "many places"?
>
> I don't think I'll find them by randomly poking around...
>
> Thanks,
> -David
>
>
> > On Mon, 2009-02-09 at 22:17 +0700, Hans Bakker wrote:
> >> David?
> >> In webtools the entityreference still work but when i click on a
> >> specific entity on the left, or on 'view data' or 'artifact info'
> >>
> >> i get the error message:
> >> org.ofbiz.webapp.control.RequestHandlerException: No defitinition  
> >> found
> >> for view with name [&]
> > --
> > Antwebsystems.com: Quality OFBiz services for competitive prices
> >
>
--
Antwebsystems.com: Quality OFBiz services for competitive prices

Reply | Threaded
Open this post in threaded view
|

Re: entityreference show, but links do not work (requestHandlerException)

David E Jones-3
In reply to this post by hans_bakker

The problem with these links is they are using an odd way of making  
the URLs, ie like this:

<#assign encodeURL = response.encodeURL(controlPath + "/view/
entityref_main#" + packageName)>
<a href="${encodeURL}" target="entityFrame">${packageName}</a><br/>

...instead of this:

<a href="<@ofbizUrl>view/entityref_main#${packageName}</@ofbizUrl>"
target="entityFrame">${packageName}</a><br/>

I don't know why they were like that and are not using the @ofbizUrl  
built-in (perhaps really old code?), but changing these to use the  
normal pattern fixes the problem of the double-encoding caused by the  
funny pattern.

-David


On Feb 9, 2009, at 8:17 AM, Hans Bakker wrote:

> David?
> In webtools the entityreference still work but when i click on a
> specific entity on the left, or on 'view data' or 'artifact info'
>
> i get the error message:
> org.ofbiz.webapp.control.RequestHandlerException: No defitinition  
> found
> for view with name [&]
> --
> http://www.antwebsystems.com :
> Quality OFBiz support for competitive rates....
>
>

Reply | Threaded
Open this post in threaded view
|

Re: entityreference show, but links do not work (requestHandlerException)

David E Jones-3
In reply to this post by hans_bakker

Thanks for the details. I don't think I would have found that by  
randomly clicking around... ;)

The issue is fixed in rev 742866.

The problem was a string was assembled in the FTL file and then used,  
triggering the html encoding. The fix is to not assemble the String at  
all since it isn't needed. In other words, instead of:

<#assign screenFileName = portlet.screenLocation + "#" +  
portlet.screenName/>
${screens.render(screenFileName)}

... we can simply do this:

${screens.render(portlet.screenLocation, portlet.screenName)}

Doing so allows us to avoid the problem, and it's cleaner code.

If we didn't have an option like this (ie cleaning up the code to  
solve the problem, which works in most cases so far and has served to  
improve the code too), as a last resort we could use the StringWrapper  
so that FTL doesn't treat it is a String and trigger the general html  
encoding. It would look like this from the promotiondetails.ftl file:

${StringUtil.wrapString(productPromo.promoText?if_exists)}

That is a field that we want to allow HTML in, and allow the HTML to  
be sent to the browser to be treated as HTML instead of encoded so it  
is shown like any other text. So, this little workaround is basically  
what we can use when we don't want this default behavior.

-David


On Feb 9, 2009, at 8:06 PM, Hans Bakker wrote:

> We are trying to finish the myportal conversion and are a bit stuck
> now..... besides that the links in the entity reference not works
>
> click on "preferences" in myportal
> in the log it says:
> Exception: java.lang.IllegalArgumentException
> Message: Could not resolve location to URL:
> component&#58;&#47;&#47;myportal&#47;widget&#47;MyPortalScreens.xml
>
> regards,
> Hans
>
> On Mon, 2009-02-09 at 19:42 -0700, David E Jones wrote:
>> On Feb 9, 2009, at 7:34 PM, Hans Bakker wrote:
>>
>>> it looks like the following string: /control/view/&#47;webtools&#47;
>>> is added to the begin of the url causing this problem.....
>>>
>>> not only happens in webtools but at many places.....
>>
>> Could you be more specific about these "many places"?
>>
>> I don't think I'll find them by randomly poking around...
>>
>> Thanks,
>> -David
>>
>>
>>> On Mon, 2009-02-09 at 22:17 +0700, Hans Bakker wrote:
>>>> David?
>>>> In webtools the entityreference still work but when i click on a
>>>> specific entity on the left, or on 'view data' or 'artifact info'
>>>>
>>>> i get the error message:
>>>> org.ofbiz.webapp.control.RequestHandlerException: No defitinition
>>>> found
>>>> for view with name [&]
>>> --
>>> Antwebsystems.com: Quality OFBiz services for competitive prices
>>>
>>
> --
> Antwebsystems.com: Quality OFBiz services for competitive prices
>

Reply | Threaded
Open this post in threaded view
|

Re: entityreference show, but links do not work (requestHandlerException)

hans_bakker
Thanks Divid, for the info, very usefull.

On Mon, 2009-02-09 at 23:54 -0700, David E Jones wrote:

> Thanks for the details. I don't think I would have found that by  
> randomly clicking around... ;)
>
> The issue is fixed in rev 742866.
>
> The problem was a string was assembled in the FTL file and then used,  
> triggering the html encoding. The fix is to not assemble the String at  
> all since it isn't needed. In other words, instead of:
>
> <#assign screenFileName = portlet.screenLocation + "#" +  
> portlet.screenName/>
> ${screens.render(screenFileName)}
>
> ... we can simply do this:
>
> ${screens.render(portlet.screenLocation, portlet.screenName)}
>
> Doing so allows us to avoid the problem, and it's cleaner code.
>
> If we didn't have an option like this (ie cleaning up the code to  
> solve the problem, which works in most cases so far and has served to  
> improve the code too), as a last resort we could use the StringWrapper  
> so that FTL doesn't treat it is a String and trigger the general html  
> encoding. It would look like this from the promotiondetails.ftl file:
>
> ${StringUtil.wrapString(productPromo.promoText?if_exists)}
>
> That is a field that we want to allow HTML in, and allow the HTML to  
> be sent to the browser to be treated as HTML instead of encoded so it  
> is shown like any other text. So, this little workaround is basically  
> what we can use when we don't want this default behavior.
>
> -David
>
>
> On Feb 9, 2009, at 8:06 PM, Hans Bakker wrote:
>
> > We are trying to finish the myportal conversion and are a bit stuck
> > now..... besides that the links in the entity reference not works
> >
> > click on "preferences" in myportal
> > in the log it says:
> > Exception: java.lang.IllegalArgumentException
> > Message: Could not resolve location to URL:
> > component&#58;&#47;&#47;myportal&#47;widget&#47;MyPortalScreens.xml
> >
> > regards,
> > Hans
> >
> > On Mon, 2009-02-09 at 19:42 -0700, David E Jones wrote:
> >> On Feb 9, 2009, at 7:34 PM, Hans Bakker wrote:
> >>
> >>> it looks like the following string: /control/view/&#47;webtools&#47;
> >>> is added to the begin of the url causing this problem.....
> >>>
> >>> not only happens in webtools but at many places.....
> >>
> >> Could you be more specific about these "many places"?
> >>
> >> I don't think I'll find them by randomly poking around...
> >>
> >> Thanks,
> >> -David
> >>
> >>
> >>> On Mon, 2009-02-09 at 22:17 +0700, Hans Bakker wrote:
> >>>> David?
> >>>> In webtools the entityreference still work but when i click on a
> >>>> specific entity on the left, or on 'view data' or 'artifact info'
> >>>>
> >>>> i get the error message:
> >>>> org.ofbiz.webapp.control.RequestHandlerException: No defitinition
> >>>> found
> >>>> for view with name [&]
> >>> --
> >>> Antwebsystems.com: Quality OFBiz services for competitive prices
> >>>
> >>
> > --
> > Antwebsystems.com: Quality OFBiz services for competitive prices
> >
>
--
Antwebsystems.com: Quality OFBiz services for competitive prices