Repository: freemarker Updated Branches: refs/heads/3 220b11e79 -> e9ca9d4c8
http://git-wip-us.apache.org/repos/asf/freemarker/blob/e9ca9d4c/freemarker-spring/src/test/resources/META-INF/web-resources/views/test/model/form/input-directive-usages.f3ah ---------------------------------------------------------------------- diff --git a/freemarker-spring/src/test/resources/META-INF/web-resources/views/test/model/form/input-directive-usages.f3ah b/freemarker-spring/src/test/resources/META-INF/web-resources/views/test/model/form/input-directive-usages.f3ah new file mode 100644 index 0000000..aa95a0d --- /dev/null +++ b/freemarker-spring/src/test/resources/META-INF/web-resources/views/test/model/form/input-directive-usages.f3ah @@ -0,0 +1,92 @@ +<#-- + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +--> +<html> +<body> + + <h1>Form 1</h1> + <hr/> + <form id="form1"> + <table> + <tr> + <th>E-Mail:</th> + <td> + <@form.input 'user.email' id="customEmailId" /> + </td> + </tr> + <tr> + <th>First name:</th> + <td> + <@form.input 'user.firstName' /> + </td> + </tr> + <tr> + <th>Last name:</th> + <td> + <@form.input 'user.lastName' /> + </td> + </tr> + </table> + </form> + + <hr/> + + <h2>Testing default attributes</h2> + <form id="form2"> + <table> + <tr> + <th>First name:</th> + <td> + <@form.input "user.firstName" + id="my_id" + cssClass="my_cssClass" + cssStyle="my_cssStyle" + lang="my_lang" + title="my_title" + dir="my_dir" + tabindex="my_tabindex" + onclick="my_onclick()" + ondblclick="my_ondblclick()" + onmousedown="my_onmousedown()" + onmouseup="my_onmouseup()" + onmouseover="my_onmouseover()" + onmousemove="my_onmousemove()" + onmouseout="my_onmouseout()" + onkeypress="my_onkeypress()" + onkeyup="my_onkeyup()" + onkeydown="my_onkeydown()" + cssErrorClass="my_cssErrorClass" + onfocus="my_onfocus()" + onblur="my_onblur()" + onchange="my_onchange()" + accesskey="my_accesskey" + disabled=true + readonly=true + size="my_size" + maxlength="my_maxlength" + alt="my_alt" + onselect="my_onselect()" + autocomplete="my_autocomplete" + /> + </td> + </tr> + </table> + </form> + +</body> +</html> http://git-wip-us.apache.org/repos/asf/freemarker/blob/e9ca9d4c/freemarker-spring/src/test/resources/META-INF/web-resources/views/test/model/form/input-directive-usages.ftlh ---------------------------------------------------------------------- diff --git a/freemarker-spring/src/test/resources/META-INF/web-resources/views/test/model/form/input-directive-usages.ftlh b/freemarker-spring/src/test/resources/META-INF/web-resources/views/test/model/form/input-directive-usages.ftlh deleted file mode 100644 index aa95a0d..0000000 --- a/freemarker-spring/src/test/resources/META-INF/web-resources/views/test/model/form/input-directive-usages.ftlh +++ /dev/null @@ -1,92 +0,0 @@ -<#-- - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. ---> -<html> -<body> - - <h1>Form 1</h1> - <hr/> - <form id="form1"> - <table> - <tr> - <th>E-Mail:</th> - <td> - <@form.input 'user.email' id="customEmailId" /> - </td> - </tr> - <tr> - <th>First name:</th> - <td> - <@form.input 'user.firstName' /> - </td> - </tr> - <tr> - <th>Last name:</th> - <td> - <@form.input 'user.lastName' /> - </td> - </tr> - </table> - </form> - - <hr/> - - <h2>Testing default attributes</h2> - <form id="form2"> - <table> - <tr> - <th>First name:</th> - <td> - <@form.input "user.firstName" - id="my_id" - cssClass="my_cssClass" - cssStyle="my_cssStyle" - lang="my_lang" - title="my_title" - dir="my_dir" - tabindex="my_tabindex" - onclick="my_onclick()" - ondblclick="my_ondblclick()" - onmousedown="my_onmousedown()" - onmouseup="my_onmouseup()" - onmouseover="my_onmouseover()" - onmousemove="my_onmousemove()" - onmouseout="my_onmouseout()" - onkeypress="my_onkeypress()" - onkeyup="my_onkeyup()" - onkeydown="my_onkeydown()" - cssErrorClass="my_cssErrorClass" - onfocus="my_onfocus()" - onblur="my_onblur()" - onchange="my_onchange()" - accesskey="my_accesskey" - disabled=true - readonly=true - size="my_size" - maxlength="my_maxlength" - alt="my_alt" - onselect="my_onselect()" - autocomplete="my_autocomplete" - /> - </td> - </tr> - </table> - </form> - -</body> -</html> http://git-wip-us.apache.org/repos/asf/freemarker/blob/e9ca9d4c/freemarker-spring/src/test/resources/META-INF/web-resources/views/test/model/form/label-directive-usages.f3ah ---------------------------------------------------------------------- diff --git a/freemarker-spring/src/test/resources/META-INF/web-resources/views/test/model/form/label-directive-usages.f3ah b/freemarker-spring/src/test/resources/META-INF/web-resources/views/test/model/form/label-directive-usages.f3ah new file mode 100644 index 0000000..d046962 --- /dev/null +++ b/freemarker-spring/src/test/resources/META-INF/web-resources/views/test/model/form/label-directive-usages.f3ah @@ -0,0 +1,53 @@ +<#-- + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +--> +<html> +<body> + + <h1>Form 1</h1> + <hr/> + <form id="form1"> + <table> + <tr> + <th> + <@form.label 'user.email'>E-Mail:</@form.label> + </th> + <td> + <@form.input 'user.email' /> + </td> + </tr> + </table> + </form> + + <h1>Form 2</h1> + <hr/> + <form id="form2"> + <table> + <tr> + <th> + <@form.label 'user.email' for="customEmailId">E-Mail:</@form.label> + </th> + <td> + <@form.input 'user.email' id="customEmailId"/> + </td> + </tr> + </table> + </form> + +</body> +</html> http://git-wip-us.apache.org/repos/asf/freemarker/blob/e9ca9d4c/freemarker-spring/src/test/resources/META-INF/web-resources/views/test/model/form/label-directive-usages.ftlh ---------------------------------------------------------------------- diff --git a/freemarker-spring/src/test/resources/META-INF/web-resources/views/test/model/form/label-directive-usages.ftlh b/freemarker-spring/src/test/resources/META-INF/web-resources/views/test/model/form/label-directive-usages.ftlh deleted file mode 100644 index d046962..0000000 --- a/freemarker-spring/src/test/resources/META-INF/web-resources/views/test/model/form/label-directive-usages.ftlh +++ /dev/null @@ -1,53 +0,0 @@ -<#-- - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. ---> -<html> -<body> - - <h1>Form 1</h1> - <hr/> - <form id="form1"> - <table> - <tr> - <th> - <@form.label 'user.email'>E-Mail:</@form.label> - </th> - <td> - <@form.input 'user.email' /> - </td> - </tr> - </table> - </form> - - <h1>Form 2</h1> - <hr/> - <form id="form2"> - <table> - <tr> - <th> - <@form.label 'user.email' for="customEmailId">E-Mail:</@form.label> - </th> - <td> - <@form.input 'user.email' id="customEmailId"/> - </td> - </tr> - </table> - </form> - -</body> -</html> http://git-wip-us.apache.org/repos/asf/freemarker/blob/e9ca9d4c/freemarker-spring/src/test/resources/META-INF/web-resources/views/test/model/form/password-input-directive-usages.f3ah ---------------------------------------------------------------------- diff --git a/freemarker-spring/src/test/resources/META-INF/web-resources/views/test/model/form/password-input-directive-usages.f3ah b/freemarker-spring/src/test/resources/META-INF/web-resources/views/test/model/form/password-input-directive-usages.f3ah new file mode 100644 index 0000000..fa59e54 --- /dev/null +++ b/freemarker-spring/src/test/resources/META-INF/web-resources/views/test/model/form/password-input-directive-usages.f3ah @@ -0,0 +1,64 @@ +<#-- + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +--> +<html> +<body> + + <h1>Form 1</h1> + <hr/> + <form id="form1"> + <table> + <tr> + <th>Password:</th> + <td> + <@form.password 'user.password' /> + </td> + </tr> + </table> + </form> + + <hr/> + + <h2>Testing with setting showPassword to true</h2> + <form id="form2"> + <table> + <tr> + <th>Password:</th> + <td> + <@form.password 'user.password' showPassword=true /> + </td> + </tr> + </table> + </form> + + <hr/> + + <h2>Testing with setting showPassword to false explicitly</h2> + <form id="form3"> + <table> + <tr> + <th>Password:</th> + <td> + <@form.password 'user.password' showPassword=false /> + </td> + </tr> + </table> + </form> + +</body> +</html> http://git-wip-us.apache.org/repos/asf/freemarker/blob/e9ca9d4c/freemarker-spring/src/test/resources/META-INF/web-resources/views/test/model/form/password-input-directive-usages.ftlh ---------------------------------------------------------------------- diff --git a/freemarker-spring/src/test/resources/META-INF/web-resources/views/test/model/form/password-input-directive-usages.ftlh b/freemarker-spring/src/test/resources/META-INF/web-resources/views/test/model/form/password-input-directive-usages.ftlh deleted file mode 100644 index fa59e54..0000000 --- a/freemarker-spring/src/test/resources/META-INF/web-resources/views/test/model/form/password-input-directive-usages.ftlh +++ /dev/null @@ -1,64 +0,0 @@ -<#-- - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. ---> -<html> -<body> - - <h1>Form 1</h1> - <hr/> - <form id="form1"> - <table> - <tr> - <th>Password:</th> - <td> - <@form.password 'user.password' /> - </td> - </tr> - </table> - </form> - - <hr/> - - <h2>Testing with setting showPassword to true</h2> - <form id="form2"> - <table> - <tr> - <th>Password:</th> - <td> - <@form.password 'user.password' showPassword=true /> - </td> - </tr> - </table> - </form> - - <hr/> - - <h2>Testing with setting showPassword to false explicitly</h2> - <form id="form3"> - <table> - <tr> - <th>Password:</th> - <td> - <@form.password 'user.password' showPassword=false /> - </td> - </tr> - </table> - </form> - -</body> -</html> http://git-wip-us.apache.org/repos/asf/freemarker/blob/e9ca9d4c/freemarker-spring/src/test/resources/META-INF/web-resources/views/test/model/form/select-directive-usages.f3ah ---------------------------------------------------------------------- diff --git a/freemarker-spring/src/test/resources/META-INF/web-resources/views/test/model/form/select-directive-usages.f3ah b/freemarker-spring/src/test/resources/META-INF/web-resources/views/test/model/form/select-directive-usages.f3ah new file mode 100644 index 0000000..7152055 --- /dev/null +++ b/freemarker-spring/src/test/resources/META-INF/web-resources/views/test/model/form/select-directive-usages.f3ah @@ -0,0 +1,37 @@ +<#-- + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +--> +<html> +<body> + + <h1>Form 1</h1> + <hr/> + <form id="form1"> + <table> + <tr> + <th>Favorite Sport:</th> + <td> + <#assign sports=[ 'football', 'handball', 'basketball', 'volleyball' ] /> + <@form.select 'user.favoriteSport' items=sports /> + </td> + </tr> + </table> + </form> + +</body> +</html> http://git-wip-us.apache.org/repos/asf/freemarker/blob/e9ca9d4c/freemarker-spring/src/test/resources/META-INF/web-resources/views/test/model/form/select-directive-usages.ftlh ---------------------------------------------------------------------- diff --git a/freemarker-spring/src/test/resources/META-INF/web-resources/views/test/model/form/select-directive-usages.ftlh b/freemarker-spring/src/test/resources/META-INF/web-resources/views/test/model/form/select-directive-usages.ftlh deleted file mode 100644 index 7152055..0000000 --- a/freemarker-spring/src/test/resources/META-INF/web-resources/views/test/model/form/select-directive-usages.ftlh +++ /dev/null @@ -1,37 +0,0 @@ -<#-- - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. ---> -<html> -<body> - - <h1>Form 1</h1> - <hr/> - <form id="form1"> - <table> - <tr> - <th>Favorite Sport:</th> - <td> - <#assign sports=[ 'football', 'handball', 'basketball', 'volleyball' ] /> - <@form.select 'user.favoriteSport' items=sports /> - </td> - </tr> - </table> - </form> - -</body> -</html> http://git-wip-us.apache.org/repos/asf/freemarker/blob/e9ca9d4c/freemarker-spring/src/test/resources/META-INF/web-resources/views/test/model/form/textarea-directive-usages.f3ah ---------------------------------------------------------------------- diff --git a/freemarker-spring/src/test/resources/META-INF/web-resources/views/test/model/form/textarea-directive-usages.f3ah b/freemarker-spring/src/test/resources/META-INF/web-resources/views/test/model/form/textarea-directive-usages.f3ah new file mode 100644 index 0000000..944e278 --- /dev/null +++ b/freemarker-spring/src/test/resources/META-INF/web-resources/views/test/model/form/textarea-directive-usages.f3ah @@ -0,0 +1,36 @@ +<#-- + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +--> +<html> +<body> + + <h1>Form 1</h1> + <hr/> + <form id="form1"> + <table> + <tr> + <th>Description:</th> + <td> + <@form.textarea 'user.description' rows="10" cols="80" /> + </td> + </tr> + </table> + </form> + +</body> +</html> http://git-wip-us.apache.org/repos/asf/freemarker/blob/e9ca9d4c/freemarker-spring/src/test/resources/META-INF/web-resources/views/test/model/form/textarea-directive-usages.ftlh ---------------------------------------------------------------------- diff --git a/freemarker-spring/src/test/resources/META-INF/web-resources/views/test/model/form/textarea-directive-usages.ftlh b/freemarker-spring/src/test/resources/META-INF/web-resources/views/test/model/form/textarea-directive-usages.ftlh deleted file mode 100644 index 944e278..0000000 --- a/freemarker-spring/src/test/resources/META-INF/web-resources/views/test/model/form/textarea-directive-usages.ftlh +++ /dev/null @@ -1,36 +0,0 @@ -<#-- - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. ---> -<html> -<body> - - <h1>Form 1</h1> - <hr/> - <form id="form1"> - <table> - <tr> - <th>Description:</th> - <td> - <@form.textarea 'user.description' rows="10" cols="80" /> - </td> - </tr> - </table> - </form> - -</body> -</html> http://git-wip-us.apache.org/repos/asf/freemarker/blob/e9ca9d4c/freemarker-spring/src/test/resources/META-INF/web-resources/views/test/model/message-function-basic-usages.f3ah ---------------------------------------------------------------------- diff --git a/freemarker-spring/src/test/resources/META-INF/web-resources/views/test/model/message-function-basic-usages.f3ah b/freemarker-spring/src/test/resources/META-INF/web-resources/views/test/model/message-function-basic-usages.f3ah new file mode 100644 index 0000000..7b663c1 --- /dev/null +++ b/freemarker-spring/src/test/resources/META-INF/web-resources/views/test/model/message-function-basic-usages.f3ah @@ -0,0 +1,31 @@ +<#-- + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +--> +<html> +<body> + +<#if user??> + <div id="userId">${spring.message("user.id")!}</div> + <div id="userEmail">${spring.message("user.email")!}</div> + <div id="userInfoWithArgs">${spring.message("user.form.message", user.firstName, user.lastName, user.email)!}</div> +<#else> + <div id="errorMessage">${spring.message(message=errorMessage)!}</div> +</#if> + +</body> +</html> http://git-wip-us.apache.org/repos/asf/freemarker/blob/e9ca9d4c/freemarker-spring/src/test/resources/META-INF/web-resources/views/test/model/message-function-basic-usages.ftlh ---------------------------------------------------------------------- diff --git a/freemarker-spring/src/test/resources/META-INF/web-resources/views/test/model/message-function-basic-usages.ftlh b/freemarker-spring/src/test/resources/META-INF/web-resources/views/test/model/message-function-basic-usages.ftlh deleted file mode 100644 index 7b663c1..0000000 --- a/freemarker-spring/src/test/resources/META-INF/web-resources/views/test/model/message-function-basic-usages.ftlh +++ /dev/null @@ -1,31 +0,0 @@ -<#-- - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. ---> -<html> -<body> - -<#if user??> - <div id="userId">${spring.message("user.id")!}</div> - <div id="userEmail">${spring.message("user.email")!}</div> - <div id="userInfoWithArgs">${spring.message("user.form.message", user.firstName, user.lastName, user.email)!}</div> -<#else> - <div id="errorMessage">${spring.message(message=errorMessage)!}</div> -</#if> - -</body> -</html> http://git-wip-us.apache.org/repos/asf/freemarker/blob/e9ca9d4c/freemarker-spring/src/test/resources/META-INF/web-resources/views/test/model/nestedpath-directive-basic-usages.f3ah ---------------------------------------------------------------------- diff --git a/freemarker-spring/src/test/resources/META-INF/web-resources/views/test/model/nestedpath-directive-basic-usages.f3ah b/freemarker-spring/src/test/resources/META-INF/web-resources/views/test/model/nestedpath-directive-basic-usages.f3ah new file mode 100644 index 0000000..da231bd --- /dev/null +++ b/freemarker-spring/src/test/resources/META-INF/web-resources/views/test/model/nestedpath-directive-basic-usages.f3ah @@ -0,0 +1,54 @@ +<#-- + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +--> +<html> +<body> + +<@spring.nestedPath "user"> + <table class="table"> + <tbody> + <tr> + <th>E-Mail</th> + <td> + <@spring.bind "email"; status> + <input type="text" name="email" value="${status.value!}" /> + </@spring.bind> + </td> + </tr> + <tr> + <th>First Name</th> + <td> + <@spring.bind "firstName"; status> + <input type="text" name="firstName" value="${status.value!}" /> + </@spring.bind> + </td> + </tr> + <tr> + <th>Last Name</th> + <td> + <@spring.bind "lastName"; status> + <input type="text" name="lastName" value="${status.value!}" /> + </@spring.bind> + </td> + </tr> + </tbody> + </table> +</@spring.nestedPath> + +</body> +</html> http://git-wip-us.apache.org/repos/asf/freemarker/blob/e9ca9d4c/freemarker-spring/src/test/resources/META-INF/web-resources/views/test/model/nestedpath-directive-basic-usages.ftlh ---------------------------------------------------------------------- diff --git a/freemarker-spring/src/test/resources/META-INF/web-resources/views/test/model/nestedpath-directive-basic-usages.ftlh b/freemarker-spring/src/test/resources/META-INF/web-resources/views/test/model/nestedpath-directive-basic-usages.ftlh deleted file mode 100644 index da231bd..0000000 --- a/freemarker-spring/src/test/resources/META-INF/web-resources/views/test/model/nestedpath-directive-basic-usages.ftlh +++ /dev/null @@ -1,54 +0,0 @@ -<#-- - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. ---> -<html> -<body> - -<@spring.nestedPath "user"> - <table class="table"> - <tbody> - <tr> - <th>E-Mail</th> - <td> - <@spring.bind "email"; status> - <input type="text" name="email" value="${status.value!}" /> - </@spring.bind> - </td> - </tr> - <tr> - <th>First Name</th> - <td> - <@spring.bind "firstName"; status> - <input type="text" name="firstName" value="${status.value!}" /> - </@spring.bind> - </td> - </tr> - <tr> - <th>Last Name</th> - <td> - <@spring.bind "lastName"; status> - <input type="text" name="lastName" value="${status.value!}" /> - </@spring.bind> - </td> - </tr> - </tbody> - </table> -</@spring.nestedPath> - -</body> -</html> http://git-wip-us.apache.org/repos/asf/freemarker/blob/e9ca9d4c/freemarker-spring/src/test/resources/META-INF/web-resources/views/test/model/theme-function-basic-usages.f3ah ---------------------------------------------------------------------- diff --git a/freemarker-spring/src/test/resources/META-INF/web-resources/views/test/model/theme-function-basic-usages.f3ah b/freemarker-spring/src/test/resources/META-INF/web-resources/views/test/model/theme-function-basic-usages.f3ah new file mode 100644 index 0000000..de8f901 --- /dev/null +++ b/freemarker-spring/src/test/resources/META-INF/web-resources/views/test/model/theme-function-basic-usages.f3ah @@ -0,0 +1,30 @@ +<#-- + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +--> +<html> +<head> +<link rel="stylesheet" href="${spring.theme('styleSheet')}" type="text/css" /> +</head> +<body> + + <div id="user" class="${spring.theme('userClass', 'selected')}"> + ${user.firstName!} ${user.lastName!} + </div> + +</body> +</html> http://git-wip-us.apache.org/repos/asf/freemarker/blob/e9ca9d4c/freemarker-spring/src/test/resources/META-INF/web-resources/views/test/model/theme-function-basic-usages.ftlh ---------------------------------------------------------------------- diff --git a/freemarker-spring/src/test/resources/META-INF/web-resources/views/test/model/theme-function-basic-usages.ftlh b/freemarker-spring/src/test/resources/META-INF/web-resources/views/test/model/theme-function-basic-usages.ftlh deleted file mode 100644 index de8f901..0000000 --- a/freemarker-spring/src/test/resources/META-INF/web-resources/views/test/model/theme-function-basic-usages.ftlh +++ /dev/null @@ -1,30 +0,0 @@ -<#-- - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. ---> -<html> -<head> -<link rel="stylesheet" href="${spring.theme('styleSheet')}" type="text/css" /> -</head> -<body> - - <div id="user" class="${spring.theme('userClass', 'selected')}"> - ${user.firstName!} ${user.lastName!} - </div> - -</body> -</html> http://git-wip-us.apache.org/repos/asf/freemarker/blob/e9ca9d4c/freemarker-spring/src/test/resources/META-INF/web-resources/views/test/model/transform-function-basic-usages.f3ah ---------------------------------------------------------------------- diff --git a/freemarker-spring/src/test/resources/META-INF/web-resources/views/test/model/transform-function-basic-usages.f3ah b/freemarker-spring/src/test/resources/META-INF/web-resources/views/test/model/transform-function-basic-usages.f3ah new file mode 100644 index 0000000..ca53330 --- /dev/null +++ b/freemarker-spring/src/test/resources/META-INF/web-resources/views/test/model/transform-function-basic-usages.f3ah @@ -0,0 +1,27 @@ +<#-- + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +--> +<html> +<body> + +<@spring.bind "user.birthDate"; status> + <div id="userBirthDate">${spring.transform(status.editor, status.actualValue)}</div> +</@spring.bind> + +</body> +</html> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/freemarker/blob/e9ca9d4c/freemarker-spring/src/test/resources/META-INF/web-resources/views/test/model/transform-function-basic-usages.ftlh ---------------------------------------------------------------------- diff --git a/freemarker-spring/src/test/resources/META-INF/web-resources/views/test/model/transform-function-basic-usages.ftlh b/freemarker-spring/src/test/resources/META-INF/web-resources/views/test/model/transform-function-basic-usages.ftlh deleted file mode 100644 index ca53330..0000000 --- a/freemarker-spring/src/test/resources/META-INF/web-resources/views/test/model/transform-function-basic-usages.ftlh +++ /dev/null @@ -1,27 +0,0 @@ -<#-- - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. ---> -<html> -<body> - -<@spring.bind "user.birthDate"; status> - <div id="userBirthDate">${spring.transform(status.editor, status.actualValue)}</div> -</@spring.bind> - -</body> -</html> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/freemarker/blob/e9ca9d4c/freemarker-spring/src/test/resources/META-INF/web-resources/views/test/model/url-function-basic-usages.f3ah ---------------------------------------------------------------------- diff --git a/freemarker-spring/src/test/resources/META-INF/web-resources/views/test/model/url-function-basic-usages.f3ah b/freemarker-spring/src/test/resources/META-INF/web-resources/views/test/model/url-function-basic-usages.f3ah new file mode 100644 index 0000000..4ae19e2 --- /dev/null +++ b/freemarker-spring/src/test/resources/META-INF/web-resources/views/test/model/url-function-basic-usages.f3ah @@ -0,0 +1,83 @@ +<#-- + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +--> +<html> +<body> + +<#-- NOTE: spring.url function should not use this number format. --> +<#setting numberFormat="00000000" /> + +<h2 id="usersListHeader"> + <a href="${spring.url('/users/')}">Users List</a> +</h2> + +<h3 id="usersListHeaderWithSortParams"> + <a href="${spring.url('/users/', sortField='birthDate', sortDirection='descending')}">Users List</a> +</h3> + +<h2 id="otherAppsUsersListHeader"> + <a href="${spring.url('/users/', context='/otherapp')}">Users List</a> +</h2> + +<h3 id="otherAppsUsersListHeaderWithSortParams"> + <a href="${spring.url('/users/', context='/otherapp', sortField='birthDate', sortDirection='descending')}">Users List</a> +</h3> + +<ul> + <#list users as user> + <li> + <div id="user-${user.id!}"> + <a class="userIdLink" href="${spring.url('/users/{userId}/', userId=user.id)}">${user.id!}</a> + <a class="userNameLink" href="${spring.url('/users/${user.id}/')}">${user.firstName!} ${user.lastName!}</a> + + <#attempt> + <a class="badUserBirthDateLink" href="${spring.url('/users/{userId}/', userId=user.id, birthDate=user.birthDate)}">${user.birthDate?date}</a> + <#recover> + <a class="goodUserBirthDateLink" href="${spring.url('/users/{userId}/', userId=user.id, birthDate=user.birthDate?string['yyyy-MM-dd'])}">${user.birthDate?date}</a> + </#attempt> + + </div> + </li> + </#list> +</ul> + +<div id="freeMarkerManualUrl"> + <a href="${spring.url('http://freemarker.org/docs/index.html')}">Apache FreeMarker Manual</a> +</div> + +<#-- List or Map is not allowed to pass as url parameter directly. --> +<#assign userIdList = [ '101', '102' ] /> +<#assign userInfoMap = { "101": "John", "102": "Jane" } /> + +<div id="listLinkTest"> + <#attempt> + <a class="badListLink" href="${spring.url('/users/', items=userIdList)}">User List Link</a> + <#recover> + <a class="goodListLink" href="${spring.url('/users/', items=userIdList?join('_'))}">User List Link</a> + </#attempt> +</div> +<div id="mapLinkTest"> + <#attempt> + <a class="badMapLink" href="${spring.url('/users/', items=userInfoMap)}">User List Link</a> + <#recover> + <a class="goodMapLink" href="${spring.url('/users/', items=userInfoMap?keys?join('_'))}">User List Link</a> + </#attempt> +</div> + +</body> +</html> http://git-wip-us.apache.org/repos/asf/freemarker/blob/e9ca9d4c/freemarker-spring/src/test/resources/META-INF/web-resources/views/test/model/url-function-basic-usages.ftlh ---------------------------------------------------------------------- diff --git a/freemarker-spring/src/test/resources/META-INF/web-resources/views/test/model/url-function-basic-usages.ftlh b/freemarker-spring/src/test/resources/META-INF/web-resources/views/test/model/url-function-basic-usages.ftlh deleted file mode 100644 index 4ae19e2..0000000 --- a/freemarker-spring/src/test/resources/META-INF/web-resources/views/test/model/url-function-basic-usages.ftlh +++ /dev/null @@ -1,83 +0,0 @@ -<#-- - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. ---> -<html> -<body> - -<#-- NOTE: spring.url function should not use this number format. --> -<#setting numberFormat="00000000" /> - -<h2 id="usersListHeader"> - <a href="${spring.url('/users/')}">Users List</a> -</h2> - -<h3 id="usersListHeaderWithSortParams"> - <a href="${spring.url('/users/', sortField='birthDate', sortDirection='descending')}">Users List</a> -</h3> - -<h2 id="otherAppsUsersListHeader"> - <a href="${spring.url('/users/', context='/otherapp')}">Users List</a> -</h2> - -<h3 id="otherAppsUsersListHeaderWithSortParams"> - <a href="${spring.url('/users/', context='/otherapp', sortField='birthDate', sortDirection='descending')}">Users List</a> -</h3> - -<ul> - <#list users as user> - <li> - <div id="user-${user.id!}"> - <a class="userIdLink" href="${spring.url('/users/{userId}/', userId=user.id)}">${user.id!}</a> - <a class="userNameLink" href="${spring.url('/users/${user.id}/')}">${user.firstName!} ${user.lastName!}</a> - - <#attempt> - <a class="badUserBirthDateLink" href="${spring.url('/users/{userId}/', userId=user.id, birthDate=user.birthDate)}">${user.birthDate?date}</a> - <#recover> - <a class="goodUserBirthDateLink" href="${spring.url('/users/{userId}/', userId=user.id, birthDate=user.birthDate?string['yyyy-MM-dd'])}">${user.birthDate?date}</a> - </#attempt> - - </div> - </li> - </#list> -</ul> - -<div id="freeMarkerManualUrl"> - <a href="${spring.url('http://freemarker.org/docs/index.html')}">Apache FreeMarker Manual</a> -</div> - -<#-- List or Map is not allowed to pass as url parameter directly. --> -<#assign userIdList = [ '101', '102' ] /> -<#assign userInfoMap = { "101": "John", "102": "Jane" } /> - -<div id="listLinkTest"> - <#attempt> - <a class="badListLink" href="${spring.url('/users/', items=userIdList)}">User List Link</a> - <#recover> - <a class="goodListLink" href="${spring.url('/users/', items=userIdList?join('_'))}">User List Link</a> - </#attempt> -</div> -<div id="mapLinkTest"> - <#attempt> - <a class="badMapLink" href="${spring.url('/users/', items=userInfoMap)}">User List Link</a> - <#recover> - <a class="goodMapLink" href="${spring.url('/users/', items=userInfoMap?keys?join('_'))}">User List Link</a> - </#attempt> -</div> - -</body> -</html> http://git-wip-us.apache.org/repos/asf/freemarker/blob/e9ca9d4c/freemarker-spring/src/test/resources/org/apache/freemarker/spring/example/mvc/users/users-mvc-context.xml ---------------------------------------------------------------------- diff --git a/freemarker-spring/src/test/resources/org/apache/freemarker/spring/example/mvc/users/users-mvc-context.xml b/freemarker-spring/src/test/resources/org/apache/freemarker/spring/example/mvc/users/users-mvc-context.xml index 796da8d..5fec285 100644 --- a/freemarker-spring/src/test/resources/org/apache/freemarker/spring/example/mvc/users/users-mvc-context.xml +++ b/freemarker-spring/src/test/resources/org/apache/freemarker/spring/example/mvc/users/users-mvc-context.xml @@ -40,7 +40,7 @@ <bean id="viewResolver" class="org.apache.freemarker.spring.web.view.FreeMarkerViewResolver"> <property name="configuration" ref="configuration" /> <property name="prefix" value="/views/" /> - <property name="suffix" value=".ftlh" /> + <property name="suffix" value=".f3ah" /> </bean> <bean id="themeSource" class="org.springframework.ui.context.support.ResourceBundleThemeSource">