[
https://issues.apache.org/jira/browse/WW-3990?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Thim Anneessens updated WW-3990:
--------------------------------
Description:
When inserting a component in a JSP action result (using <s:component
template=...), the component has always at least an empty String as id.
It is impossible to have null as value for id. Even when specifying explicitly
null as being the value for id.
This is the case when using s:param or the id attribute of s:component.
After discussing the issue with Lukasz Lenart, he pointed out that the cause of
this issue is that the UIBean.escape(String) method is always called on the id
and that it returns an empty String when a null String is passed to it.
This issue should be fixed or documented. Current documentation for id says it
has no default value.
There is a poc project. It was shared on the mailing list under the title
"Re: Inconsistency in Struts2 s:component parameters handling".
A copy of the poc has been uploaded here as well.
Feel free to ask more questions.
Best regards,
Thim.
was:
When inserting a component in a JSP action result (using <s:component
template=...), the component has always at least an empty String as id.
It is impossible to have null as value for id. Even when specifying explicitly
null as being the value for id.
This is the case when using s:param or the id attribute of s:component.
After discussing the issue with Lukasz Lenart, he pointed out that the cause of
this issue is that the UIBean.escape(String) method is always called on the id
and that it returns an empty String when a null String is passed to it.
This issue should be fixed or documented. Current documentation for id says it
has no default value.
There is a poc project. It was shared on the mailing list under the title
"Re: Inconsistency in Struts2 s:component parameters handling"
Feel free to ask more questions.
Best regards,
Thim.
> Null id is not possible on component
> ------------------------------------
>
> Key: WW-3990
> URL: https://issues.apache.org/jira/browse/WW-3990
> Project: Struts 2
> Issue Type: Bug
> Affects Versions: 2.3.1.2
> Reporter: Thim Anneessens
> Attachments: playground.zip
>
> Original Estimate: 1m
> Remaining Estimate: 1m
>
> When inserting a component in a JSP action result (using <s:component
> template=...), the component has always at least an empty String as id.
> It is impossible to have null as value for id. Even when specifying
> explicitly null as being the value for id.
> This is the case when using s:param or the id attribute of s:component.
> After discussing the issue with Lukasz Lenart, he pointed out that the cause
> of this issue is that the UIBean.escape(String) method is always called on
> the id and that it returns an empty String when a null String is passed to it.
> This issue should be fixed or documented. Current documentation for id says
> it has no default value.
> There is a poc project. It was shared on the mailing list under the title
> "Re: Inconsistency in Struts2 s:component parameters handling".
> A copy of the poc has been uploaded here as well.
> Feel free to ask more questions.
> Best regards,
> Thim.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira