You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "John Ray (JIRA)" <ji...@apache.org> on 2008/04/06 04:01:24 UTC
[jira] Created: (WICKET-1486) Allow child components inside of
wicket:message
Allow child components inside of wicket:message
-----------------------------------------------
Key: WICKET-1486
URL: https://issues.apache.org/jira/browse/WICKET-1486
Project: Wicket
Issue Type: New Feature
Components: wicket
Reporter: John Ray
Attachments: Message.diff
Currently you can't put a link or text in the middle of a wicket:message. You need to break up the message into 2 parts as text before the link and text after the link.
I've made a modification to the WicketMessageResolver class that allows you to nest child components inside a wicket:message and then reference them from the properties file. For example in the html
<wicket:message key="myKey">
This text will be replaced with text from the properties file.
<span wicket:id="amount">[amount]</span>.
<a wicket:id="link">
<wicket:message key="linkText"/>
</a>
</wicket:message>
Then in the properties file have a variable with a name that matches the wicket:id for each child component. The variables can be in any order, they do NOT have to match the order in the HTML file.
myKey=Your balance is ${amount}. Click ${link} to view the details.
linkText=here
And in the java
add(new Label("amount",new Model("$5.00")));
add(new BookmarkablePageLink("link",DetailsPage.class));
In the browser this will output
Your balance is $5.00. Click -here- to view the details.
I'll attach a quick start as well as an svn diff.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (WICKET-1486) Allow child components inside of
wicket:message
Posted by "John Ray (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-1486?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
John Ray updated WICKET-1486:
-----------------------------
Attachment: MessageQuickStart.zip
Quick start that demonstrates child components in wicket:message
> Allow child components inside of wicket:message
> -----------------------------------------------
>
> Key: WICKET-1486
> URL: https://issues.apache.org/jira/browse/WICKET-1486
> Project: Wicket
> Issue Type: New Feature
> Components: wicket
> Reporter: John Ray
> Attachments: Message.diff, MessageQuickStart.zip
>
>
> Currently you can't put a link or text in the middle of a wicket:message. You need to break up the message into 2 parts as text before the link and text after the link.
> I've made a modification to the WicketMessageResolver class that allows you to nest child components inside a wicket:message and then reference them from the properties file. For example in the html
> <wicket:message key="myKey">
> This text will be replaced with text from the properties file.
> <span wicket:id="amount">[amount]</span>.
> <a wicket:id="link">
> <wicket:message key="linkText"/>
> </a>
> </wicket:message>
>
> Then in the properties file have a variable with a name that matches the wicket:id for each child component. The variables can be in any order, they do NOT have to match the order in the HTML file.
> myKey=Your balance is ${amount}. Click ${link} to view the details.
> linkText=here
>
> And in the java
> add(new Label("amount",new Model("$5.00")));
> add(new BookmarkablePageLink("link",DetailsPage.class));
>
> In the browser this will output
> Your balance is $5.00. Click -here- to view the details.
> I'll attach a quick start as well as an svn diff.
>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (WICKET-1486) Allow child components inside of
wicket:message
Posted by "Juergen Donnerstag (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-1486?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Juergen Donnerstag resolved WICKET-1486.
----------------------------------------
Resolution: Fixed
fixed svn rev 646277
> Allow child components inside of wicket:message
> -----------------------------------------------
>
> Key: WICKET-1486
> URL: https://issues.apache.org/jira/browse/WICKET-1486
> Project: Wicket
> Issue Type: New Feature
> Components: wicket
> Affects Versions: 1.3.2
> Reporter: John Ray
> Assignee: Juergen Donnerstag
> Fix For: 1.4-M1
>
> Attachments: Message.diff, MessageQuickStart.zip
>
>
> Currently you can't put a link or text in the middle of a wicket:message. You need to break up the message into 2 parts as text before the link and text after the link.
> I've made a modification to the WicketMessageResolver class that allows you to nest child components inside a wicket:message and then reference them from the properties file. For example in the html
> <wicket:message key="myKey">
> This text will be replaced with text from the properties file.
> <span wicket:id="amount">[amount]</span>.
> <a wicket:id="link">
> <wicket:message key="linkText"/>
> </a>
> </wicket:message>
>
> Then in the properties file have a variable with a name that matches the wicket:id for each child component. The variables can be in any order, they do NOT have to match the order in the HTML file.
> myKey=Your balance is ${amount}. Click ${link} to view the details.
> linkText=here
>
> And in the java
> add(new Label("amount",new Model("$5.00")));
> add(new BookmarkablePageLink("link",DetailsPage.class));
>
> In the browser this will output
> Your balance is $5.00. Click -here- to view the details.
> I'll attach a quick start as well as an svn diff.
>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (WICKET-1486) Allow child components inside of
wicket:message
Posted by "John Ray (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-1486?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
John Ray updated WICKET-1486:
-----------------------------
Attachment: Message.diff
SVN diff to allow child components in wicket:message
> Allow child components inside of wicket:message
> -----------------------------------------------
>
> Key: WICKET-1486
> URL: https://issues.apache.org/jira/browse/WICKET-1486
> Project: Wicket
> Issue Type: New Feature
> Components: wicket
> Reporter: John Ray
> Attachments: Message.diff
>
>
> Currently you can't put a link or text in the middle of a wicket:message. You need to break up the message into 2 parts as text before the link and text after the link.
> I've made a modification to the WicketMessageResolver class that allows you to nest child components inside a wicket:message and then reference them from the properties file. For example in the html
> <wicket:message key="myKey">
> This text will be replaced with text from the properties file.
> <span wicket:id="amount">[amount]</span>.
> <a wicket:id="link">
> <wicket:message key="linkText"/>
> </a>
> </wicket:message>
>
> Then in the properties file have a variable with a name that matches the wicket:id for each child component. The variables can be in any order, they do NOT have to match the order in the HTML file.
> myKey=Your balance is ${amount}. Click ${link} to view the details.
> linkText=here
>
> And in the java
> add(new Label("amount",new Model("$5.00")));
> add(new BookmarkablePageLink("link",DetailsPage.class));
>
> In the browser this will output
> Your balance is $5.00. Click -here- to view the details.
> I'll attach a quick start as well as an svn diff.
>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (WICKET-1486) Allow child components inside of
wicket:message
Posted by "Juergen Donnerstag (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-1486?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12586479#action_12586479 ]
Juergen Donnerstag commented on WICKET-1486:
--------------------------------------------
I didn't like the idea of makeing renderNext() protected and figured out a different way to implement the functionality. I'm rendering the tags into a StringResponse and use MapVariableInterpolator to replace the variables. It'll not only try the child tags but via PropertyResolver it'll test the container Model and the container itself to resolve the variables. And by rendering into a StringResponse we got rid of the restriction to be allowed to use a variable just once. You can now it as often as you want to.
The changed functionality will probably go into 1.4
> Allow child components inside of wicket:message
> -----------------------------------------------
>
> Key: WICKET-1486
> URL: https://issues.apache.org/jira/browse/WICKET-1486
> Project: Wicket
> Issue Type: New Feature
> Components: wicket
> Affects Versions: 1.3.2
> Reporter: John Ray
> Assignee: Juergen Donnerstag
> Fix For: 1.4-M1
>
> Attachments: Message.diff, MessageQuickStart.zip
>
>
> Currently you can't put a link or text in the middle of a wicket:message. You need to break up the message into 2 parts as text before the link and text after the link.
> I've made a modification to the WicketMessageResolver class that allows you to nest child components inside a wicket:message and then reference them from the properties file. For example in the html
> <wicket:message key="myKey">
> This text will be replaced with text from the properties file.
> <span wicket:id="amount">[amount]</span>.
> <a wicket:id="link">
> <wicket:message key="linkText"/>
> </a>
> </wicket:message>
>
> Then in the properties file have a variable with a name that matches the wicket:id for each child component. The variables can be in any order, they do NOT have to match the order in the HTML file.
> myKey=Your balance is ${amount}. Click ${link} to view the details.
> linkText=here
>
> And in the java
> add(new Label("amount",new Model("$5.00")));
> add(new BookmarkablePageLink("link",DetailsPage.class));
>
> In the browser this will output
> Your balance is $5.00. Click -here- to view the details.
> I'll attach a quick start as well as an svn diff.
>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (WICKET-1486) Allow child components inside of
wicket:message
Posted by "Johan Compagner (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-1486?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Johan Compagner updated WICKET-1486:
------------------------------------
Affects Version/s: 1.3.2
Fix Version/s: 1.4-M1
Assignee: Juergen Donnerstag
> Allow child components inside of wicket:message
> -----------------------------------------------
>
> Key: WICKET-1486
> URL: https://issues.apache.org/jira/browse/WICKET-1486
> Project: Wicket
> Issue Type: New Feature
> Components: wicket
> Affects Versions: 1.3.2
> Reporter: John Ray
> Assignee: Juergen Donnerstag
> Fix For: 1.4-M1
>
> Attachments: Message.diff, MessageQuickStart.zip
>
>
> Currently you can't put a link or text in the middle of a wicket:message. You need to break up the message into 2 parts as text before the link and text after the link.
> I've made a modification to the WicketMessageResolver class that allows you to nest child components inside a wicket:message and then reference them from the properties file. For example in the html
> <wicket:message key="myKey">
> This text will be replaced with text from the properties file.
> <span wicket:id="amount">[amount]</span>.
> <a wicket:id="link">
> <wicket:message key="linkText"/>
> </a>
> </wicket:message>
>
> Then in the properties file have a variable with a name that matches the wicket:id for each child component. The variables can be in any order, they do NOT have to match the order in the HTML file.
> myKey=Your balance is ${amount}. Click ${link} to view the details.
> linkText=here
>
> And in the java
> add(new Label("amount",new Model("$5.00")));
> add(new BookmarkablePageLink("link",DetailsPage.class));
>
> In the browser this will output
> Your balance is $5.00. Click -here- to view the details.
> I'll attach a quick start as well as an svn diff.
>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.