フォーラム

ホーム » Liferay Portal » English » 3. Development

構造的に表示 平面上に表示 ツリー上に表示
スレッド [ 前へ | 次へ ]
toggle
Michael Wall
Arguments in liferay-ui:message
2010/12/14 2:56
答え

Michael Wall

ランク: Junior Member

投稿: 56

参加年月日: 2010/07/22

最近の投稿

How do you use arguments with the liferay-ui:message tag?

I'm using 6.0 EE, have tried all variations, the parameter doesn't get applied, appears as {0} on screen.

Is therw any proper documentation for the liferay taglibs?
Adrian Rodriguez Monedero
RE: Arguments in liferay-ui:message
2011/05/13 10:06
答え

Adrian Rodriguez Monedero

ランク: New Member

投稿: 12

参加年月日: 2010/10/17

最近の投稿

The tag accepts an attribute named 'arguments' of type Object []. The following snippet works:

1<liferay-ui:message key="message-key" arguments="<%=new String[]{\"test\"}%>"/>


Anyhow, perhaps a "nicer" way to pass the arguments, even if it is only one argument, could be with
1arguments='${fn:split("arg1,arg2 ",",")}'
Dave Weitzel
RE: Arguments in liferay-ui:message
2013/06/19 15:50
答え

Dave Weitzel

ランク: Regular Member

投稿: 168

参加年月日: 2009/11/18

最近の投稿

I was searching for how to pass multiple arguments and thought I would add this feedback as well

Michael Wall:
How do you use arguments with the liferay-ui:message tag?

I'm using 6.0 EE, have tried all variations, the parameter doesn't get applied, appears as {0} on screen.

if only passing one argument just pass the text string you want eg arguments="<%= myStringObject %>" or arguments="<%= dateFormat.format(anyDateObject) %>"

Michael Wall:

Is therw any proper documentation for the liferay taglibs?


Unfortunately not!
Taglib definitions are reasonable place to start or just read the code thy produce in init.jsp and page.jsp files