I was not aware of that.
So it would make sense to add an XML mime type in addition of PLAIN and XHTML and use it
when the portlet container requires an XML formatted URL.
The original patch attached to the jira has been updated to only use
'&' instead of '&' if the URLFormat has escape xml set to
true
(which wsrp already sets).
On Oct 28, 2010, at 12:57 PM, Christophe Laprun wrote:
>
> On Oct 28, 2010, at 12:51 PM, Julien Viet wrote:
>
>> The use case for plain is to write emails mainly.
>>
>> And rendering an URL for something other than XHTML does not have sense for a
portlet (although lot of people do that and abuse it) because it may contains WSRP tokens
and the URL sent by email would be not rewritten by the consumer.
>>
>> Also that often happens during process action and there is no capability to
create an URL via the portlet API in process action (which is usually when an email is
sent).
>
> That may be the case. However, when there's a parameter that can potentially
specify that the URL should be encoded for XML (which is the case with URLFormat), it is
ignored by GateIn. Should it really be the case? Seems like a bug to me.
>
>> On Oct 28, 2010, at 12:46 PM, Christophe Laprun wrote:
>>
>>>
>>> On Oct 28, 2010, at 11:02 AM, Julien Viet wrote:
>>>
>>>> it's a good point,
>>>>
>>>> in the navigation controller framework it is possible to specify the
kind of link that will be generated by the portal.
>>>>
>>>> so creating an URL would be like
>>>>
>>>> url.setMimeType(MimeType.XHTML);
>>>> url.toString();
>>>>
>>>> or
>>>>
>>>> url.setMimeType(MimeType.PLAIN);
>>>> url.toString();
>>>
>>> I was thinking that maybe this should be an extra parameter on
PortletInvocationContext.encodeResourceURL like there's already a URLFormat in the
renderURL method (though, the passed format seems to be actually ignored in GateIn Portal,
see ExoPortletInvocationContext.renderURL and the comment I had added a while ago)…
>>>
>>>>
>>>> On Oct 28, 2010, at 10:57 AM, Trong Tran wrote:
>>>>
>>>>> it says :
>>>>>
>>>>> Note that replacing & with & is only done when writing
the URL in HTML, where "&" is a special character (along with
"<" and ">"). When writing the same URL in a plain text email
message or in the location bar of your browser, you would use "&" and not
"&". With HTML, the browser translates "&" to
"&" so the Web server would only see "&" and not
"&" in the query string of the request.
>>>>>
>>>>> I think this is a good example of reason why we have used
'&' standalone before.
>>>>>
>>>>> Anyway, I agree that the '&' would be used to
generate an ULR by default and we could provide an option to be able to retrieve the
another in such cases
>>>>>
>>>>>
>>>>> On 27 October 2010 21:23, Matt Wringe <mwringe(a)redhat.com>
wrote:
>>>>> We are running into a bunch of problems with ajax requests when the
>>>>> portal is used to create the urls (this is especially seen when
using
>>>>> wsrp as it needs to rewrite urls). The issue stems from the use of
'&'
>>>>> instead of '&', & alone is not allowed in
xhtml/xml.
>>>>>
>>>>> I have already created a jira (with a patch) for this issue:
>>>>>
https://jira.jboss.org/browse/GTNPORTAL-1597
>>>>>
>>>>> Is there any objection or reasons why we can't use the proper
'&'
>>>>> instead?
>>>>>
>>>>> _______________________________________________
>>>>> gatein-dev mailing list
>>>>> gatein-dev(a)lists.jboss.org
>>>>>
https://lists.jboss.org/mailman/listinfo/gatein-dev
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Tran The Trong
>>>>> eXo Platform SEA
>>>>> _______________________________________________
>>>>> gatein-dev mailing list
>>>>> gatein-dev(a)lists.jboss.org
>>>>>
https://lists.jboss.org/mailman/listinfo/gatein-dev
>>>>
>>>> _______________________________________________
>>>> gatein-dev mailing list
>>>> gatein-dev(a)lists.jboss.org
>>>>
https://lists.jboss.org/mailman/listinfo/gatein-dev
>>>
>>> Cordialement / Best,
>>> Chris
>>>
>>> ==
>>> Principal Software Engineer / JBoss Enterprise Middleware Red Hat, Inc.
>>> Follow GateIn:
http://blog.gatein.org /
http://twitter.com/gatein
>>> Follow me:
http://metacosm.codepuccino.com /
http://twitter.com/metacosm
>>>
>>
>
> Cordialement / Best,
> Chris
>
> ==
> Principal Software Engineer / JBoss Enterprise Middleware Red Hat, Inc.
> Follow GateIn:
http://blog.gatein.org /
http://twitter.com/gatein
> Follow me:
http://metacosm.codepuccino.com /
http://twitter.com/metacosm
>
_______________________________________________
gatein-dev mailing list
gatein-dev(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/gatein-dev