You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by sudhitekkala <su...@gmail.com> on 2007/06/25 12:26:26 UTC

how to use I18N in macros

hello 

to develop a page in velocity i am not getting the design as expected ... so
i started using macros so that i can get the expected design

for example:::

<table>
<tr>
<td>#ssubmit("key=button1" "value=Search")</td>
<td>#ssubmit("key=button2" "value=Submit")</td>
</tr>
</table>

i have taken the key attribute for the purpose of i18n...actually it should
work as in one row to td's should form in which each should hold two submit
buttons... but when you observe the html page the second submit button will
be taken as in second row...

in this case i used macro to get the two submit buttons in the one row as
bellow:::

#macro(button $value)
<input type="submit" value="$value">
#end

<table>
<tr>
<td>#button("Search")</td>
<td>#button(Submit)</td>
</tr>
</table>

here i am getting the design but when i am writing the key attribute in the
macro or in the calling macro i am not at all seeing the button in the html
page

if possible please kindly solve my problem........


regards
-- 
View this message in context: http://www.nabble.com/how-to-use-I18N-in-macros-tf3975258.html#a11284160
Sent from the Velocity - Dev mailing list archive at Nabble.com.


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


Re: how to use I18N in macros

Posted by Nathan Bubna <nb...@gmail.com>.
This is a question for the Struts2 user list.  They are the ones who
created and maintain the #ssubmit directive.   You may get an answer
here, but it is not likely.  I'm not aware of any Struts2 users or
developers who are active on this list.

On 6/25/07, sudhitekkala <su...@gmail.com> wrote:
>
> hello
>
> to develop a page in velocity i am not getting the design as expected ... so
> i started using macros so that i can get the expected design
>
> for example:::
>
> <table>
> <tr>
> <td>#ssubmit("key=button1" "value=Search")</td>
> <td>#ssubmit("key=button2" "value=Submit")</td>
> </tr>
> </table>
>
> i have taken the key attribute for the purpose of i18n...actually it should
> work as in one row to td's should form in which each should hold two submit
> buttons... but when you observe the html page the second submit button will
> be taken as in second row...
>
> in this case i used macro to get the two submit buttons in the one row as
> bellow:::
>
> #macro(button $value)
> <input type="submit" value="$value">
> #end
>
> <table>
> <tr>
> <td>#button("Search")</td>
> <td>#button(Submit)</td>
> </tr>
> </table>
>
> here i am getting the design but when i am writing the key attribute in the
> macro or in the calling macro i am not at all seeing the button in the html
> page
>
> if possible please kindly solve my problem........
>
>
> regards
> --
> View this message in context: http://www.nabble.com/how-to-use-I18N-in-macros-tf3975258.html#a11284160
> Sent from the Velocity - Dev mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@velocity.apache.org
> For additional commands, e-mail: dev-help@velocity.apache.org
>
>

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