How f:param encoding should be for h:commandLink

View: New views
7 Messages — Rating Filter:   Alert me  

How f:param encoding should be for h:commandLink

by Leonardo Uribe :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi

Looking on the jsf tld documentation (1.1 and 1.2), it says something like this (for h:commandLink):

"............The name and the value (of UIParameter child components) must be URLEncoded.......".

It says the same as h:outputLink.

Testing on jsf ri 1.2_09 for example a <f:param name="paramName" value="modalità">

Is added on commandLink javascript as:

if(typeof jsfcljs == 'function'){jsfcljs(document.getElementById('mainForm'),{'mainForm:link':'mainForm:link','paramName':'modalit&agrave;'},'');}return false

This behavior suggest that no URLEncoding is used for f:param inside h:commandLink (instead the encoding used by ResponseWriter.writeAttribute). Is this the correct behavior? The tld api doc is wrong?

regards

Leonardo Uribe


Re: How f:param encoding should be for h:commandLink

by Ryan Lubke :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Leonardo Uribe wrote:

> Hi
>
> Looking on the jsf tld documentation (1.1 and 1.2), it says something
> like this (for h:commandLink):
>
> "............The name and the value (of UIParameter child components)
> must be URLEncoded.......".
>
> It says the same as h:outputLink.
>
> Testing on jsf ri 1.2_09 for example a <f:param name="paramName"
> value="modalità">
>
> Is added on commandLink javascript as:
>
> if(typeof jsfcljs == 'function'){jsfcljs(document.getElementById('mainForm'),{'mainForm:link':'mainForm:link','paramName':'modalità'},'');}return false
>
> This behavior suggest that no URLEncoding is used for f:param inside
> h:commandLink (instead the encoding used by
> ResponseWriter.writeAttribute). Is this the correct behavior? The tld
> api doc is wrong?
After talking with the spec leads, the current thinking is that the
render kit docs/tld docs are incorrect.
I've logged:  
https://javaserverfaces-spec-public.dev.java.net/issues/show_bug.cgi?id=436 
to have the documentation
addressed for 2.0.


>
> regards
>
> Leonardo Uribe
>


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@...
For additional commands, e-mail: dev-help@...


Re: How f:param encoding should be for h:commandLink

by Leonardo Uribe :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message



On Mon, Aug 11, 2008 at 11:47 AM, Ryan Lubke <Ryan.Lubke@...> wrote:
Leonardo Uribe wrote:
Hi

Looking on the jsf tld documentation (1.1 and 1.2), it says something like this (for h:commandLink):

"............The name and the value (of UIParameter child components) must be URLEncoded.......".

It says the same as h:outputLink.

Testing on jsf ri 1.2_09 for example a <f:param name="paramName" value="modalità">

Is added on commandLink javascript as:

if(typeof jsfcljs == 'function'){jsfcljs(document.getElementById('mainForm'),{'mainForm:link':'mainForm:link','paramName':'modalit&agrave;'},'');}return false

This behavior suggest that no URLEncoding is used for f:param inside h:commandLink (instead the encoding used by ResponseWriter.writeAttribute). Is this the correct behavior? The tld api doc is wrong?
After talking with the spec leads, the current thinking is that the render kit docs/tld docs are incorrect.
I've logged:  https://javaserverfaces-spec-public.dev.java.net/issues/show_bug.cgi?id=436 to have the documentation
addressed for 2.0.


Ok, Thanks Ryan
 


regards

Leonardo Uribe



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@...
For additional commands, e-mail: dev-help@...



Re: How f:param encoding should be for h:commandLink

by Ravizzz :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

I have one issue related to this topic.

When I use

The page does not get rendered, if the value i am retrieving for row.text is having a new line character. i understand that we should avoid passing values which has "\n" character, however Customer is having legacy data which has "\n" which is been retrieved.

Is there a way where I can render data which is having \n character in row.text?

Please note this is with Trinidad JSF. Hence commandLink is tr:commandLink

Regards,
Ravi

Leonardo Uribe wrote:
Hi

Looking on the jsf tld documentation (1.1 and 1.2), it says something like
this (for h:commandLink):

"............The name and the value (of UIParameter child components) must
be URLEncoded.......".

It says the same as h:outputLink.

Testing on jsf ri 1.2_09 for example a <f:param name="paramName"
value="modalità">

Is added on commandLink javascript as:

if(typeof jsfcljs ==
'function'){jsfcljs(document.getElementById('mainForm'),{'mainForm:link':'mainForm:link','paramName':'modalità'},'');}return
false


This behavior suggest that no URLEncoding is used for f:param inside
h:commandLink (instead the encoding used by ResponseWriter.writeAttribute).
Is this the correct behavior? The tld api doc is wrong?

regards

Leonardo Uribe

Re: How f:param encoding should be for h:commandLink

by Ravizzz :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello again,

for some reason "f:param" did not display.

what i am trying is "param name="paramName" value="#{row.text}""

Also, IE browser just displays a message saying unterminated string constant when i try to get values from row.text as above.

regards,
Ravi

Hi,

I have one issue related to this topic.

When I use

The page does not get rendered, if the value i am retrieving for row.text is having a new line character. i understand that we should avoid passing values which has "\n" character, however Customer is having legacy data which has "\n" which is been retrieved.

Is there a way where I can render data which is having \n character in row.text?

Please note this is with Trinidad JSF. Hence commandLink is tr:commandLink

Regards,
Ravi

Leonardo Uribe wrote:
Hi

