Re: Cascading Nature of Templates and Themes
I have made an example app and it works https://github.com/lukaszlenart/struts2-theme-inherit 2015-05-05 8:12 GMT+02:00 Zoran Avtarovski zo...@sparecreative.com: Hi Lucasz, I had copied all the missing simple templates into my mobile template don't do it, Struts will find them. Just override those templates which you need I don¹t think I was clear enough here. If I don¹t include the file the error is thrown. The issue I have is struts doesn¹t find them working up the chain. Maybe because of hardcoded simple - and it happens that not all templates were adjusted to be expandTheme friendly ;) The mobile select.ftl template is simply: #include /${parameters.templateDir}/${parameters.expandTheme}/controlheader.ftl / #include /${parameters.templateDir}/simple/select.ftl / You shouldn't hardcode simple here, use expandTheme to tell Struts to check your theme first and than parent theme. I was just following the guidelines. If I don¹t hardcode simple aren¹t I at risk of a circular reference, as the file will simply reference itself? Z. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Cascading Nature of Templates and Themes
Hi Lucasz, I had copied all the missing simple templates into my mobile template don't do it, Struts will find them. Just override those templates which you need I don¹t think I was clear enough here. If I don¹t include the file the error is thrown. The issue I have is struts doesn¹t find them working up the chain. Maybe because of hardcoded simple - and it happens that not all templates were adjusted to be expandTheme friendly ;) The mobile select.ftl template is simply: #include /${parameters.templateDir}/${parameters.expandTheme}/controlheader.ftl / #include /${parameters.templateDir}/simple/select.ftl / You shouldn't hardcode simple here, use expandTheme to tell Struts to check your theme first and than parent theme. I was just following the guidelines. If I don¹t hardcode simple aren¹t I at risk of a circular reference, as the file will simply reference itself? Z. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Cascading Nature of Templates and Themes
2015-05-05 7:19 GMT+02:00 Zoran Avtarovski zo...@sparecreative.com: I spoke too soon. I just replaced all instances of parameters.theme with parameters.expandTheme. I had copied all the missing simple templates into my mobile template don't do it, Struts will find them. Just override those templates which you need directory as a work-around. When I deleted optgroup.ftl from the mobile template directory I get the following error: ERROR [ajp-nio-8009-exec-2] - Template processing error: Error reading included file template/~~~mobile/optgroup.ftl Error reading included file template/~~~mobile/optgroup.ftl The problematic instruction: -- == include /${parameters.templateDir}/${parameters.expandTheme}/optgroup.ftl [on line 118, column 1 in template/simple/select.ftl] in include /${parameters.templateDir}/simple/select.ftl [on line 25, column 1 in template/mobile/select.ftl] -- Java backtrace for programmers: -- freemarker.template.TemplateException: Error reading included file template/~~~mobile/optgroup.ftl . . . Caused by: java.io.FileNotFoundException: Template template/~~~mobile/optgroup.ftl not found. What I don’t understand I why the template manager doesn’t try to load optgroup.ftl from the simple template? Maybe because of hardcoded simple - and it happens that not all templates were adjusted to be expandTheme friendly ;) The mobile select.ftl template is simply: #include /${parameters.templateDir}/${parameters.expandTheme}/controlheader.ftl / #include /${parameters.templateDir}/simple/select.ftl / You shouldn't hardcode simple here, use expandTheme to tell Struts to check your theme first and than parent theme. #include /${parameters.templateDir}/${parameters.expandTheme}/controlfooter.ftl / Regards -- Łukasz + 48 606 323 122 http://www.lenart.org.pl/ - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Cascading Nature of Templates and Themes
Thanks for the pointer Lucasz. One thing I did notice was that some of my files didn’t use the ${parameters.expandTheme} parameter, but instead just had plain old ${parameters.theme} in the free marker templates. I’ll make the changes and I’m pretty sure that should resolve the issue. Again thanks for the help. Z. On 1/05/2015 6:23 pm, Lukasz Lenart lukaszlen...@apache.org wrote: 2015-05-01 1:32 GMT+02:00 Zoran Avtarovski zo...@sparecreative.com: We¹ve started a new project which required a custom theme which we call mobile and we set it to extend the simple theme by creating a theme.properties file and setting parent=simple. Unfortunately this isn¹t working. It has in the past without any issues. Has something changed in the latest version of struts that would explain this? We are using struts 2.3.20 and freemarker 2.3.19 if it makes any difference. Strange, the same mechanism is used by Struts itself. Can you show project's structure? Or prepare a small demo app to represent your case? Here you have some examples: https://github.com/apache/struts-examples/tree/master/themes https://github.com/apache/struts-examples/tree/master/themes_override Regards -- Łukasz + 48 606 323 122 http://www.lenart.org.pl/ - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Cascading Nature of Templates and Themes
I spoke too soon. I just replaced all instances of parameters.theme with parameters.expandTheme. I had copied all the missing simple templates into my mobile template directory as a work-around. When I deleted optgroup.ftl from the mobile template directory I get the following error: ERROR [ajp-nio-8009-exec-2] - Template processing error: Error reading included file template/~~~mobile/optgroup.ftl Error reading included file template/~~~mobile/optgroup.ftl The problematic instruction: -- == include /${parameters.templateDir}/${parameters.expandTheme}/optgroup.ftl [on line 118, column 1 in template/simple/select.ftl] in include /${parameters.templateDir}/simple/select.ftl [on line 25, column 1 in template/mobile/select.ftl] -- Java backtrace for programmers: -- freemarker.template.TemplateException: Error reading included file template/~~~mobile/optgroup.ftl . . . Caused by: java.io.FileNotFoundException: Template template/~~~mobile/optgroup.ftl not found. What I don’t understand I why the template manager doesn’t try to load optgroup.ftl from the simple template? The mobile select.ftl template is simply: #include /${parameters.templateDir}/${parameters.expandTheme}/controlheader.ftl / #include /${parameters.templateDir}/simple/select.ftl / #include /${parameters.templateDir}/${parameters.expandTheme}/controlfooter.ftl / And the theme.properties file has one entry: parent=simple Again any assistance would be appreciated. Z. On 1/05/2015 6:23 pm, Lukasz Lenart lukaszlen...@apache.org wrote: 2015-05-01 1:32 GMT+02:00 Zoran Avtarovski zo...@sparecreative.com: We¹ve started a new project which required a custom theme which we call mobile and we set it to extend the simple theme by creating a theme.properties file and setting parent=simple. Unfortunately this isn¹t working. It has in the past without any issues. Has something changed in the latest version of struts that would explain this? We are using struts 2.3.20 and freemarker 2.3.19 if it makes any difference. Strange, the same mechanism is used by Struts itself. Can you show project's structure? Or prepare a small demo app to represent your case? Here you have some examples: https://github.com/apache/struts-examples/tree/master/themes https://github.com/apache/struts-examples/tree/master/themes_override Regards -- Łukasz + 48 606 323 122 http://www.lenart.org.pl/ - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Cascading Nature of Templates and Themes
2015-05-01 1:32 GMT+02:00 Zoran Avtarovski zo...@sparecreative.com: We¹ve started a new project which required a custom theme which we call mobile and we set it to extend the simple theme by creating a theme.properties file and setting parent=simple. Unfortunately this isn¹t working. It has in the past without any issues. Has something changed in the latest version of struts that would explain this? We are using struts 2.3.20 and freemarker 2.3.19 if it makes any difference. Strange, the same mechanism is used by Struts itself. Can you show project's structure? Or prepare a small demo app to represent your case? Here you have some examples: https://github.com/apache/struts-examples/tree/master/themes https://github.com/apache/struts-examples/tree/master/themes_override Regards -- Łukasz + 48 606 323 122 http://www.lenart.org.pl/ - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Cascading Nature of Templates and Themes
We¹ve started a new project which required a custom theme which we call mobile and we set it to extend the simple theme by creating a theme.properties file and setting parent=simple. Unfortunately this isn¹t working. It has in the past without any issues. Has something changed in the latest version of struts that would explain this? We are using struts 2.3.20 and freemarker 2.3.19 if it makes any difference. Z.
Re: /struts2examples/themes and Struts2-3-16
Chris christalkto at yahoo.fr writes: Hello, Problem since 2013-12-12 with the new version themes and Struts2.3.16 https://svn.apache.org/repos/asf/struts/sandbox/trunk/struts2examples/themes in Struts-2.3.16 The new version A struts2examples\themes\src\main\webapp\template\KUTheme_simple\theme.propert ies A struts2examples\themes\src\main\webapp\template\KUTheme\theme.properties U struts2examples\themes\src\main\webapp\template\KUTheme\checkboxlist.ftl U struts2examples\themes\src\main\webapp\thankyou.jsp But the problem with include ? ( theme old with Struts2.3.15.3 is OK ) FreeMarker template error! Error reading included file template/~~~KUTheme/controlheader-core.ftl The problematic instruction: -- == include /${parameters.templateDir}/${parameters.expandTheme}/controlheader- core.ftl [on line 23, column 1 in template/xhtml/controlheader.ftl] in include /${parameters.templateDir}/xhtml/controlheader.ftl [on line 1, column 1 in template/KUTheme/checkboxlist.ftl] -- Java backtrace for programmers: -- freemarker.template.TemplateException: Error reading included file template/~~~KUTheme/controlheader-core.ftl at freemarker.core.Include.accept(Include.java:167) at freemarker.core.Environment.visit(Environment.java:221) at freemarker.core.MixedContent.accept(MixedContent.java:92) at freemarker.core.Environment.visit(Environment.java:221) at freemarker.core.Environment.include(Environment.java:1508) .../... ol liTemplate template/~~~KUTheme/controlheader-core.ftl not found./li liError reading included file template/~~~KUTheme/controlheader-core.ftl/li liError reading included file template/~~~KUTheme/controlheader-core.ftl - Class: freemarker.core.Include File: Include.java Method: accept.../... Did you create the custom theme with on Struts version and then try to upgrade to Struts2.3.16? I suspect the files copied over during theme creation don't include changes to 2.3.16. https://issues.apache.org/jira/browse/WW-4145? jql=project%20%3D%20WW%20AND%20fixVersion%20%3D%20%222.3.16%22%20ORDER%20BY% 20updated%20DESC%2C%20priority%20DESC%2C%20created%20ASC - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: /struts2examples/themes and Struts2-3-16
Hello, The/struts2examples/themes is ok now, since a new updated at 2013-12-13. Regards, Chris
Re: /struts2examples/themes and Struts2-3-16
I guess I know, now. It's the 4's team : Netbeans 7 - Tomcat 7 - Struts2.3.16 - DEBUG level in log4j.xml for com.opensymphony The Themes example is not the only one , with which I found thousand of lines in view server output. On my own old PC , more than 10 mn for 340 000 lines The problem does not happen If I change only one thing in the 4's team. ( Netbeans 6.5 , or GlassFish 3.1.2 , or INFO level ) I prefer INFO level. ;-) Regards Le Lundi 16 décembre 2013 10h15, Lukasz Lenart lukaszlen...@apache.org a écrit : Hm... I'm using Maven to handle all the dependencies so I don't know what can be wrong on your side. Right now the template folder must be placed under classpath to work (or it can be placed under webapp if you copied the whole parent template) - but I have solution how to solve that problem as well. Regards -- Łukasz + 48 606 323 122 http://www.lenart.org.pl/ 2013/12/16 Chris christal...@yahoo.fr: Hello Łukasz, I tried this morning on a faster PC, and it works But there is a long long long output with Apache Tomcat ( View Serveur Output ) and I obtain no less than 333 400 lines in 2 mn. With my own PC (old)XP it was much more long and I had to stop this output I don't know why I have those 333 400 lines, with some another examples too. May be something is wrong with my 13 jar files ? I 'll try another download 23/11/2013 17:55 asm-3.3.jar 23/11/2013 17:55 asm-commons-3.3.jar 23/11/2013 17:55 asm-tree-3.3.jar 23/11/2013 17:57 commons-fileupload-1.3.jar 23/11/2013 17:55 commons-io-2.2.jar 23/11/2013 17:55 commons-lang3-3.1.jar 23/11/2013 17:55 commons-logging-1.1.3.jar 23/11/2013 17:57 freemarker-2.3.19.jar 23/11/2013 17:55 javassist-3.11.0.GA.jar 23/11/2013 17:57 log4j-1.2.17.jar 23/11/2013 17:55 ognl-3.0.6.jar 30/11/2013 11:42 struts2-core-2.3.16.jar 30/11/2013 11:39 xwork-core-2.3.16.jar And for debugging_struts sample 30/11/2013 12:00 struts2-config-browser-plugin-2.3.16.jar I saw also the whole template folder was moved. ( not the same as the old sample ) Regards, Chris Le Lundi 16 décembre 2013 7h42, Lukasz Lenart lukaszlen...@apache.org a écrit : Ok, so you see changes in checkboxlist.ftl - I also moved the whole template folder from webapp directory to resources, you must see the change. Also use clean redeploy in NetBeans - I'm using command line to build and deploy the new war. Regards -- Łukasz + 48 606 323 122 http://www.lenart.org.pl/ 2013/12/15 Chris christal...@yahoo.fr: Hello, Sorry, I didn't find any solution. Struts 2 Themes and Struts 2.3.16 are not working ( Netbeans 7 and Tomcat 7 ) I believe I have to stop my tests. But old version ( Struts2 Themes before 2013-12-13 ) and Struts 2.3.15.3 only are working. The new files checkboxlist.ftl and theme.properties are differents since 2013-12-13 and are not working with Struts2 == checkboxlist.ftl before 2013-12-13 #include /${parameters.templateDir}/xhtml/controlheader.ftl / #include /${parameters.templateDir}/KUTheme_simple/checkboxlist.ftl / #include /${parameters.templateDir}/xhtml/controlfooter.ftl /#nt/ theme.properties before 2013-12-13 parent = xhtml == checkboxlist.ftl after 2013-12-13 #include /${parameters.templateDir}/${parameters.expandTheme}/controlheader.ftl / #include /${parameters.templateDir}/KUTheme_simple/checkboxlist.ftl / #include /${parameters.templateDir}/${parameters.expandTheme}/controlfooter.ftl /#nt/ theme.properties after 2013-12-13 parent = KUTheme_simple == Sometimes, with Strut2.3.16, Apache log gives a loop like this one 2013-12-15 19:49:42,984 DEBUG com.opensymphony.xwork2.conversion.impl.InstantiatingNullHandler.debug:72 - Entering nullPropertyValue [target=[org.apache.struts.edit.action.EditAction@10a6001, com.opensymphony.xwork2.DefaultTextProvider@1c68b6f], property=org] 2013-12-15 19:49:43,328 DEBUG com.opensymphony.xwork2.ognl.accessor.XWorkMapPropertyAccessor.debug:72 - Entering getProperty (ognl.OgnlContext@44569547,AttributeMap {request={struts.request_uri=/st2_ex_14_themes/edit.action, __cleanup_recursion_counter=1, javax.servlet.forward.request_uri=/st2_ex_14_themes/edit.action, struts.valueStack=com.opensymphony.xwork2.ognl.OgnlValueStack@e00321, struts.actionMapping=ActionMapping{name='edit', namespace='/', method='null', extension='action', params=null, result=null}, struts.view_uri=/edit.jsp, javax.servlet.forward.servlet_path=/edit.action, javax.servlet.forward.context_path=/st2_ex_14_themes}, session={}, application={org.apache.jasper.compiler.ELInterpreter=org.apache.jasper.compiler.ELInterpreterFactory$DefaultELInterpreter@10ce397
Re: /struts2examples/themes and Struts2-3-16
Hello Łukasz, I tried this morning on a faster PC, and it works But there is a long long long output with Apache Tomcat ( View Serveur Output ) and I obtain no less than 333 400 lines in 2 mn. With my own PC (old)XP it was much more long and I had to stop this output I don't know why I have those 333 400 lines, with some another examples too. May be something is wrong with my 13 jar files ? I 'll try another download 23/11/2013 17:55 asm-3.3.jar 23/11/2013 17:55 asm-commons-3.3.jar 23/11/2013 17:55 asm-tree-3.3.jar 23/11/2013 17:57 commons-fileupload-1.3.jar 23/11/2013 17:55 commons-io-2.2.jar 23/11/2013 17:55 commons-lang3-3.1.jar 23/11/2013 17:55 commons-logging-1.1.3.jar 23/11/2013 17:57 freemarker-2.3.19.jar 23/11/2013 17:55 javassist-3.11.0.GA.jar 23/11/2013 17:57 log4j-1.2.17.jar 23/11/2013 17:55 ognl-3.0.6.jar 30/11/2013 11:42 struts2-core-2.3.16.jar 30/11/2013 11:39 xwork-core-2.3.16.jar And for debugging_struts sample 30/11/2013 12:00 struts2-config-browser-plugin-2.3.16.jar I saw also the whole template folder was moved. ( not the same as the old sample ) Regards, Chris Le Lundi 16 décembre 2013 7h42, Lukasz Lenart lukaszlen...@apache.org a écrit : Ok, so you see changes in checkboxlist.ftl - I also moved the whole template folder from webapp directory to resources, you must see the change. Also use clean redeploy in NetBeans - I'm using command line to build and deploy the new war. Regards -- Łukasz + 48 606 323 122 http://www.lenart.org.pl/ 2013/12/15 Chris christal...@yahoo.fr: Hello, Sorry, I didn't find any solution. Struts 2 Themes and Struts 2.3.16 are not working ( Netbeans 7 and Tomcat 7 ) I believe I have to stop my tests. But old version ( Struts2 Themes before 2013-12-13 ) and Struts 2.3.15.3 only are working. The new files checkboxlist.ftl and theme.properties are differents since 2013-12-13 and are not working with Struts2 == checkboxlist.ftl before 2013-12-13 #include /${parameters.templateDir}/xhtml/controlheader.ftl / #include /${parameters.templateDir}/KUTheme_simple/checkboxlist.ftl / #include /${parameters.templateDir}/xhtml/controlfooter.ftl /#nt/ theme.properties before 2013-12-13 parent = xhtml == checkboxlist.ftl after 2013-12-13 #include /${parameters.templateDir}/${parameters.expandTheme}/controlheader.ftl / #include /${parameters.templateDir}/KUTheme_simple/checkboxlist.ftl / #include /${parameters.templateDir}/${parameters.expandTheme}/controlfooter.ftl /#nt/ theme.properties after 2013-12-13 parent = KUTheme_simple == Sometimes, with Strut2.3.16, Apache log gives a loop like this one 2013-12-15 19:49:42,984 DEBUG com.opensymphony.xwork2.conversion.impl.InstantiatingNullHandler.debug:72 - Entering nullPropertyValue [target=[org.apache.struts.edit.action.EditAction@10a6001, com.opensymphony.xwork2.DefaultTextProvider@1c68b6f], property=org] 2013-12-15 19:49:43,328 DEBUG com.opensymphony.xwork2.ognl.accessor.XWorkMapPropertyAccessor.debug:72 - Entering getProperty (ognl.OgnlContext@44569547,AttributeMap {request={struts.request_uri=/st2_ex_14_themes/edit.action, __cleanup_recursion_counter=1, javax.servlet.forward.request_uri=/st2_ex_14_themes/edit.action, struts.valueStack=com.opensymphony.xwork2.ognl.OgnlValueStack@e00321, struts.actionMapping=ActionMapping{name='edit', namespace='/', method='null', extension='action', params=null, result=null}, struts.view_uri=/edit.jsp, javax.servlet.forward.servlet_path=/edit.action, javax.servlet.forward.context_path=/st2_ex_14_themes}, session={}, application={org.apache.jasper.compiler.ELInterpreter=org.apache.jasper.compiler.ELInterpreterFactory$DefaultELInterpreter@10ce397, org.apache.catalina.jsp_classpath=/D:/NetBeansProjects/struts-2.3.15.3/struts2examples.15.3/14_themes/build/web/WEB-INF/classes/;/D:/NetBeansProjects/struts-2.3.15.3/struts2examples.15.3/14_themes/build/web/WEB-INF/lib/asm-3.3.jar;/D:/NetBeansProjects/struts-2.3.15.3/struts2examples.15.3/14_themes/build/web/WEB-INF/lib/asm-commons-3.3.jar;/D:/NetBeansProjects/struts-2.3.15.3/struts2examples.15.3/14_themes/build/web/WEB-INF/lib/asm-tree-3.3.jar;/D:/NetBeansProjects/struts-2.3.15.3/struts2examples.15.3/14_themes/build/web/WEB-INF/lib/commons-fileupload-1.3.jar;/D:/NetBeansProjects/struts-2.3.15.3/struts2examples.15.3/14_themes/build/web/WEB-INF/lib/commons-io-2.2.jar;/D:/NetBeansProjects/struts-2.3.15.3/struts2examples.15.3/14_themes/build/web/WEB-INF/lib/commons-lang3-3.1.jar;/D:/NetBeansProjects/struts-2.3.15.3/struts2examples.15.3/14_themes/build/web/WEB-INF/lib/commons-logging-1.1.3.jar;/D:/NetBeansProjects/struts-2.3.15.3/struts2examples.15.3/14_the mes/build/web/WEB-INF/lib
Re: /struts2examples/themes and Struts2-3-16
Hm... I'm using Maven to handle all the dependencies so I don't know what can be wrong on your side. Right now the template folder must be placed under classpath to work (or it can be placed under webapp if you copied the whole parent template) - but I have solution how to solve that problem as well. Regards -- Łukasz + 48 606 323 122 http://www.lenart.org.pl/ 2013/12/16 Chris christal...@yahoo.fr: Hello Łukasz, I tried this morning on a faster PC, and it works But there is a long long long output with Apache Tomcat ( View Serveur Output ) and I obtain no less than 333 400 lines in 2 mn. With my own PC (old)XP it was much more long and I had to stop this output I don't know why I have those 333 400 lines, with some another examples too. May be something is wrong with my 13 jar files ? I 'll try another download 23/11/2013 17:55 asm-3.3.jar 23/11/2013 17:55 asm-commons-3.3.jar 23/11/2013 17:55 asm-tree-3.3.jar 23/11/2013 17:57 commons-fileupload-1.3.jar 23/11/2013 17:55 commons-io-2.2.jar 23/11/2013 17:55 commons-lang3-3.1.jar 23/11/2013 17:55 commons-logging-1.1.3.jar 23/11/2013 17:57 freemarker-2.3.19.jar 23/11/2013 17:55 javassist-3.11.0.GA.jar 23/11/2013 17:57 log4j-1.2.17.jar 23/11/2013 17:55 ognl-3.0.6.jar 30/11/2013 11:42 struts2-core-2.3.16.jar 30/11/2013 11:39 xwork-core-2.3.16.jar And for debugging_struts sample 30/11/2013 12:00 struts2-config-browser-plugin-2.3.16.jar I saw also the whole template folder was moved. ( not the same as the old sample ) Regards, Chris Le Lundi 16 décembre 2013 7h42, Lukasz Lenart lukaszlen...@apache.org a écrit : Ok, so you see changes in checkboxlist.ftl - I also moved the whole template folder from webapp directory to resources, you must see the change. Also use clean redeploy in NetBeans - I'm using command line to build and deploy the new war. Regards -- Łukasz + 48 606 323 122 http://www.lenart.org.pl/ 2013/12/15 Chris christal...@yahoo.fr: Hello, Sorry, I didn't find any solution. Struts 2 Themes and Struts 2.3.16 are not working ( Netbeans 7 and Tomcat 7 ) I believe I have to stop my tests. But old version ( Struts2 Themes before 2013-12-13 ) and Struts 2.3.15.3 only are working. The new files checkboxlist.ftl and theme.properties are differents since 2013-12-13 and are not working with Struts2 == checkboxlist.ftl before 2013-12-13 #include /${parameters.templateDir}/xhtml/controlheader.ftl / #include /${parameters.templateDir}/KUTheme_simple/checkboxlist.ftl / #include /${parameters.templateDir}/xhtml/controlfooter.ftl /#nt/ theme.properties before 2013-12-13 parent = xhtml == checkboxlist.ftl after 2013-12-13 #include /${parameters.templateDir}/${parameters.expandTheme}/controlheader.ftl / #include /${parameters.templateDir}/KUTheme_simple/checkboxlist.ftl / #include /${parameters.templateDir}/${parameters.expandTheme}/controlfooter.ftl /#nt/ theme.properties after 2013-12-13 parent = KUTheme_simple == Sometimes, with Strut2.3.16, Apache log gives a loop like this one 2013-12-15 19:49:42,984 DEBUG com.opensymphony.xwork2.conversion.impl.InstantiatingNullHandler.debug:72 - Entering nullPropertyValue [target=[org.apache.struts.edit.action.EditAction@10a6001, com.opensymphony.xwork2.DefaultTextProvider@1c68b6f], property=org] 2013-12-15 19:49:43,328 DEBUG com.opensymphony.xwork2.ognl.accessor.XWorkMapPropertyAccessor.debug:72 - Entering getProperty (ognl.OgnlContext@44569547,AttributeMap {request={struts.request_uri=/st2_ex_14_themes/edit.action, __cleanup_recursion_counter=1, javax.servlet.forward.request_uri=/st2_ex_14_themes/edit.action, struts.valueStack=com.opensymphony.xwork2.ognl.OgnlValueStack@e00321, struts.actionMapping=ActionMapping{name='edit', namespace='/', method='null', extension='action', params=null, result=null}, struts.view_uri=/edit.jsp, javax.servlet.forward.servlet_path=/edit.action, javax.servlet.forward.context_path=/st2_ex_14_themes}, session={}, application={org.apache.jasper.compiler.ELInterpreter=org.apache.jasper.compiler.ELInterpreterFactory$DefaultELInterpreter@10ce397, org.apache.catalina.jsp_classpath=/D:/NetBeansProjects/struts-2.3.15.3/struts2examples.15.3/14_themes/build/web/WEB-INF/classes/;/D:/NetBeansProjects/struts-2.3.15.3/struts2examples.15.3/14_themes/build/web/WEB-INF/lib/asm-3.3.jar;/D:/NetBeansProjects/struts-2.3.15.3/struts2examples.15.3/14_themes/build/web/WEB-INF/lib/asm-commons-3.3.jar;/D:/NetBeansProjects/struts-2.3.15.3/struts2examples.15.3/14_themes/build/web/WEB-INF/lib/asm-tree-3.3.jar;/D:/NetBeansProjects/struts-2.3.15.3/struts2examples.15.3/14_themes/build/web/WEB-INF/lib/commons-fileupload-1.3
Re: /struts2examples/themes and Struts2-3-16
Hi, I cannot reproduce the problem, everything works as expected with my changes to the themes example - tried with Jetty and Tomcat 7 and JBoss 7.1 - works like charm. Regards -- Łukasz + 48 606 323 122 http://www.lenart.org.pl/ - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: /struts2examples/themes and Struts2-3-16
Hello, Sorry, I didn't find any solution. Struts 2 Themes and Struts 2.3.16 are not working ( Netbeans 7 and Tomcat 7 ) I believe I have to stop my tests. But old version ( Struts2 Themes before 2013-12-13 ) and Struts 2.3.15.3 only are working. The new files checkboxlist.ftl and theme.properties are differents since 2013-12-13 and are not working with Struts2 == checkboxlist.ftl before 2013-12-13 #include /${parameters.templateDir}/xhtml/controlheader.ftl / #include /${parameters.templateDir}/KUTheme_simple/checkboxlist.ftl / #include /${parameters.templateDir}/xhtml/controlfooter.ftl /#nt/ theme.properties before 2013-12-13 parent = xhtml == checkboxlist.ftl after 2013-12-13 #include /${parameters.templateDir}/${parameters.expandTheme}/controlheader.ftl / #include /${parameters.templateDir}/KUTheme_simple/checkboxlist.ftl / #include /${parameters.templateDir}/${parameters.expandTheme}/controlfooter.ftl /#nt/ theme.properties after 2013-12-13 parent = KUTheme_simple == Sometimes, with Strut2.3.16, Apache log gives a loop like this one 2013-12-15 19:49:42,984 DEBUG com.opensymphony.xwork2.conversion.impl.InstantiatingNullHandler.debug:72 - Entering nullPropertyValue [target=[org.apache.struts.edit.action.EditAction@10a6001, com.opensymphony.xwork2.DefaultTextProvider@1c68b6f], property=org] 2013-12-15 19:49:43,328 DEBUG com.opensymphony.xwork2.ognl.accessor.XWorkMapPropertyAccessor.debug:72 - Entering getProperty (ognl.OgnlContext@44569547,AttributeMap {request={struts.request_uri=/st2_ex_14_themes/edit.action, __cleanup_recursion_counter=1, javax.servlet.forward.request_uri=/st2_ex_14_themes/edit.action, struts.valueStack=com.opensymphony.xwork2.ognl.OgnlValueStack@e00321, struts.actionMapping=ActionMapping{name='edit', namespace='/', method='null', extension='action', params=null, result=null}, struts.view_uri=/edit.jsp, javax.servlet.forward.servlet_path=/edit.action, javax.servlet.forward.context_path=/st2_ex_14_themes}, session={}, application={org.apache.jasper.compiler.ELInterpreter=org.apache.jasper.compiler.ELInterpreterFactory$DefaultELInterpreter@10ce397, org.apache.catalina.jsp_classpath=/D:/NetBeansProjects/struts-2.3.15.3/struts2examples.15.3/14_themes/build/web/WEB-INF/classes/;/D:/NetBeansProjects/struts-2.3.15.3/struts2examples.15.3/14_themes/build/web/WEB-INF/lib/asm-3.3.jar;/D:/NetBeansProjects/struts-2.3.15.3/struts2examples.15.3/14_themes/build/web/WEB-INF/lib/asm-commons-3.3.jar;/D:/NetBeansProjects/struts-2.3.15.3/struts2examples.15.3/14_themes/build/web/WEB-INF/lib/asm-tree-3.3.jar;/D:/NetBeansProjects/struts-2.3.15.3/struts2examples.15.3/14_themes/build/web/WEB-INF/lib/commons-fileupload-1.3.jar;/D:/NetBeansProjects/struts-2.3.15.3/struts2examples.15.3/14_themes/build/web/WEB-INF/lib/commons-io-2.2.jar;/D:/NetBeansProjects/struts-2.3.15.3/struts2examples.15.3/14_themes/build/web/WEB-INF/lib/commons-lang3-3.1.jar;/D:/NetBeansProjects/struts-2.3.15.3/struts2examples.15.3/14_themes/build/web/WEB-INF/lib/commons-logging-1.1.3.jar;/D:/NetBeansProjects/struts-2.3.15.3/struts2examples.15.3/14_the mes/build/web/WEB-INF/lib/freemarker-2.3.19.jar;/D:/NetBeansProjects/struts-2.3.15.3/struts2examples.15.3/14_themes/build/web/WEB-INF/lib/javassist-3.11.0.GA.jar;/D:/NetBeansProjects/struts-2.3.15.3/struts2examples.15.3/14_themes/build/web/WEB-INF/lib/log4j-1.2.17.jar;/D:/NetBeansProjects/struts-2.3.15.3/struts2examples.15.3/14_themes/build/web/WEB-INF/lib/ognl-3.0.6.jar;/D:/NetBeansProjects/struts-2.3.15.3/struts2examples.15.3/14_themes/build/web/WEB-INF/lib/struts2-core-2.3.16.jar;/D:/NetBeansProjects/struts-2.3.15.3/struts2examples.15.3/14_themes/build/web/WEB-INF/lib/xwork-core-2.3.16.jar;/C:/Program Files/Apache Software Foundation/apache-tomcat-7.0.39/lib/;/C:/Program Files/Apache Software Foundation/apache-tomcat-7.0.39/lib/annotations-api.jar;/C:/Program Files/Apache Software Foundation/apache-tomcat-7.0.39/lib/catalina-ant.jar;/C:/Program Files/Apache Software Foundation/apache-tomcat-7.0.39/lib/catalina-ha.jar;/C:/Program Files/Apache Software Foundation/apache-tomcat-7.0.39/lib/catalina-tribes.jar;/C:/Program Files/Apache Software Foundation/apache-tomcat-7.0.39/lib/catalina.jar;/C:/Program Files/Apache Software Foundation/apache-tomcat-7.0.39/lib/ecj-4.2.1.jar;/C:/Program Files/Apache Software Foundation/apache-tomcat-7.0.39/lib/el-api.jar;/C:/Program Files/Apache Software Foundation/apache-tomcat-7.0.39/lib/jasper-el.jar;/C:/Program Files/Apache Software Foundation/apache-tomcat-7.0.39/lib/jasper.jar;/C:/Program Files/Apache Software Foundation/apache-tomcat-7.0.39/lib/jsp-api.jar;/C:/Program Files/Apache Software Foundation/apache-tomcat-7.0.39/lib/servlet-api.jar;/C:/Program Files/Apache Software Foundation
Re: /struts2examples/themes and Struts2-3-16
Ok, so you see changes in checkboxlist.ftl - I also moved the whole template folder from webapp directory to resources, you must see the change. Also use clean redeploy in NetBeans - I'm using command line to build and deploy the new war. Regards -- Łukasz + 48 606 323 122 http://www.lenart.org.pl/ 2013/12/15 Chris christal...@yahoo.fr: Hello, Sorry, I didn't find any solution. Struts 2 Themes and Struts 2.3.16 are not working ( Netbeans 7 and Tomcat 7 ) I believe I have to stop my tests. But old version ( Struts2 Themes before 2013-12-13 ) and Struts 2.3.15.3 only are working. The new files checkboxlist.ftl and theme.properties are differents since 2013-12-13 and are not working with Struts2 == checkboxlist.ftl before 2013-12-13 #include /${parameters.templateDir}/xhtml/controlheader.ftl / #include /${parameters.templateDir}/KUTheme_simple/checkboxlist.ftl / #include /${parameters.templateDir}/xhtml/controlfooter.ftl /#nt/ theme.properties before 2013-12-13 parent = xhtml == checkboxlist.ftl after 2013-12-13 #include /${parameters.templateDir}/${parameters.expandTheme}/controlheader.ftl / #include /${parameters.templateDir}/KUTheme_simple/checkboxlist.ftl / #include /${parameters.templateDir}/${parameters.expandTheme}/controlfooter.ftl /#nt/ theme.properties after 2013-12-13 parent = KUTheme_simple == Sometimes, with Strut2.3.16, Apache log gives a loop like this one 2013-12-15 19:49:42,984 DEBUG com.opensymphony.xwork2.conversion.impl.InstantiatingNullHandler.debug:72 - Entering nullPropertyValue [target=[org.apache.struts.edit.action.EditAction@10a6001, com.opensymphony.xwork2.DefaultTextProvider@1c68b6f], property=org] 2013-12-15 19:49:43,328 DEBUG com.opensymphony.xwork2.ognl.accessor.XWorkMapPropertyAccessor.debug:72 - Entering getProperty (ognl.OgnlContext@44569547,AttributeMap {request={struts.request_uri=/st2_ex_14_themes/edit.action, __cleanup_recursion_counter=1, javax.servlet.forward.request_uri=/st2_ex_14_themes/edit.action, struts.valueStack=com.opensymphony.xwork2.ognl.OgnlValueStack@e00321, struts.actionMapping=ActionMapping{name='edit', namespace='/', method='null', extension='action', params=null, result=null}, struts.view_uri=/edit.jsp, javax.servlet.forward.servlet_path=/edit.action, javax.servlet.forward.context_path=/st2_ex_14_themes}, session={}, application={org.apache.jasper.compiler.ELInterpreter=org.apache.jasper.compiler.ELInterpreterFactory$DefaultELInterpreter@10ce397, org.apache.catalina.jsp_classpath=/D:/NetBeansProjects/struts-2.3.15.3/struts2examples.15.3/14_themes/build/web/WEB-INF/classes/;/D:/NetBeansProjects/struts-2.3.15.3/struts2examples.15.3/14_themes/build/web/WEB-INF/lib/asm-3.3.jar;/D:/NetBeansProjects/struts-2.3.15.3/struts2examples.15.3/14_themes/build/web/WEB-INF/lib/asm-commons-3.3.jar;/D:/NetBeansProjects/struts-2.3.15.3/struts2examples.15.3/14_themes/build/web/WEB-INF/lib/asm-tree-3.3.jar;/D:/NetBeansProjects/struts-2.3.15.3/struts2examples.15.3/14_themes/build/web/WEB-INF/lib/commons-fileupload-1.3.jar;/D:/NetBeansProjects/struts-2.3.15.3/struts2examples.15.3/14_themes/build/web/WEB-INF/lib/commons-io-2.2.jar;/D:/NetBeansProjects/struts-2.3.15.3/struts2examples.15.3/14_themes/build/web/WEB-INF/lib/commons-lang3-3.1.jar;/D:/NetBeansProjects/struts-2.3.15.3/struts2examples.15.3/14_themes/build/web/WEB-INF/lib/commons-logging-1.1.3.jar;/D:/NetBeansProjects/struts-2.3.15.3/struts2examples.15.3/14_the mes/build/web/WEB-INF/lib/freemarker-2.3.19.jar;/D:/NetBeansProjects/struts-2.3.15.3/struts2examples.15.3/14_themes/build/web/WEB-INF/lib/javassist-3.11.0.GA.jar;/D:/NetBeansProjects/struts-2.3.15.3/struts2examples.15.3/14_themes/build/web/WEB-INF/lib/log4j-1.2.17.jar;/D:/NetBeansProjects/struts-2.3.15.3/struts2examples.15.3/14_themes/build/web/WEB-INF/lib/ognl-3.0.6.jar;/D:/NetBeansProjects/struts-2.3.15.3/struts2examples.15.3/14_themes/build/web/WEB-INF/lib/struts2-core-2.3.16.jar;/D:/NetBeansProjects/struts-2.3.15.3/struts2examples.15.3/14_themes/build/web/WEB-INF/lib/xwork-core-2.3.16.jar;/C:/Program Files/Apache Software Foundation/apache-tomcat-7.0.39/lib/;/C:/Program Files/Apache Software Foundation/apache-tomcat-7.0.39/lib/annotations-api.jar;/C:/Program Files/Apache Software Foundation/apache-tomcat-7.0.39/lib/catalina-ant.jar;/C:/Program Files/Apache Software Foundation/apache-tomcat-7.0.39/lib/catalina-ha.jar;/C:/Program Files/Apache Software Foundation/apache-tomcat-7.0.39/lib/catalina-tribes.jar;/C:/Program Files/Apache Software Foundation/apache-tomcat-7.0.39/lib/catalina.jar;/C:/Program Files/Apache Software Foundation/apache-tomcat-7.0.39/lib/ecj-4.2.1.jar;/C:/Program Files/Apache Software Foundation/apache-tomcat-7.0.39/lib/el-api.jar;/C:/Program Files
/struts2examples/themes and Struts2-3-16
Hello, Problem since 2013-12-12 with the new version themes and Struts2.3.16 https://svn.apache.org/repos/asf/struts/sandbox/trunk/struts2examples/themes in Struts-2.3.16 The new version A struts2examples\themes\src\main\webapp\template\KUTheme_simple\theme.properties A struts2examples\themes\src\main\webapp\template\KUTheme\theme.properties U struts2examples\themes\src\main\webapp\template\KUTheme\checkboxlist.ftl U struts2examples\themes\src\main\webapp\thankyou.jsp But the problem with include ? ( theme old with Struts2.3.15.3 is OK ) FreeMarker template error! Error reading included file template/~~~KUTheme/controlheader-core.ftl The problematic instruction: -- == include /${parameters.templateDir}/${parameters.expandTheme}/controlheader-core.ftl [on line 23, column 1 in template/xhtml/controlheader.ftl] in include /${parameters.templateDir}/xhtml/controlheader.ftl [on line 1, column 1 in template/KUTheme/checkboxlist.ftl] -- Java backtrace for programmers: -- freemarker.template.TemplateException: Error reading included file template/~~~KUTheme/controlheader-core.ftl at freemarker.core.Include.accept(Include.java:167) at freemarker.core.Environment.visit(Environment.java:221) at freemarker.core.MixedContent.accept(MixedContent.java:92) at freemarker.core.Environment.visit(Environment.java:221) at freemarker.core.Environment.include(Environment.java:1508) .../... ol liTemplate template/~~~KUTheme/controlheader-core.ftl not found./li liError reading included file template/~~~KUTheme/controlheader-core.ftl/li liError reading included file template/~~~KUTheme/controlheader-core.ftl - Class: freemarker.core.Include File: Include.java Method: accept.../...
Re: /struts2examples/themes and Struts2-3-16
Hi, I'm not sure if I get what you mean, but I have updated that example few hours ago - please update and check again. Regards -- Łukasz + 48 606 323 122 http://www.lenart.org.pl/ 2013/12/13 Chris christal...@yahoo.fr: Hello, Problem since 2013-12-12 with the new version themes and Struts2.3.16 https://svn.apache.org/repos/asf/struts/sandbox/trunk/struts2examples/themes in Struts-2.3.16 The new version A struts2examples\themes\src\main\webapp\template\KUTheme_simple\theme.properties Astruts2examples\themes\src\main\webapp\template\KUTheme\theme.properties Ustruts2examples\themes\src\main\webapp\template\KUTheme\checkboxlist.ftl Ustruts2examples\themes\src\main\webapp\thankyou.jsp But the problem with include ? ( theme old with Struts2.3.15.3 is OK ) FreeMarker template error! Error reading included file template/~~~KUTheme/controlheader-core.ftl The problematic instruction: -- == include /${parameters.templateDir}/${parameters.expandTheme}/controlheader-core.ftl [on line 23, column 1 in template/xhtml/controlheader.ftl] in include /${parameters.templateDir}/xhtml/controlheader.ftl [on line 1, column 1 in template/KUTheme/checkboxlist.ftl] -- Java backtrace for programmers: -- freemarker.template.TemplateException: Error reading included file template/~~~KUTheme/controlheader-core.ftl at freemarker.core.Include.accept(Include.java:167) at freemarker.core.Environment.visit(Environment.java:221) at freemarker.core.MixedContent.accept(MixedContent.java:92) at freemarker.core.Environment.visit(Environment.java:221) at freemarker.core.Environment.include(Environment.java:1508) .../... ol liTemplate template/~~~KUTheme/controlheader-core.ftl not found./li liError reading included file template/~~~KUTheme/controlheader-core.ftl/li liError reading included file template/~~~KUTheme/controlheader-core.ftl - Class: freemarker.core.Include File: Include.java Method: accept.../... - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: /struts2examples/themes and Struts2-3-16
.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246) org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:91) com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246) org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:252) com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246) com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:100) com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246) com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:141) com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246) com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:145) com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246) com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:171) com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98) com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246) com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:139) com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246) org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:164) com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246) com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:193) com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246) com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:189) com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246) org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:54) org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:562) org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77) org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:99) org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390) org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286) org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845) org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) java.lang.Thread.run(Thread.java:619) You are seeing this page because development mode is enabled. Development mode, or devMode, enables extra debugging behaviors and reports to assist developers. To disable this mode, set: struts.devMode=false in your WEB-INF/classes/struts.properties file. Le Vendredi 13 décembre 2013 14h46, Lukasz Lenart lukaszlen...@apache.org a écrit : Hi, I'm not sure if I get what you mean, but I have updated that example few hours ago - please update and check again. Regards -- Łukasz + 48 606 323 122 http://www.lenart.org.pl/ 2013/12/13 Chris christal...@yahoo.fr: Hello, Problem since 2013-12-12 with the new version themes and Struts2.3.16 https://svn.apache.org/repos/asf/struts/sandbox/trunk/struts2examples/themes in Struts-2.3.16 The new version A struts2examples\themes\src\main\webapp\template\KUTheme_simple\theme.properties A struts2examples\themes\src\main\webapp\template\KUTheme\theme.properties U struts2examples\themes\src\main\webapp\template\KUTheme\checkboxlist.ftl U struts2examples\themes\src\main\webapp\thankyou.jsp But the problem with include ? ( theme old with Struts2.3.15.3 is OK ) FreeMarker template error! Error reading included file template/~~~KUTheme/controlheader-core.ftl The problematic
Re: Using themes with s: select
Hi Chris, Thanks for the help. But the change I need is bit different . What I need : [image: Inline image 1] What I am getting : [image: Inline image 2] Code for image 1 : %@ include file=IncludeTop.jsp % %@ taglib prefix=html uri=http://jakarta.apache.org/struts/tags-html; % html:form action=/shop/newOrder.do styleId=workingOrderForm method=post TABLE bgcolor=#008800 border=0 cellpadding=3 cellspacing=1 bgcolor=#88 TR bgcolor=#88TD colspan=2 FONT color=GREEN size=4BPayment Details/B/FONT /TD/TRTR bgcolor=#88TD Card Type:/TDTD html:select name=workingOrderForm property=order.cardType html:options name=workingOrderForm property=creditCardTypes / /html:select /TD/TR Code for image 2 : %@ include file=IncludeTop.jsp % %@ taglib prefix=html uri=http://jakarta.apache.org/struts/tags-html; % %@ taglib prefix=s uri=/struts-tags % %-- html:form action=/shop/newOrder.action styleId=workingOrderForm method=post --% form action=c:url value=/shop/newOrder.action/ method=POST !-- TABLE bgcolor=#008800 border=0 cellpadding=3 cellspacing=1 bgcolor=#88 -- TABLE border=0 cellpadding=3 cellspacing=1 bgcolor=#008800 TR bgcolor=#88TD colspan=2 FONT color=GREEN size=4BPayment Details/B/FONT /TD/TR tr bgcolor=#88s:select cssStyle =background-color : yellow label = Card Type headerKey=-1 headerValue=Cards list=cardTypeList name=cards //tr Please let me know where I am going wrong. Thanks, Srineel On Mon, Sep 9, 2013 at 2:36 AM, Chris Pratt thechrispr...@gmail.com wrote: Try cssStyle=background-color:yellow; (*Chris*) On Sun, Sep 8, 2013 at 9:54 PM, Srineel Mazumdar smaz19...@gmail.com wrote: Hi, I am using s:select to create a dropdown and then checked the html. I wanted to add bgcolor as yellow. I referred to the following link http://struts.apache.org/release/2.2.x/docs/struts-2-themes.html but still not sure how to put the background clour as yellow. Can anyone provide any pointers ? Also, is it OK to use JSTL tags in JSPs in a Struts 2 application ? Thanks, Srineel
Re: Using themes with s: select
Srineel, your images didn't come through the mail list, any chance you could PasteBin them or put them somewhere else accessible? (*Chris*) On Tue, Sep 10, 2013 at 7:50 AM, Srineel Mazumdar smaz19...@gmail.comwrote: Hi Chris, Thanks for the help. But the change I need is bit different . What I need : [image: Inline image 1] What I am getting : [image: Inline image 2] Code for image 1 : %@ include file=IncludeTop.jsp % %@ taglib prefix=html uri=http://jakarta.apache.org/struts/tags-html; % html:form action=/shop/newOrder.do styleId=workingOrderForm method=post TABLE bgcolor=#008800 border=0 cellpadding=3 cellspacing=1 bgcolor=#88 TR bgcolor=#88TD colspan=2 FONT color=GREEN size=4BPayment Details/B/FONT /TD/TRTR bgcolor=#88TD Card Type:/TDTD html:select name=workingOrderForm property=order.cardType html:options name=workingOrderForm property=creditCardTypes / /html:select /TD/TR Code for image 2 : %@ include file=IncludeTop.jsp % %@ taglib prefix=html uri=http://jakarta.apache.org/struts/tags-html; % %@ taglib prefix=s uri=/struts-tags % %-- html:form action=/shop/newOrder.action styleId=workingOrderForm method=post --% form action=c:url value=/shop/newOrder.action/ method=POST !-- TABLE bgcolor=#008800 border=0 cellpadding=3 cellspacing=1 bgcolor=#88 -- TABLE border=0 cellpadding=3 cellspacing=1 bgcolor=#008800 TR bgcolor=#88TD colspan=2 FONT color=GREEN size=4BPayment Details/B/FONT /TD/TR tr bgcolor=#88s:select cssStyle =background-color : yellow label = Card Type headerKey=-1 headerValue=Cards list=cardTypeList name=cards //tr Please let me know where I am going wrong. Thanks, Srineel On Mon, Sep 9, 2013 at 2:36 AM, Chris Pratt thechrispr...@gmail.comwrote: Try cssStyle=background-color:yellow; (*Chris*) On Sun, Sep 8, 2013 at 9:54 PM, Srineel Mazumdar smaz19...@gmail.com wrote: Hi, I am using s:select to create a dropdown and then checked the html. I wanted to add bgcolor as yellow. I referred to the following link http://struts.apache.org/release/2.2.x/docs/struts-2-themes.html but still not sure how to put the background clour as yellow. Can anyone provide any pointers ? Also, is it OK to use JSTL tags in JSPs in a Struts 2 application ? Thanks, Srineel
Re: Using themes with s: select
Hi Chris, Attached the images. Thanks, Srineel On Tue, Sep 10, 2013 at 1:17 PM, Chris Pratt thechrispr...@gmail.comwrote: Srineel, your images didn't come through the mail list, any chance you could PasteBin them or put them somewhere else accessible? (*Chris*) On Tue, Sep 10, 2013 at 7:50 AM, Srineel Mazumdar smaz19...@gmail.com wrote: Hi Chris, Thanks for the help. But the change I need is bit different . What I need : [image: Inline image 1] What I am getting : [image: Inline image 2] Code for image 1 : %@ include file=IncludeTop.jsp % %@ taglib prefix=html uri=http://jakarta.apache.org/struts/tags-html % html:form action=/shop/newOrder.do styleId=workingOrderForm method=post TABLE bgcolor=#008800 border=0 cellpadding=3 cellspacing=1 bgcolor=#88 TR bgcolor=#88TD colspan=2 FONT color=GREEN size=4BPayment Details/B/FONT /TD/TRTR bgcolor=#88TD Card Type:/TDTD html:select name=workingOrderForm property=order.cardType html:options name=workingOrderForm property=creditCardTypes / /html:select /TD/TR Code for image 2 : %@ include file=IncludeTop.jsp % %@ taglib prefix=html uri=http://jakarta.apache.org/struts/tags-html % %@ taglib prefix=s uri=/struts-tags % %-- html:form action=/shop/newOrder.action styleId=workingOrderForm method=post --% form action=c:url value=/shop/newOrder.action/ method=POST !-- TABLE bgcolor=#008800 border=0 cellpadding=3 cellspacing=1 bgcolor=#88 -- TABLE border=0 cellpadding=3 cellspacing=1 bgcolor=#008800 TR bgcolor=#88TD colspan=2 FONT color=GREEN size=4BPayment Details/B/FONT /TD/TR tr bgcolor=#88s:select cssStyle =background-color : yellow label = Card Type headerKey=-1 headerValue=Cards list=cardTypeList name=cards //tr Please let me know where I am going wrong. Thanks, Srineel On Mon, Sep 9, 2013 at 2:36 AM, Chris Pratt thechrispr...@gmail.com wrote: Try cssStyle=background-color:yellow; (*Chris*) On Sun, Sep 8, 2013 at 9:54 PM, Srineel Mazumdar smaz19...@gmail.com wrote: Hi, I am using s:select to create a dropdown and then checked the html. I wanted to add bgcolor as yellow. I referred to the following link http://struts.apache.org/release/2.2.x/docs/struts-2-themes.html but still not sure how to put the background clour as yellow. Can anyone provide any pointers ? Also, is it OK to use JSTL tags in JSPs in a Struts 2 application ? Thanks, Srineel - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Using themes with s: select
Attachments don't appear to work through the mailing list. (*Chris*) On Tue, Sep 10, 2013 at 11:35 AM, Srineel Mazumdar smaz19...@gmail.comwrote: Hi Chris, Attached the images. Thanks, Srineel On Tue, Sep 10, 2013 at 1:17 PM, Chris Pratt thechrispr...@gmail.comwrote: Srineel, your images didn't come through the mail list, any chance you could PasteBin them or put them somewhere else accessible? (*Chris*) On Tue, Sep 10, 2013 at 7:50 AM, Srineel Mazumdar smaz19...@gmail.com wrote: Hi Chris, Thanks for the help. But the change I need is bit different . What I need : [image: Inline image 1] What I am getting : [image: Inline image 2] Code for image 1 : %@ include file=IncludeTop.jsp % %@ taglib prefix=html uri= http://jakarta.apache.org/struts/tags-html; % html:form action=/shop/newOrder.do styleId=workingOrderForm method=post TABLE bgcolor=#008800 border=0 cellpadding=3 cellspacing=1 bgcolor=#88 TR bgcolor=#88TD colspan=2 FONT color=GREEN size=4BPayment Details/B/FONT /TD/TRTR bgcolor=#88TD Card Type:/TDTD html:select name=workingOrderForm property=order.cardType html:options name=workingOrderForm property=creditCardTypes / /html:select /TD/TR Code for image 2 : %@ include file=IncludeTop.jsp % %@ taglib prefix=html uri= http://jakarta.apache.org/struts/tags-html; % %@ taglib prefix=s uri=/struts-tags % %-- html:form action=/shop/newOrder.action styleId=workingOrderForm method=post --% form action=c:url value=/shop/newOrder.action/ method=POST !-- TABLE bgcolor=#008800 border=0 cellpadding=3 cellspacing=1 bgcolor=#88 -- TABLE border=0 cellpadding=3 cellspacing=1 bgcolor=#008800 TR bgcolor=#88TD colspan=2 FONT color=GREEN size=4BPayment Details/B/FONT /TD/TR tr bgcolor=#88s:select cssStyle =background-color : yellow label = Card Type headerKey=-1 headerValue=Cards list=cardTypeList name=cards //tr Please let me know where I am going wrong. Thanks, Srineel On Mon, Sep 9, 2013 at 2:36 AM, Chris Pratt thechrispr...@gmail.com wrote: Try cssStyle=background-color:yellow; (*Chris*) On Sun, Sep 8, 2013 at 9:54 PM, Srineel Mazumdar smaz19...@gmail.com wrote: Hi, I am using s:select to create a dropdown and then checked the html. I wanted to add bgcolor as yellow. I referred to the following link http://struts.apache.org/release/2.2.x/docs/struts-2-themes.html but still not sure how to put the background clour as yellow. Can anyone provide any pointers ? Also, is it OK to use JSTL tags in JSPs in a Struts 2 application ? Thanks, Srineel - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Using themes with s: select
Try cssStyle=background-color:yellow; (*Chris*) On Sun, Sep 8, 2013 at 9:54 PM, Srineel Mazumdar smaz19...@gmail.comwrote: Hi, I am using s:select to create a dropdown and then checked the html. I wanted to add bgcolor as yellow. I referred to the following link http://struts.apache.org/release/2.2.x/docs/struts-2-themes.html but still not sure how to put the background clour as yellow. Can anyone provide any pointers ? Also, is it OK to use JSTL tags in JSPs in a Struts 2 application ? Thanks, Srineel
Using themes with s: select
Hi, I am using s:select to create a dropdown and then checked the html. I wanted to add bgcolor as yellow. I referred to the following link http://struts.apache.org/release/2.2.x/docs/struts-2-themes.html but still not sure how to put the background clour as yellow. Can anyone provide any pointers ? Also, is it OK to use JSTL tags in JSPs in a Struts 2 application ? Thanks, Srineel
How to implement wordpress like themes?
I want to implement wordpress like themes, one application has different themes, the template in each theme maybe have different layout and contains different sections. User can select which theme to use. I thought there will be a folder with different themes, like following: web - WEB-INF - themes - theme1 - index.jsp - header.jsp - footer.jsp ... - theme2 - index.jsp - header.jsp - footer.jsp ... I have been researching struts2 themes and templates, it seems the struts2 themes is for detail ui components like a button, a dropdown etc. It has different meaning than wordpress themes. I'm not sure where to start. Any suggestions will be appreciated. Thanks a lot. -- View this message in context: http://struts.1045723.n5.nabble.com/How-to-implement-wordpress-like-themes-tp4337790p4337790.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: How to implement wordpress like themes?
Use CSS and include a different one for each theme. See the CSS Zen garden site for examples of what can be done with pure CSS. Dave On Apr 25, 2011 3:29 AM, rocklee mini...@gmail.com wrote: I want to implement wordpress like themes, one application has different themes, the template in each theme maybe have different layout and contains different sections. User can select which theme to use. I thought there will be a folder with different themes, like following: web - WEB-INF - themes - theme1 - index.jsp - header.jsp - footer.jsp ... - theme2 - index.jsp - header.jsp - footer.jsp ... I have been researching struts2 themes and templates, it seems the struts2 themes is for detail ui components like a button, a dropdown etc. It has different meaning than wordpress themes. I'm not sure where to start. Any suggestions will be appreciated. Thanks a lot. -- View this message in context: http://struts.1045723.n5.nabble.com/How-to-implement-wordpress-like-themes-tp4337790p4337790.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: How to implement wordpress like themes?
Hi Dave, Thanks for your reply. Different theme maybe has different sections. For example, the index.jsp page of theme1 maybe contains a latest news section, but in theme2, there is a popular products section but no latest news section. How to achieve this? Best Regards, Lee On Mon, Apr 25, 2011 at 6:33 PM, Dave Newton-6 [via Struts] ml-node+4338026-1810801222-201...@n5.nabble.com wrote: Use CSS and include a different one for each theme. See the CSS Zen garden site for examples of what can be done with pure CSS. Dave On Apr 25, 2011 3:29 AM, rocklee [hidden email]http://user/SendEmail.jtp?type=nodenode=4338026i=0by-user=t wrote: I want to implement wordpress like themes, one application has different themes, the template in each theme maybe have different layout and contains different sections. User can select which theme to use. I thought there will be a folder with different themes, like following: web - WEB-INF - themes - theme1 - index.jsp - header.jsp - footer.jsp ... - theme2 - index.jsp - header.jsp - footer.jsp ... I have been researching struts2 themes and templates, it seems the struts2 themes is for detail ui components like a button, a dropdown etc. It has different meaning than wordpress themes. I'm not sure where to start. Any suggestions will be appreciated. Thanks a lot. -- View this message in context: http://struts.1045723.n5.nabble.com/How-to-implement-wordpress-like-themes-tp4337790p4337790.htmlhttp://struts.1045723.n5.nabble.com/How-to-implement-wordpress-like-themes-tp4337790p4337790.html?by-user=t Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [hidden email]http://user/SendEmail.jtp?type=nodenode=4338026i=1by-user=t For additional commands, e-mail: [hidden email]http://user/SendEmail.jtp?type=nodenode=4338026i=2by-user=t -- If you reply to this email, your message will be added to the discussion below: http://struts.1045723.n5.nabble.com/How-to-implement-wordpress-like-themes-tp4337790p4338026.html To unsubscribe from How to implement wordpress like themes?, click herehttp://struts.1045723.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=4337790code=bWluaXRpcEBnbWFpbC5jb218NDMzNzc5MHwtMTY2NTc5NjcyOQ==. -- View this message in context: http://struts.1045723.n5.nabble.com/How-to-implement-wordpress-like-themes-tp4337790p4338143.html Sent from the Struts - User mailing list archive at Nabble.com.
[OT] Re: How to implement wordpress like themes?
Same answer as the first time, although you might want to consider abstracting themes at a higher level instead of just hiding sections via CSS. But this is pretty off-topic. d On Apr 25, 2011 8:05 AM, rocklee mini...@gmail.com wrote: Hi Dave, Thanks for your reply. Different theme maybe has different sections. For example, the index.jsp page of theme1 maybe contains a latest news section, but in theme2, there is a popular products section but no latest news section. How to achieve this? Best Regards, Lee On Mon, Apr 25, 2011 at 6:33 PM, Dave Newton-6 [via Struts] ml-node+4338026-1810801222-201...@n5.nabble.com wrote: Use CSS and include a different one for each theme. See the CSS Zen garden site for examples of what can be done with pure CSS. Dave On Apr 25, 2011 3:29 AM, rocklee [hidden email] http://user/SendEmail.jtp?type=nodenode=4338026i=0by-user=t wrote: I want to implement wordpress like themes, one application has different themes, the template in each theme maybe have different layout and contains different sections. User can select which theme to use. I thought there will be a folder with different themes, like following: web - WEB-INF - themes - theme1 - index.jsp - header.jsp - footer.jsp ... - theme2 - index.jsp - header.jsp - footer.jsp ... I have been researching struts2 themes and templates, it seems the struts2 themes is for detail ui components like a button, a dropdown etc. It has different meaning than wordpress themes. I'm not sure where to start. Any suggestions will be appreciated. Thanks a lot. -- View this message in context: http://struts.1045723.n5.nabble.com/How-to-implement-wordpress-like-themes-tp4337790p4337790.html http://struts.1045723.n5.nabble.com/How-to-implement-wordpress-like-themes-tp4337790p4337790.html?by-user=t Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [hidden email] http://user/SendEmail.jtp?type=nodenode=4338026i=1by-user=t For additional commands, e-mail: [hidden email] http://user/SendEmail.jtp?type=nodenode=4338026i=2by-user=t -- If you reply to this email, your message will be added to the discussion below: http://struts.1045723.n5.nabble.com/How-to-implement-wordpress-like-themes-tp4337790p4338026.html To unsubscribe from How to implement wordpress like themes?, click here http://struts.1045723.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=4337790code=bWluaXRpcEBnbWFpbC5jb218NDMzNzc5MHwtMTY2NTc5NjcyOQ== . -- View this message in context: http://struts.1045723.n5.nabble.com/How-to-implement-wordpress-like-themes-tp4337790p4338143.html Sent from the Struts - User mailing list archive at Nabble.com.
Creating struts2 themes
I am learning struts2 and want to create custom themes. I am not able to find and documentation which tells how to create new themes. Can somebody tell me the link to the documentation where theme creation is explained step by step. Thanks in advance..:-) -- View this message in context: http://www.nabble.com/Creating-struts2-themes-tp24968978p24968978.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Creating struts2 themes
http://www.packtpub.com/article/themes-and-templates-with-apache-struts2 From: spsarolkar spsarol...@gmail.com To: user@struts.apache.org Sent: Friday, August 14, 2009 10:38:09 AM Subject: Creating struts2 themes I am learning struts2 and want to create custom themes. I am not able to find and documentation which tells how to create new themes. Can somebody tell me the link to the documentation where theme creation is explained step by step. Thanks in advance..:-) -- View this message in context: http://www.nabble.com/Creating-struts2-themes-tp24968978p24968978.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Struts Themes Problem - help
I recently had to override the 'simple' template to remove the HTML list formatting. Try these links http://struts.apache.org/2.0.14/docs/themes-and-templates.html http://struts.apache.org/2.0.14/docs/template-loading.html I found them extremely helpful. HTH On Tue, Mar 3, 2009 at 8:57 AM, Jim Kiley jhki...@summa-tech.com wrote: If I am understanding you correctly, your best bet might be to customize the fielderror.ftl template for a custom theme of your own. If I were going to display errors in a custom way more than once, that's what I would do. Make a template directory in the root of your webapp, then make a new folder that has the name you want to give your template. (Mine is cleverly named my.) Then copy fielderror.ftl out of the struts jar into webapp/my/fielderror.ftl, then customize the contents of fielderror.ftl. jk On Tue, Mar 3, 2009 at 5:53 AM, sajidbigler sajidbig...@gmail.com wrote: As said below is that a only solution or can we set theme=xhtml for fielderror tag with in the form which uses theme= simple. but we will be rendering error after the filed not the above as xhtml does.how can we make it to render it above the field instead below the field? s:fielderror s:paramclientname/s:param /s:fielderror -- View this message in context: http://www.nabble.com/Struts-Themes-Problem---help-tp18054982p22306342.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- Jim Kiley Technical Consultant | Summa [p] 412.258.3346 [m] 412.445.1729 http://www.summa-tech.com -- Regards, Edward Song Java Web Developer 631-396-5000 x306
Re: Struts Themes Problem - help
As said below is that a only solution or can we set theme=xhtml for fielderror tag with in the form which uses theme= simple. but we will be rendering error after the filed not the above as xhtml does.how can we make it to render it above the field instead below the field? s:fielderror s:paramclientname/s:param /s:fielderror -- View this message in context: http://www.nabble.com/Struts-Themes-Problem---help-tp18054982p22306342.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Struts Themes Problem - help
If I am understanding you correctly, your best bet might be to customize the fielderror.ftl template for a custom theme of your own. If I were going to display errors in a custom way more than once, that's what I would do. Make a template directory in the root of your webapp, then make a new folder that has the name you want to give your template. (Mine is cleverly named my.) Then copy fielderror.ftl out of the struts jar into webapp/my/fielderror.ftl, then customize the contents of fielderror.ftl. jk On Tue, Mar 3, 2009 at 5:53 AM, sajidbigler sajidbig...@gmail.com wrote: As said below is that a only solution or can we set theme=xhtml for fielderror tag with in the form which uses theme= simple. but we will be rendering error after the filed not the above as xhtml does.how can we make it to render it above the field instead below the field? s:fielderror s:paramclientname/s:param /s:fielderror -- View this message in context: http://www.nabble.com/Struts-Themes-Problem---help-tp18054982p22306342.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- Jim Kiley Technical Consultant | Summa [p] 412.258.3346 [m] 412.445.1729 http://www.summa-tech.com
Re: [S2] Issues with extending themes
Nick Scavelli wrote: Here's what I've done: /WEB-INF/classes/struts.properties: struts.ui.theme=ccast2_0 struts.ui.templateDir=templates /templates/ccast2_0/theme.properties parent=css_xhtml Please advise because this is so annoying. I can't see anything wrong with that. I do the same thing in 2.1.2 so I'm confident it still works as per 2.0.x. A common problem problem occurs when you implement a template that includes a sub-template with ${parameters.theme} in its path. The issue is that ${parameters.theme} equals your theme ccast2_0 but your theme doesn't include the referenced template. That is, the S2 template system knows about template hierarchy to find the parent template, but freemarker's include tag does not. This will cause the exception you're seeing but I can't say exactly where without see what you've included in your theme. The only solution is to bring more templates into your theme from the parent and/or remove the ${parameters.theme} references (which may be in the parent). This issue shouldn't normally apply to form-close.ftl, unless (perhaps?) you included form.ftl in your theme but not form-close.ftl. Note: you'll notice many of the parent templates include hardcoded theme names in their include statements precisely for this reason. There is no fix without an overhaul of the S2 template system. Hope that helps, Jeromy Evans - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [S2] Issues with extending themes
Thanks for your reply, you were right. Once freemarker has control it's unaware of the parent theme. Pretty much all controls have #include /${parameters.templateDir}/${parameters.theme}/controlheader.ftl / in their template. Once I added my own controlheader.ftl it worked. My other problem was that I had templates in my application root instead of /WEB-INF/classes/. Once I added it there I saw freemarker errors, telling me it was the theme variable issue. Thanks, Nick On Thu, Jul 3, 2008 at 3:14 AM, Jeromy Evans [EMAIL PROTECTED] wrote: Nick Scavelli wrote: Here's what I've done: /WEB-INF/classes/struts.properties: struts.ui.theme=ccast2_0 struts.ui.templateDir=templates /templates/ccast2_0/theme.properties parent=css_xhtml Please advise because this is so annoying. I can't see anything wrong with that. I do the same thing in 2.1.2 so I'm confident it still works as per 2.0.x. A common problem problem occurs when you implement a template that includes a sub-template with ${parameters.theme} in its path. The issue is that ${parameters.theme} equals your theme ccast2_0 but your theme doesn't include the referenced template. That is, the S2 template system knows about template hierarchy to find the parent template, but freemarker's include tag does not. This will cause the exception you're seeing but I can't say exactly where without see what you've included in your theme. The only solution is to bring more templates into your theme from the parent and/or remove the ${parameters.theme} references (which may be in the parent). This issue shouldn't normally apply to form-close.ftl, unless (perhaps?) you included form.ftl in your theme but not form-close.ftl. Note: you'll notice many of the parent templates include hardcoded theme names in their include statements precisely for this reason. There is no fix without an overhaul of the S2 template system. Hope that helps, Jeromy Evans - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[S2] Issues with extending themes
I am struggling with the whole extending theme functionality in struts2. Either I'm doing something incredibly stupid or there's an issue with extending themes in struts2 (2.1.2 to be more clear). From what I've gathered from the Struts 2.x documentation is that I should be able to just simply define my own custom theme, configure the theme name and template directory, create a theme.properties file with the parent=css_xhtml and be done. No need to add anything other than that. Am I wrong to assume this ? In doing so I get some unexpected errors: java.io.FileNotFoundException: Template /templates/ccast2_0/form-close.ftl not found. at freemarker.template.Configuration.getTemplate(Configuration.java:489) at freemarker.template.Configuration.getTemplate(Configuration.java:452) at org.apache.struts2.components.template.FreemarkerTemplateEngine.renderTemplate(FreemarkerTemplateEngine.java:121) at org.apache.struts2.components.UIBean.mergeTemplate(UIBean.java:558) at org.apache.struts2.components.UIBean.end(UIBean.java:512) at org.apache.struts2.views.jsp.ComponentTagSupport.doEndTag(ComponentTagSupport.java:42) at org.apache.jsp.struts2.login_jsp._jspx_meth_s_005fform_005f0(login_jsp.java:176) at org.apache.jsp.struts2.login_jsp._jspService(login_jsp.java:83) Why in the world is it looking for the form-close.ftl file if I'm extending a theme ? It should be looking for that file in the css_xhtml theme. If it's not there it should look in the xhtml theme, etc, etc. It seems to work for the themes in the struts2 jar. Why doesn't it work for me Here's what I've done: /WEB-INF/classes/struts.properties: struts.ui.theme=ccast2_0 struts.ui.templateDir=templates /templates/ccast2_0/theme.properties parent=css_xhtml Please advise because this is so annoying. - Nick - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts Themes Problem - help
Hi Dave, Thanks for your reply. i found solution to my issue. when i am using simple theme i need to use fielderror tag with param tag. like .. s:fielderror s:paramclientname/s:param /s:fielderror thanks for your time. On Fri, Jun 27, 2008 at 4:32 PM, Dave Newton [EMAIL PROTECTED] wrote: --- On Fri, 6/27/08, Narayana S [EMAIL PROTECTED] wrote: but here it introduced one more problem, with the xhtml theme we get the field level validation error messages below the individual control, but the simple theme is not giving any validation error messages. to get the errors i used s:fielderror / ,it is giving all the field level errors at one place. is there any way i can get the filed level error messages as they come in xhtml theme with simple theme ? ... Have you looked at the documentation for the tag you're using? http://struts.apache.org/2.x/docs/fielderror.html Did you look at the themes and templates documentation, the starting point of which is: http://struts.apache.org/2.x/docs/themes-and-templates.html Dave Never wanted to be a dentist, but pulls a lot of teeth Newton - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts Themes Problem - help
--- On Fri, 6/27/08, Narayana S [EMAIL PROTECTED] wrote: but here it introduced one more problem, with the xhtml theme we get the field level validation error messages below the individual control, but the simple theme is not giving any validation error messages. to get the errors i used s:fielderror / ,it is giving all the field level errors at one place. is there any way i can get the filed level error messages as they come in xhtml theme with simple theme ? ... Have you looked at the documentation for the tag you're using? http://struts.apache.org/2.x/docs/fielderror.html Did you look at the themes and templates documentation, the starting point of which is: http://struts.apache.org/2.x/docs/themes-and-templates.html Dave Never wanted to be a dentist, but pulls a lot of teeth Newton - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts Themes Problem - help
To repeat my previous question: How is it failing? Note that the 'simple' theme generates a lot less markup, and doesn't generate everything the other themes do. Are I18N resources failing to get resolved, or is the theme just not generating the things you were expecting to see? With the simple theme, I would expect the s:label to work the same way, but the s:textfield to generate no label (because the simple theme doesn't do that). If that's what you're seeing, that's the correct behaviour. If you are seeing something different, you need to describe exactly what that is. L. Narayana S wrote: Hi laurie, s:form action=TestAction method=post s:label key=app.indexheader / s:textfield name=cname key=app.cname/br This is part of the form i am creating, when the theme is default the label could get value app.indexheader from resource bundle and working fine, the text fields also could generate a label with the values given for app.cname, but when simple theme is given ( like s:form action=TestAction method=post theme=simple ) the label is not rendered!! can you help me on solving this ? On Mon, Jun 23, 2008 at 11:18 PM, Laurie Harper [EMAIL PROTECTED] wrote: Narayana S wrote: Hi Dave, thanks for your reply, but when i use simple theme, my application is not getting any values from resource bundle.. How is it failing? Note that the 'simple' theme generates a lot less markup, and doesn't generate everything the other themes do. Are I18N resources failing to get resolved, or is the theme just not generating the things you were expecting to see? will this problem be solved by extending theme ? can you provide any best link to extend a theme if it is the solution... ? See the Themes and Templates documentation: http://struts.apache.org/2.0.11.1/docs/themes-and-templates.html L. On Sun, Jun 22, 2008 at 8:25 PM, Dave Newton [EMAIL PROTECTED] wrote: --- On Sun, 6/22/08, Narayana S [EMAIL PROTECTED] wrote: The problem is here struts 2 is applying it's own styles to my page, i want to give my own styles instead of using struts default styles, The easiest answer is to just supply your own CSS styles. You can also extend an existing, or create your own, theme. Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts Themes Problem - help
Hi Laurie, Thanks for your reply. i found a work around for this. if i am applying as below, my application could read the values from resource bundle. :) this problem is solved. s:form action=clientAction theme=simple tr tds:label value=%{getText('app.clientname')} //td tds:textfield name=clientname required=true //td /tr - but here it introduced one more problem, with the xhtml theme we get the field level validation error messages below the individual control, but the simple theme is not giving any validation error messages. to get the errors i used s:fielderror / ,it is giving all the field level errors at one place. is there any way i can get the filed level error messages as they come in xhtml theme with simple theme ? On Fri, Jun 27, 2008 at 12:06 AM, Laurie Harper [EMAIL PROTECTED] wrote: To repeat my previous question: How is it failing? Note that the 'simple' theme generates a lot less markup, and doesn't generate everything the other themes do. Are I18N resources failing to get resolved, or is the theme just not generating the things you were expecting to see? With the simple theme, I would expect the s:label to work the same way, but the s:textfield to generate no label (because the simple theme doesn't do that). If that's what you're seeing, that's the correct behaviour. If you are seeing something different, you need to describe exactly what that is. L. Narayana S wrote: Hi laurie, s:form action=TestAction method=post s:label key=app.indexheader / s:textfield name=cname key=app.cname/br This is part of the form i am creating, when the theme is default the label could get value app.indexheader from resource bundle and working fine, the text fields also could generate a label with the values given for app.cname, but when simple theme is given ( like s:form action=TestAction method=post theme=simple ) the label is not rendered!! can you help me on solving this ? On Mon, Jun 23, 2008 at 11:18 PM, Laurie Harper [EMAIL PROTECTED] wrote: Narayana S wrote: Hi Dave, thanks for your reply, but when i use simple theme, my application is not getting any values from resource bundle.. How is it failing? Note that the 'simple' theme generates a lot less markup, and doesn't generate everything the other themes do. Are I18N resources failing to get resolved, or is the theme just not generating the things you were expecting to see? will this problem be solved by extending theme ? can you provide any best link to extend a theme if it is the solution... ? See the Themes and Templates documentation: http://struts.apache.org/2.0.11.1/docs/themes-and-templates.html L. On Sun, Jun 22, 2008 at 8:25 PM, Dave Newton [EMAIL PROTECTED] wrote: --- On Sun, 6/22/08, Narayana S [EMAIL PROTECTED] wrote: The problem is here struts 2 is applying it's own styles to my page, i want to give my own styles instead of using struts default styles, The easiest answer is to just supply your own CSS styles. You can also extend an existing, or create your own, theme. Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Fwd: Struts Themes Problem - help
Hi Laurie / Dave, can you please help on this? -- Forwarded message -- From: Narayana S [EMAIL PROTECTED] Date: Tue, Jun 24, 2008 at 3:12 PM Subject: Re: Struts Themes Problem - help To: Struts Users Mailing List user@struts.apache.org, [EMAIL PROTECTED] Hi laurie, s:form action=TestAction method=post s:label key=app.indexheader / s:textfield name=cname key=app.cname/br This is a part of the form i am creating, when the theme is default(xhtml) the label could get value app.indexheader from resource bundle and working fine, the text fields also could generate a label with the values given for app.cname, but when simple theme is given ( like s:form action=TestAction method=post theme=simple ) the label is not rendered!! can you help me on solving this ? On Mon, Jun 23, 2008 at 11:18 PM, Laurie Harper [EMAIL PROTECTED] wrote: Narayana S wrote: Hi Dave, thanks for your reply, but when i use simple theme, my application is not getting any values from resource bundle.. How is it failing? Note that the 'simple' theme generates a lot less markup, and doesn't generate everything the other themes do. Are I18N resources failing to get resolved, or is the theme just not generating the things you were expecting to see? will this problem be solved by extending theme ? can you provide any best link to extend a theme if it is the solution... ? See the Themes and Templates documentation: http://struts.apache.org/2.0.11.1/docs/themes-and-templates.html L. On Sun, Jun 22, 2008 at 8:25 PM, Dave Newton [EMAIL PROTECTED] wrote: --- On Sun, 6/22/08, Narayana S [EMAIL PROTECTED] wrote: The problem is here struts 2 is applying it's own styles to my page, i want to give my own styles instead of using struts default styles, The easiest answer is to just supply your own CSS styles. You can also extend an existing, or create your own, theme. Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts Themes Problem - help
Hi laurie, s:form action=TestAction method=post s:label key=app.indexheader / s:textfield name=cname key=app.cname/br This is part of the form i am creating, when the theme is default the label could get value app.indexheader from resource bundle and working fine, the text fields also could generate a label with the values given for app.cname, but when simple theme is given ( like s:form action=TestAction method=post theme=simple ) the label is not rendered!! can you help me on solving this ? On Mon, Jun 23, 2008 at 11:18 PM, Laurie Harper [EMAIL PROTECTED] wrote: Narayana S wrote: Hi Dave, thanks for your reply, but when i use simple theme, my application is not getting any values from resource bundle.. How is it failing? Note that the 'simple' theme generates a lot less markup, and doesn't generate everything the other themes do. Are I18N resources failing to get resolved, or is the theme just not generating the things you were expecting to see? will this problem be solved by extending theme ? can you provide any best link to extend a theme if it is the solution... ? See the Themes and Templates documentation: http://struts.apache.org/2.0.11.1/docs/themes-and-templates.html L. On Sun, Jun 22, 2008 at 8:25 PM, Dave Newton [EMAIL PROTECTED] wrote: --- On Sun, 6/22/08, Narayana S [EMAIL PROTECTED] wrote: The problem is here struts 2 is applying it's own styles to my page, i want to give my own styles instead of using struts default styles, The easiest answer is to just supply your own CSS styles. You can also extend an existing, or create your own, theme. Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts Themes Problem - help
Narayana S wrote: Hi Dave, thanks for your reply, but when i use simple theme, my application is not getting any values from resource bundle.. How is it failing? Note that the 'simple' theme generates a lot less markup, and doesn't generate everything the other themes do. Are I18N resources failing to get resolved, or is the theme just not generating the things you were expecting to see? will this problem be solved by extending theme ? can you provide any best link to extend a theme if it is the solution... ? See the Themes and Templates documentation: http://struts.apache.org/2.0.11.1/docs/themes-and-templates.html L. On Sun, Jun 22, 2008 at 8:25 PM, Dave Newton [EMAIL PROTECTED] wrote: --- On Sun, 6/22/08, Narayana S [EMAIL PROTECTED] wrote: The problem is here struts 2 is applying it's own styles to my page, i want to give my own styles instead of using struts default styles, The easiest answer is to just supply your own CSS styles. You can also extend an existing, or create your own, theme. Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Struts Themes Problem - help
Hi, i am new to struts 2, developed sample application that is using resource bundle, i could configure application and labels are perfectly displayed with the values retrived from the resource bundle. The problem is here struts 2 is applying it's own styles to my page, i want to give my own styles instead of using struts default styles, for that i am using theme=simple in the s:form tag, but it couldn't get the values from resource bundle. can any body help me to solve this issue? thanks in advance ~narayana.
Re: Struts Themes Problem - help
--- On Sun, 6/22/08, Narayana S [EMAIL PROTECTED] wrote: The problem is here struts 2 is applying it's own styles to my page, i want to give my own styles instead of using struts default styles, The easiest answer is to just supply your own CSS styles. You can also extend an existing, or create your own, theme. Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts Themes Problem - help
Hi Dave, thanks for your reply, but when i use simple theme, my application is not getting any values from resource bundle.. will this problem be solved by extending theme ? can you provide any best link to extend a theme if it is the solution... ? On Sun, Jun 22, 2008 at 8:25 PM, Dave Newton [EMAIL PROTECTED] wrote: --- On Sun, 6/22/08, Narayana S [EMAIL PROTECTED] wrote: The problem is here struts 2 is applying it's own styles to my page, i want to give my own styles instead of using struts default styles, The easiest answer is to just supply your own CSS styles. You can also extend an existing, or create your own, theme. Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Struts 2 Themes
I am trying to get a better understanding of S2 themes. I read the document and the create themes page in the cookbook. My question is how I can find the right template file for a tag. I tried to change text.ftl and found that ties to s:textfield. I am now trying to figure out what is the one for checkbox. I thought it would be the checkbox.ftl. But s:chechbox does not change at all when I changed the checkbox.ftl. What about s:property? Where can I find more information if I want to get more into the themes? Thanks a lot for your help, Jane - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Struts 2 Themes
Sorry, my fault. I did not notice the code I used to test checkbox defined the theme inside the tag. So checkbox.ftl is the template for s:checkbox. I would still like to find out if there is a general rule for map the tag to template and other resource to learn about theme. -Original Message- From: Jiang, Jane (NIH/NCI) [C] Sent: Tuesday, October 09, 2007 12:57 PM To: Struts Users Mailing List Subject: Struts 2 Themes I am trying to get a better understanding of S2 themes. I read the document and the create themes page in the cookbook. My question is how I can find the right template file for a tag. I tried to change text.ftl and found that ties to s:textfield. I am now trying to figure out what is the one for checkbox. I thought it would be the checkbox.ftl. But s:chechbox does not change at all when I changed the checkbox.ftl. What about s:property? Where can I find more information if I want to get more into the themes? Thanks a lot for your help, Jane - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Struts 2 Themes
Hi, your best bet is to look at S2's source code. You can start by looking at org.apache.struts2.views.freemarker.tags.StrutsModels. Each of the tags have an associated Model, and S2 taglib's models are registered in this class. So, for instance, if you look for TextField's template name : 1] There is a TextFieldModel instance declared 2] So, you look at org.apache.struts2.views.freemarker.tags.TextFieldModel#getBean() : 3] You can see return new TextField(stack, req, res); 4] So, you look at org.apache.struts2.components.TextField 5] You can see : final public static String TEMPLATE = text; = So, the template name is text ;) Regards, Sami Dalouche Le mardi 09 octobre 2007 à 13:07 -0400, Jiang, Jane (NIH/NCI) [C] a écrit : Sorry, my fault. I did not notice the code I used to test checkbox defined the theme inside the tag. So checkbox.ftl is the template for s:checkbox. I would still like to find out if there is a general rule for map the tag to template and other resource to learn about theme. -Original Message- From: Jiang, Jane (NIH/NCI) [C] Sent: Tuesday, October 09, 2007 12:57 PM To: Struts Users Mailing List Subject: Struts 2 Themes I am trying to get a better understanding of S2 themes. I read the document and the create themes page in the cookbook. My question is how I can find the right template file for a tag. I tried to change text.ftl and found that ties to s:textfield. I am now trying to figure out what is the one for checkbox. I thought it would be the checkbox.ftl. But s:chechbox does not change at all when I changed the checkbox.ftl. What about s:property? Where can I find more information if I want to get more into the themes? Thanks a lot for your help, Jane - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Struts 2 Themes
Thank you, Sami. That helps a lot. Jane -Original Message- From: Sami Dalouche [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 09, 2007 1:55 PM To: Struts Users Mailing List Subject: RE: Struts 2 Themes Hi, your best bet is to look at S2's source code. You can start by looking at org.apache.struts2.views.freemarker.tags.StrutsModels. Each of the tags have an associated Model, and S2 taglib's models are registered in this class. So, for instance, if you look for TextField's template name : 1] There is a TextFieldModel instance declared 2] So, you look at org.apache.struts2.views.freemarker.tags.TextFieldModel#getBean() : 3] You can see return new TextField(stack, req, res); 4] So, you look at org.apache.struts2.components.TextField 5] You can see : final public static String TEMPLATE = text; = So, the template name is text ;) Regards, Sami Dalouche Le mardi 09 octobre 2007 à 13:07 -0400, Jiang, Jane (NIH/NCI) [C] a écrit : Sorry, my fault. I did not notice the code I used to test checkbox defined the theme inside the tag. So checkbox.ftl is the template for s:checkbox. I would still like to find out if there is a general rule for map the tag to template and other resource to learn about theme. -Original Message- From: Jiang, Jane (NIH/NCI) [C] Sent: Tuesday, October 09, 2007 12:57 PM To: Struts Users Mailing List Subject: Struts 2 Themes I am trying to get a better understanding of S2 themes. I read the document and the create themes page in the cookbook. My question is how I can find the right template file for a tag. I tried to change text.ftl and found that ties to s:textfield. I am now trying to figure out what is the one for checkbox. I thought it would be the checkbox.ftl. But s:chechbox does not change at all when I changed the checkbox.ftl. What about s:property? Where can I find more information if I want to get more into the themes? Thanks a lot for your help, Jane - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[S2] Can a custom component have a body? or, using fieldset with themes
Is something like this legal in a Struts 2 custom component: s:component template=/my/custom/component.vm s:param name=key1 value=value1/ s:param name=key2 value=value2/ Some text to be wrapped in my component. s.text name=someProperty / /s:component In other words, can s:component act like, for example, s:form.../ s.form? I'd like to create a HTML fieldset component that plays well with themes. But this doesn't result in valid HTML with the xhtml theme, for example: s:form ... fieldset legendForm test/legend s:text ... / /s.form If anyone's had luck using fieldset with a theme other than simple, I'm interested in how you accomplished that. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: THEMES AND TEMPLATES
Juan Espinosa wrote: Hi is there any theme repository ??? I want to change my theme, like putting the field errors in red, in the right of the component (field) who cause the error... I'm not sure what you mean by a theme repository, but documentation on customizing Struts 2 themes and templates is here: http://struts.apache.org/2.x/docs/themes-and-templates.html For simple tweaks like changing colours, you can use plain ol' CSS. For more extensive changes, you'll want a customized theme. L. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
THEMES AND TEMPLATES
Hi is there any theme repository ??? I want to change my theme, like putting the field errors in red, in the right of the component (field) who cause the error... Regards Juan Espinosa -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.446 / Virus Database: 268.18.26/754 - Release Date: 09/04/2007 22:59 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Themes and templates
Thanks mark for your help, i will give a try to your advices Regards Juan -Mensaje original- De: Mark Shifman [mailto:[EMAIL PROTECTED] Enviado el: Martes, 28 de Noviembre de 2006 05:20 p.m. Para: Struts Users Mailing List Asunto: Re: Themes and templates If you set struts.ui.theme=simple in the struts.properties file you won't fight with the templates and it will be sort of like good old struts 1. However, there are other gotchas in store. You have to get validation errors on the screen yourself using s:fielderror/ since the theme cleverly puts the validation errors next to the invalid fields but not with simple. This is how I have done it but there is probably a better way: s:if test=hasErrors() h3span style=color:red; font-weight:boldValidation Error/span/h3 s:actionerror/ s:fielderror/ /s:if The hasErrors() comes from the value stack from you action that extended ActionSupport. But this didn't really answer your question of how to make themes and templates work for you :(. Juan Espinosa wrote: Hi to all, im building an struts2 based application and i dont understan the concept of themes an templates. In the past i used struts 1, and in the view i used jsp tags and struts tags like iterate and others. Now in the application that im buildin i use tags provided by struts like s:action s:include s:iterator, s:form etc. the problem started when i was using the radio button tag that renders radio buttons based on a list. The buttons are put side by side... and i want to put one below the other label radio1 label radio2 (now) label radio1 label radio2 (mi needs) I want to know if render of buttons tables forms and other tags are based on this templates..and how i could change it Regards Juan -- Mark Shifman MD. Ph.D. Yale Center for Medical Informatics Phone (203)737-5219 [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Themes and templates
Hi to all, im building an struts2 based application and i dont understan the concept of themes an templates. In the past i used struts 1, and in the view i used jsp tags and struts tags like iterate and others. Now in the application that im buildin i use tags provided by struts like s:action s:include s:iterator, s:form etc. the problem started when i was using the radio button tag that renders radio buttons based on a list. The buttons are put side by side... and i want to put one below the other label radio1 label radio2 (now) label radio1 label radio2 (mi needs) I want to know if render of buttons tables forms and other tags are based on this templates..and how i could change it Regards Juan
Re: Themes and templates
If you set struts.ui.theme=simple in the struts.properties file you won't fight with the templates and it will be sort of like good old struts 1. However, there are other gotchas in store. You have to get validation errors on the screen yourself using s:fielderror/ since the theme cleverly puts the validation errors next to the invalid fields but not with simple. This is how I have done it but there is probably a better way: s:if test=hasErrors() h3span style=color:red; font-weight:boldValidation Error/span/h3 s:actionerror/ s:fielderror/ /s:if The hasErrors() comes from the value stack from you action that extended ActionSupport. But this didn't really answer your question of how to make themes and templates work for you :(. Juan Espinosa wrote: Hi to all, im building an struts2 based application and i dont understan the concept of themes an templates. In the past i used struts 1, and in the view i used jsp tags and struts tags like iterate and others. Now in the application that im buildin i use tags provided by struts like s:action s:include s:iterator, s:form etc. the problem started when i was using the radio button tag that renders radio buttons based on a list. The buttons are put side by side... and i want to put one below the other label radio1 label radio2 (now) label radio1 label radio2 (mi needs) I want to know if render of buttons tables forms and other tags are based on this templates..and how i could change it Regards Juan -- Mark Shifman MD. Ph.D. Yale Center for Medical Informatics Phone (203)737-5219 [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Themes and templates
On 11/28/06 4:04 PM, Juan Espinosa [EMAIL PROTECTED] wrote: I want to know if render of buttons tables forms and other tags are based on this templates..and how i could change it Hi Juan, The rendering of the buttons is based on the theme template. The templates can be found in the Struts source in: /core/src/main/resources/template There are a few directories there. I believe S2 defaults to the xhtml theme. I have extended the xhtml theme extensively to do variable multi-column layouts. It took some work, and at the time I thought it was hard, but in retrospect it wasn't that bad. Take a look at the template that backs s:textfield first. It's text.ftl in the xhtml directory. It's real short: #include /${parameters.templateDir}/${parameters.theme}/controlheader.ftl / #include /${parameters.templateDir}/simple/text.ftl / #include /${parameters.templateDir}/xhtml/controlfooter.ftl / It includes a controlheader, the simple text.ftl template, then a controlfooter. The control header and footer is where the table wrapping happens and the simple/text.ftl is where the actual input element is generated from. Just go through it a piece at a time. I have yet to use a radio button group, but I think the template to start with is radiomap.ftl. When going through this just remember to follow the includes. Good luck, Mark - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Themes and templates
On 11/28/06 4:06 PM, Mark Menard [EMAIL PROTECTED] wrote: On 11/28/06 4:04 PM, Juan Espinosa [EMAIL PROTECTED] wrote: I want to know if render of buttons tables forms and other tags are based on this templates..and how i could change it Hi Juan, The rendering of the buttons is based on the theme template. The templates can be found in the Struts source in: /core/src/main/resources/template Forgot to mention if you want to hack on these do the following: 1. In WEB-INF/classes/ make a template directory. 2. Copy the xhtml, and simple directories from the Struts distribution to that directory. 3. in WEB-INF/classes/template make a directory for your own theme, such as WEB-INF/class/template/mytheme/. You'll put any template you want to override in this directory. 4. Optionally, although I'd highly recommend it, copy the contents of the xhtml theme to your theme directory so you have something to hack on. 5. Hack away and see how it works. Later, Mark - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Extending Themes
My advice would be to look at the existing themes to see how they use the parameters. /Ian -- From Down Around, Inc. Innovative IT Solutions Software Architecture * Design * Development ~ web: www.fdar.com email [EMAIL PROTECTED] phone:617.821.5430 ~ Tarek Nabil wrote: Hi, I'm currently evaluating Struts 2 for our next project. Our UI people have laid out some standards for the markup generated by the application pages, which the XHTML theme does not satisfy. I started looking into the Extending Themes topic, but it seems that there's no clear reference on how to do that. Following the examples does not seem to be very easy as I have not found any reference to explain some of the key words used in the templates, such as fieldErrors or parameters. For example, there's no reference that explains all the attributes exposed by parameters. Could some one please point me to such a reference if one exists? Thanks, Tarek Nabil DISCLAIMER This email and any files transmitted with it are confidential and contain privileged or copyright information. If you are not the intended recipient you must not copy, distribute or use this email or the information contained in it for any purpose other than to notify us of the receipt thereof. If you have received this message in error, please notify the sender immediately, and delete this email from your system. Please note that e-mails are susceptible to change.The sender shall not be liable for the improper or incomplete transmission of the information contained in this communication,nor for any delay in its receipt or damage to your system.The sender does not guarantee that this material is free from viruses or any other defects although due care has been taken to minimise the risk. ** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Extending Themes
Hi, I'm currently evaluating Struts 2 for our next project. Our UI people have laid out some standards for the markup generated by the application pages, which the XHTML theme does not satisfy. I started looking into the Extending Themes topic, but it seems that there's no clear reference on how to do that. Following the examples does not seem to be very easy as I have not found any reference to explain some of the key words used in the templates, such as fieldErrors or parameters. For example, there's no reference that explains all the attributes exposed by parameters. Could some one please point me to such a reference if one exists? Thanks, Tarek Nabil DISCLAIMER This email and any files transmitted with it are confidential and contain privileged or copyright information. If you are not the intended recipient you must not copy, distribute or use this email or the information contained in it for any purpose other than to notify us of the receipt thereof. If you have received this message in error, please notify the sender immediately, and delete this email from your system. Please note that e-mails are susceptible to change.The sender shall not be liable for the improper or incomplete transmission of the information contained in this communication,nor for any delay in its receipt or damage to your system.The sender does not guarantee that this material is free from viruses or any other defects although due care has been taken to minimise the risk. ** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Multi-channels / Themes
Has anyone had any experiences with the Multi-Channels construct within Tiles? Any resources, experiences good or bad would be appreciated. Regards Marty
RE: Themes
I'm googling now for the article you mentioned since it isn't clear to me exactly where you meant. If you have a URL I'd appreciate it. This Tiles Controller looks like it is worth a good look. Regards Marty -Original Message- From: David G. Friedman [mailto:[EMAIL PROTECTED] Sent: Tuesday, 14 June 2005 4:36 PM To: Struts Users Mailing List Subject: RE: Themes Martin, If you're using tiles already, be sure to check out a tiles controller. It can insert pieces (putList) into your tile however you wish it, i.e. if the path is /members, if you set a (session?) cookie, etc. A tutorial on the capabilities of Tiles Controllers by Cedric Dumoulin which I wrote about earlier this week. The link is under the userGuide section for Tiles (at the bottom of the page). The site is in France but the tutorial is in English, if I recall correctly. I read it a year ago but it should still be relevant and current. Regards, David -Original Message- From: Martin Ravell [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 14, 2005 2:09 AM To: 'Struts Users Mailing List' Subject: RE: Themes Thanks for the links David. The app is already using Tiles extensively and as a result I need something that integrates well with this framework. I've had a quick read of the SiteMesh and Xkins sites and plan to download and compare the two later today. Will post back any findings. Regards Marty -Original Message- From: David G. Friedman [mailto:[EMAIL PROTECTED] Sent: Tuesday, 14 June 2005 2:58 PM To: Struts Users Mailing List Subject: RE: Themes Martin, Have you looked at any of these? a) Tiles http://struts.apache.org b) SiteMesh: http://www.opensymphony.com/sitemesh c) XKins: http://xkins.sourceforge.net/ Regards, David -Original Message- From: Martin Ravell [mailto:[EMAIL PROTECTED] Sent: Monday, June 13, 2005 8:22 PM To: Struts User Mailing List Subject: Themes I have a requirement to build a 'Themes' (think 'skins') capability into the UI of my Struts app and would just like to poll the list for ideas on the best way to approach such a mechanism. Multiple customers use the same app but they need to be presented with a view that meets their specific requirements. For example graphics, fonts and even layout would be specific to the user's login (actually their company/organization which is stored in the database). Now, for ease of use I guess something relying on CSS would be a way to go. Since I already use stylesheets for most HTML elements specifying a particular theme's stylesheet would not be hard. The tricky part is that I'd also like to be able to specify different jsp pages (mainly for Tiles layouts) in case I need to modify the layout beyond what is easy to do with CSS. Ultimately I may well have functionality in the app itself that is specific to a given customer so this concept should deal with handling customisation to that level well. Ideally I'd like to have a concept of an 'alternate source' directory that is used by the app to load it's jsp. i.e. the app first looks under the appropriate alternate directory for a jsp and uses the page it finds there if it exists but falls back to the standard jsp dir if there is no alternate. This would mean that I could create a theme with only those pages that need to be modified rather than copying and modifying the entire jsp source tree. If anyone has had to implement something along these lines I'd love to hear from you. What sort of mechanisms have you found work well within the structure of a Struts app? My architecture is Struts, Tiles, Spring and Hibernate if you are interested but I'm thinking that it's the Struts area that I'll be looking at mostly for this job. Are there any Struts sub-projects that touch on this sort of thing? Regards Marty - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Themes
I seem to keep coming back to the 'put' definitions in my tiles defs. put name=sidemenu value=/layout/menu.jsp/ Is there a way that I can insert a variable into the value at runtime? Something like: put name=sidemenu value=${themes_dir}/layout/menu.jsp/ This still doesn't answer the fall-back to 'original' jsp tree idea but it would be a start. Worst case I could keep a register of the pages that have alternates for a particular theme and sub in the dir when necessary otherwise leaving it blank to grab the base 'original' version. Obviously I don't want to setup a put for every theme page. This would get out of hand awful fast. Regards Marty -Original Message- From: David G. Friedman [mailto:[EMAIL PROTECTED] Sent: Tuesday, 14 June 2005 4:36 PM To: Struts Users Mailing List Subject: RE: Themes Martin, If you're using tiles already, be sure to check out a tiles controller. It can insert pieces (putList) into your tile however you wish it, i.e. if the path is /members, if you set a (session?) cookie, etc. A tutorial on the capabilities of Tiles Controllers by Cedric Dumoulin which I wrote about earlier this week. The link is under the userGuide section for Tiles (at the bottom of the page). The site is in France but the tutorial is in English, if I recall correctly. I read it a year ago but it should still be relevant and current. Regards, David -Original Message- From: Martin Ravell [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 14, 2005 2:09 AM To: 'Struts Users Mailing List' Subject: RE: Themes Thanks for the links David. The app is already using Tiles extensively and as a result I need something that integrates well with this framework. I've had a quick read of the SiteMesh and Xkins sites and plan to download and compare the two later today. Will post back any findings. Regards Marty -Original Message- From: David G. Friedman [mailto:[EMAIL PROTECTED] Sent: Tuesday, 14 June 2005 2:58 PM To: Struts Users Mailing List Subject: RE: Themes Martin, Have you looked at any of these? a) Tiles http://struts.apache.org b) SiteMesh: http://www.opensymphony.com/sitemesh c) XKins: http://xkins.sourceforge.net/ Regards, David -Original Message- From: Martin Ravell [mailto:[EMAIL PROTECTED] Sent: Monday, June 13, 2005 8:22 PM To: Struts User Mailing List Subject: Themes I have a requirement to build a 'Themes' (think 'skins') capability into the UI of my Struts app and would just like to poll the list for ideas on the best way to approach such a mechanism. Multiple customers use the same app but they need to be presented with a view that meets their specific requirements. For example graphics, fonts and even layout would be specific to the user's login (actually their company/organization which is stored in the database). Now, for ease of use I guess something relying on CSS would be a way to go. Since I already use stylesheets for most HTML elements specifying a particular theme's stylesheet would not be hard. The tricky part is that I'd also like to be able to specify different jsp pages (mainly for Tiles layouts) in case I need to modify the layout beyond what is easy to do with CSS. Ultimately I may well have functionality in the app itself that is specific to a given customer so this concept should deal with handling customisation to that level well. Ideally I'd like to have a concept of an 'alternate source' directory that is used by the app to load it's jsp. i.e. the app first looks under the appropriate alternate directory for a jsp and uses the page it finds there if it exists but falls back to the standard jsp dir if there is no alternate. This would mean that I could create a theme with only those pages that need to be modified rather than copying and modifying the entire jsp source tree. If anyone has had to implement something along these lines I'd love to hear from you. What sort of mechanisms have you found work well within the structure of a Struts app? My architecture is Struts, Tiles, Spring and Hibernate if you are interested but I'm thinking that it's the Struts area that I'll be looking at mostly for this job. Are there any Struts sub-projects that touch on this sort of thing? Regards Marty - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED
Themes
Well, as promised here is some feedback. I recommend the article : http://www.lifl.fr/~dumoulin/tiles/tilesAdvancedFeatures.pdf Especially the section 7.4.3 Dynamic L F. Regards Marty
RE: Themes
Use CSS. Use one JSP/tile to get your content together, then based on the company setting, choose a CSS style sheet to go with it. The style sheet would contain your graphics, fonts, layouts, etc. Take a look at http://www.csszengarden.com/ to see the possibilities of this approach. Wiebe -Original Message- From: Martin Ravell [mailto:[EMAIL PROTECTED] Sent: Monday, June 13, 2005 5:22 PM To: Struts User Mailing List Subject: Themes I have a requirement to build a 'Themes' (think 'skins') capability into the UI of my Struts app and would just like to poll the list for ideas on the best way to approach such a mechanism. Multiple customers use the same app but they need to be presented with a view that meets their specific requirements. For example graphics, fonts and even layout would be specific to the user's login (actually their company/organization which is stored in the database). Now, for ease of use I guess something relying on CSS would be a way to go. Since I already use stylesheets for most HTML elements specifying a particular theme's stylesheet would not be hard. The tricky part is that I'd also like to be able to specify different jsp pages (mainly for Tiles layouts) in case I need to modify the layout beyond what is easy to do with CSS. Ultimately I may well have functionality in the app itself that is specific to a given customer so this concept should deal with handling customisation to that level well. Ideally I'd like to have a concept of an 'alternate source' directory that is used by the app to load it's jsp. i.e. the app first looks under the appropriate alternate directory for a jsp and uses the page it finds there if it exists but falls back to the standard jsp dir if there is no alternate. This would mean that I could create a theme with only those pages that need to be modified rather than copying and modifying the entire jsp source tree. If anyone has had to implement something along these lines I'd love to hear from you. What sort of mechanisms have you found work well within the structure of a Struts app? My architecture is Struts, Tiles, Spring and Hibernate if you are interested but I'm thinking that it's the Struts area that I'll be looking at mostly for this job. Are there any Struts sub-projects that touch on this sort of thing? Regards Marty - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Themes
While Tiles is better for page composition I think you'll find SiteMesh better suited for overall site layout, especially for things like custom CSS/JavaScript/... based on request or session level parameters. -- Abdullah -Original Message- From: Wiebe de Jong [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 14, 2005 11:48 AM To: 'Struts Users Mailing List' Subject: RE: Themes Use CSS. Use one JSP/tile to get your content together, then based on the company setting, choose a CSS style sheet to go with it. The style sheet would contain your graphics, fonts, layouts, etc. Take a look at http://www.csszengarden.com/ to see the possibilities of this approach. Wiebe -Original Message- From: Martin Ravell [mailto:[EMAIL PROTECTED] Sent: Monday, June 13, 2005 5:22 PM To: Struts User Mailing List Subject: Themes I have a requirement to build a 'Themes' (think 'skins') capability into the UI of my Struts app and would just like to poll the list for ideas on the best way to approach such a mechanism. Multiple customers use the same app but they need to be presented with a view that meets their specific requirements. For example graphics, fonts and even layout would be specific to the user's login (actually their company/organization which is stored in the database). Now, for ease of use I guess something relying on CSS would be a way to go. Since I already use stylesheets for most HTML elements specifying a particular theme's stylesheet would not be hard. The tricky part is that I'd also like to be able to specify different jsp pages (mainly for Tiles layouts) in case I need to modify the layout beyond what is easy to do with CSS. Ultimately I may well have functionality in the app itself that is specific to a given customer so this concept should deal with handling customisation to that level well. Ideally I'd like to have a concept of an 'alternate source' directory that is used by the app to load it's jsp. i.e. the app first looks under the appropriate alternate directory for a jsp and uses the page it finds there if it exists but falls back to the standard jsp dir if there is no alternate. This would mean that I could create a theme with only those pages that need to be modified rather than copying and modifying the entire jsp source tree. If anyone has had to implement something along these lines I'd love to hear from you. What sort of mechanisms have you found work well within the structure of a Struts app? My architecture is Struts, Tiles, Spring and Hibernate if you are interested but I'm thinking that it's the Struts area that I'll be looking at mostly for this job. Are there any Struts sub-projects that touch on this sort of thing? Regards Marty - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Themes
In looking into providing a Themes type functionality I've run across the idea of setting up a new DefinitionsFactory class. According to the section '8.4 Writing your own Definition Factory' of the document http://www.lifl.fr/~dumoulin/tiles/tilesAdvancedFeatures.pdf this looks like a neat way in which one might implement a themes subsystem. I think that this could allow me to basically re-write the value of a tile definition in such a way that for example: /layout/menu.jsp Is changed to something like /themes/example/layout/menu.jsp Depending on say a session scoped variable. Some code would be needed to check to make sure that this new jsp actually exists (giving me the fall-back to original functionality previously mentioned in this thread). Apparently I'll need to extend DefinitionsFactory. Unfortunately the document is now a little out of date and I'm wondering if anyone out there has successfully messed with this class? If you can share any experiences you may have had I'd really appreciate it. Regards Marty
RE: Themes
Martin, Have you looked at any of these? a) Tiles http://struts.apache.org b) SiteMesh: http://www.opensymphony.com/sitemesh c) XKins: http://xkins.sourceforge.net/ Regards, David -Original Message- From: Martin Ravell [mailto:[EMAIL PROTECTED] Sent: Monday, June 13, 2005 8:22 PM To: Struts User Mailing List Subject: Themes I have a requirement to build a 'Themes' (think 'skins') capability into the UI of my Struts app and would just like to poll the list for ideas on the best way to approach such a mechanism. Multiple customers use the same app but they need to be presented with a view that meets their specific requirements. For example graphics, fonts and even layout would be specific to the user's login (actually their company/organization which is stored in the database). Now, for ease of use I guess something relying on CSS would be a way to go. Since I already use stylesheets for most HTML elements specifying a particular theme's stylesheet would not be hard. The tricky part is that I'd also like to be able to specify different jsp pages (mainly for Tiles layouts) in case I need to modify the layout beyond what is easy to do with CSS. Ultimately I may well have functionality in the app itself that is specific to a given customer so this concept should deal with handling customisation to that level well. Ideally I'd like to have a concept of an 'alternate source' directory that is used by the app to load it's jsp. i.e. the app first looks under the appropriate alternate directory for a jsp and uses the page it finds there if it exists but falls back to the standard jsp dir if there is no alternate. This would mean that I could create a theme with only those pages that need to be modified rather than copying and modifying the entire jsp source tree. If anyone has had to implement something along these lines I'd love to hear from you. What sort of mechanisms have you found work well within the structure of a Struts app? My architecture is Struts, Tiles, Spring and Hibernate if you are interested but I'm thinking that it's the Struts area that I'll be looking at mostly for this job. Are there any Struts sub-projects that touch on this sort of thing? Regards Marty - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]