【问题标题】:insert tag property string in hyperlink title attribute in struts2在struts2的超链接标题属性中插入标签属性字符串
【发布时间】:2011-01-19 12:03:21
【问题描述】:

我有一个小问题,如何放置标签属性字符串以在超链接中显示为标题?

我的代码:

<a href="<s:property value="picurl" />" rel="shadowbox" title="<s:property value='title'/>" ><img id="scale-mid-high" src="<s:property value="picurl" title="maximize" />"   align="left"/></a>

【问题讨论】:

  • 不确定你的意思,只要你的动作有一个叫做 getWhatever 你应该可以说 ,你甚至不需要吸气剂,您可以将字段公开。

标签: attributes hyperlink struts2 properties title


【解决方案1】:
<a href="<s:url namespace='someNameSpace' action='someAction'">
    <s:property value="whatever"/>
</a>

是一种方法,但可以使用

<s:a> 

tag...我忘记了原因,但我通常会使用上面列出的内容,但由于某些要求,我发现我需要替换它们。

了解更多详情

<s:url> and 
<s:a>

http://struts.apache.org/2.2.1.1/docs/tag-reference.html 其中有一个包含大多数标签的示例,并解释了所有可能的属性。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2019-01-27
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-07-30
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多