Looking on the jsf tld documentation (1.1 and 1.2), it says something like
this (for h:commandLink):

"............The name and the value (of UIParameter child components) must
be URLEncoded.......".

It says the same as h:outputLink.

Testing on jsf ri 1.2_09 for example a <f:param name="paramName"
value="modalità">

Is added on commandLink javascript as:

if(typeof jsfcljs ==
'function'){jsfcljs(document.getElementById('mainForm'),{'mainForm:link':'mainForm:link','paramName':'modalità'},'');}return
false


This behavior suggest that no URLEncoding is used for f:param inside
h:commandLink (instead the encoding used by ResponseWriter.writeAttribute).
Is this the correct behavior? The tld api doc is wrong?

regards

Leonardo Uribe


Re: How f:param encoding should be for h:commandLink

by Jim Driscoll :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Still not seeing it.  But isn't the easy answer to strip the \n char in
the bean getter?  Why not just do that?

Jim

On 10/12/09 8:32 AM, Ravizzz wrote:

>
> Hello again,
>
> for some reason "f:param" did not display.
>
> what i am trying is ""
>
> Also, IE browser just displays a message saying unterminated string constant
> when i try to get values from row.text as above.
>
> regards,
> Ravi
>
> Ravizzz wrote:
>>
>> Hi,
>>
>> I have one issue related to this topic.
>>
>> When I use
>>
>> The page does not get rendered, if the value i am retrieving for row.text
>> is having a new line character. i understand that we should avoid passing
>> values which has "\n" character, however Customer is having legacy data
>> which has "\n" which is been retrieved.
>>
>> Is there a way where I can render data which is having \n character in
>> row.text?
>>
>> Please note this is with Trinidad JSF. Hence commandLink is tr:commandLink
>>
>> Regards,
>> Ravi
>>
>>
>> Leonardo Uribe wrote:
>>>
>>> Hi
>>>
>>> Looking on the jsf tld documentation (1.1 and 1.2), it says something
>>> like
>>> this (for h:commandLink):
>>>
>>> "............The name and the value (of UIParameter child components)
>>> must
>>> be URLEncoded.......".
>>>
>>> It says the same as h:outputLink.
>>>
>>> Testing on jsf ri 1.2_09 for example a<f:param name="paramName"
>>> value="modalità">
>>>
>>> Is added on commandLink javascript as:
>>>
>>> if(typeof jsfcljs ==
>>> 'function'){jsfcljs(document.getElementById('mainForm'),{'mainForm:link':'mainForm:link','paramName':'modalità'},'');}return
>>> false
>>>
>>>
>>> This behavior suggest that no URLEncoding is used for f:param inside
>>> h:commandLink (instead the encoding used by
>>> ResponseWriter.writeAttribute).
>>> Is this the correct behavior? The tld api doc is wrong?
>>>
>>> regards
>>>
>>> Leonardo Uribe
>>>
>>>
>>
>>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@...
For additional commands, e-mail: dev-help@...


Re: How f:param encoding should be for h:commandLink

by Ravizzz :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello Jim,

Thanks for replying,

the use case we have is, we create one prompt list where this problem originally occured and for that i have trimmed of "\n", but inside this prompt list  we have command link which is used to create sub prompts, where trimming "\n" is not working and always failes at F:param.

Regards,
Ravi
Jim Driscoll wrote:
Still not seeing it.  But isn't the easy answer to strip the \n char in
the bean getter?  Why not just do that?

Jim

On 10/12/09 8:32 AM, Ravizzz wrote:
>
> Hello again,
>
> for some reason "f:param" did not display.
>
> what i am trying is ""
>
> Also, IE browser just displays a message saying unterminated string constant
> when i try to get values from row.text as above.
>
> regards,
> Ravi
>
> Ravizzz wrote:
>>
>> Hi,
>>
>> I have one issue related to this topic.
>>
>> When I use
>>
>> The page does not get rendered, if the value i am retrieving for row.text
>> is having a new line character. i understand that we should avoid passing
>> values which has "\n" character, however Customer is having legacy data
>> which has "\n" which is been retrieved.
>>
>> Is there a way where I can render data which is having \n character in
>> row.text?
>>
>> Please note this is with Trinidad JSF. Hence commandLink is tr:commandLink
>>
>> Regards,
>> Ravi
>>
>>
>> Leonardo Uribe wrote:
>>>
>>> Hi
>>>
>>> Looking on the jsf tld documentation (1.1 and 1.2), it says something
>>> like
>>> this (for h:commandLink):
>>>
>>> "............The name and the value (of UIParameter child components)
>>> must
>>> be URLEncoded.......".
>>>
>>> It says the same as h:outputLink.
>>>
>>> Testing on jsf ri 1.2_09 for example a<f:param name="paramName"
>>> value="modalità">
>>>
>>> Is added on commandLink javascript as:
>>>
>>> if(typeof jsfcljs ==
>>> 'function'){jsfcljs(document.getElementById('mainForm'),{'mainForm:link':'mainForm:link','paramName':'modalità'},'');}return
>>> false
>>>
>>>
>>> This behavior suggest that no URLEncoding is used for f:param inside
>>> h:commandLink (instead the encoding used by
>>> ResponseWriter.writeAttribute).
>>> Is this the correct behavior? The tld api doc is wrong?
>>>
>>> regards
>>>
>>> Leonardo Uribe
>>>
>>>
>>
>>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@javaserverfaces.dev.java.net
For additional commands, e-mail: dev-help@javaserverfaces.dev.java.net