Convention and REST combo config
So does anyone have an example of the configuration needed to make the Convention and REST plugins work together. I know musachy had made some changes to make this possible, but when I just include Convention in the pom.xml, strange things happen. Is there a set of steps get it configured correctly? -D -- View this message in context: http://www.nabble.com/Convention-and-REST-combo-config-tp19736585p19736585.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Issue getting autocompleter value in javascript
Hi, Thanks for your reply. I got the point. Below two lines of code, will give the selected value of autocompleter to js. var selectedValue = dojo.widget.byId('auto'); var value1 = selectedValue.textInputNode.value; Thank you again. On 9/29/08, Struts Two [EMAIL PROTECTED] wrote: autocompleter is a dojo widget, you should try to get its value through dojo api for widgets not dom api. Your javascript will not work (as you have already noticed). regards, - Original Message From: sheva j [EMAIL PROTECTED] To: user@struts.apache.org Sent: Monday, September 29, 2008 9:56:43 AM Subject: Issue getting autocompleter value in javascript Hi, I am facing an issue in getting, selected value of autocompleter in javascript. Issue: On the onclick event of a button, I am calling a javascript function. getAutoValue() { var selectedValue = document.getElementById(auto).value; alert(selectedValue); } where 'auto' is autocompleter's name. I am not able to get the value of autocompleter(ajax). Is there any possiblity to get the selected value of autocompleter. Kindly help me. Thanks in advance. __ Yahoo! Canada Toolbar: Search from anywhere on the web, and bookmark your favourite sites. Download it now at http://ca.toolbar.yahoo.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts2, dojo, cascading select fields
ReadOnly wrote: ReadOnly wrote: Hi.. May be someone can help me:)..I start use struts 2.0.11, spring, hibernate. I need create cascading select fields.. For example: first select: city second select: streets .. When you are choosing city in the first one select second one need show streets only for this city... I know how such things work in asp.net, ajax... I read some information that I need install and use dojo. I installes dojo and found an example, but don't want work.. Please help me with example and with dojo. Thank you... Did you look at Struts' s:doubleselect tag? http://struts.apache.org/2.0.11.1/docs/doubleselect.html L. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Accessing id bean-property (not tag attribute) in freemarker template
Thank you very much! This works! Gabriel Belingueres schrieb: Inside the form.ftl, the stack.findValue(id') will find the form's id attribute, since the Form component is _already_ pushed into the stack. Hence, your action's id variable is shadowed by the form's id variable. What you would need then is ${action.id} 2008/9/29 Sven Grünewald [EMAIL PROTECTED]: First of all: Thanks for your help! @Jan I also thought about reserved word, but didn't find id on the list of reserved freemarker-words in the docs. And I also think, that making id a reserved word is a very bad idea if you want to use a framework also in database-context ;-) @Gabriel Belingueres My id is not realy stored in a bean. It is direktly accessible in the Action through getId(), but if I try stack.findValue('id') there is the same error: @Pascal: FreeMarker template error! Expression stack.findValue('id') is undefined on line 74, column 3 in template/my/form.ftl. The problematic instruction: -- == ${stack.findValue('id')} [on line 74, column 1 in template/my/form.ftl] -- Java backtrace for programmers: -- freemarker.core.InvalidReferenceException: Expression stack.findValue('id') is undefined on line 74, column 3 in template/my/form.ftl. at freemarker.core.TemplateObject.assertNonNull(TemplateObject.java:124) at freemarker.core.Expression.getStringValue(Expression.java:118) at freemarker.core.Expression.getStringValue(Expression.java:93) at freemarker.core.DollarVariable.accept(DollarVariable.java:76) at freemarker.core.Environment.visit(Environment.java:196) at freemarker.core.MixedContent.accept(MixedContent.java:92) at freemarker.core.Environment.visit(Environment.java:196) at freemarker.core.Environment.process(Environment.java:176) at freemarker.template.Template.process(Template.java:232) at org.apache.struts2.components.template.FreemarkerTemplateEngine.renderTemplate(FreemarkerTemplateEngine.java:168) at org.apache.struts2.components.UIBean.mergeTemplate(UIBean.java:530) at org.apache.struts2.components.ClosingUIBean.start(ClosingUIBean.java:58) at org.apache.struts2.views.jsp.ComponentTagSupport.doStartTag(ComponentTagSupport.java:54) at org.apache.jsp.gui.admin.profile.edit_jsp._jspx_meth_s_005fform_005f0(edit_jsp.java:456) at org.apache.jsp.gui.admin.profile.edit_jsp._jspx_meth_tiles_005fputAttribute_005f1(edit_jsp.java:270) at org.apache.jsp.gui.admin.profile.edit_jsp._jspx_meth_tiles_005finsertDefinition_005f0(edit_jsp.java:153) at org.apache.jsp.gui.admin.profile.edit_jsp._jspService(edit_jsp.java:114) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:630) at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436) at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374) at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302) at org.apache.struts2.dispatcher.ServletDispatcherResult.doExecute(ServletDispatcherResult.java:139) at org.apache.struts2.dispatcher.StrutsResultSupport.execute(StrutsResultSupport.java:178) at com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:348) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:253) at com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:221) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223) at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221) at org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:44) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224) at
s:datetimepicker
Hello, I am using Struts 2.0.9 + dojo 0.4. I would like to know when dojo adds two hidden inputs for each s:datetimepicker tag. I have a topic that is published when I load a form and when I recieve the data and parse the form (type == load), it has N elements. When the form is rendered, if I see it in the DOM, it has N+2*m elements (where m is the number of s:datetimepicker tags the form has). So, why when I get the form from the data response in the subscribed topic those input tags are not present? When are they created? Thanks, - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: s:datetimepicker
Hello, We are using Struts 2 + Dojo too and it seems that datetimepicker separate informations into a list with two elements. The first one is the date and the second one is the time. Nevertheless, we still have problems to repopulate our inputs after an action. So we rebuild Strings to render informations. Regards, Sébastien Pablo Vázquez Blázquez a écrit : Hello, I am using Struts 2.0.9 + dojo 0.4. I would like to know when dojo adds two hidden inputs for each s:datetimepicker tag. I have a topic that is published when I load a form and when I recieve the data and parse the form (type == load), it has N elements. When the form is rendered, if I see it in the DOM, it has N+2*m elements (where m is the number of s:datetimepicker tags the form has). So, why when I get the form from the data response in the subscribed topic those input tags are not present? When are they created? Thanks, - 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: s:datetimepicker
Thank you Sébastien, but this is not actually my issue, but when does dojo do create the hidden inputs for each s:datetimepicker tag. (why if I have the form when loads and once it is loaded, they are different.) Sébastien Domergue escribió: Hello, We are using Struts 2 + Dojo too and it seems that datetimepicker separate informations into a list with two elements. The first one is the date and the second one is the time. Nevertheless, we still have problems to repopulate our inputs after an action. So we rebuild Strings to render informations. Regards, Sébastien Pablo Vázquez Blázquez a écrit : Hello, I am using Struts 2.0.9 + dojo 0.4. I would like to know when dojo adds two hidden inputs for each s:datetimepicker tag. I have a topic that is published when I load a form and when I recieve the data and parse the form (type == load), it has N elements. When the form is rendered, if I see it in the DOM, it has N+2*m elements (where m is the number of s:datetimepicker tags the form has). So, why when I get the form from the data response in the subscribed topic those input tags are not present? When are they created? Thanks, - 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: s:datetimepicker
Sorry for the misunderstanding. The difference that you see between the form while loading and the form loaded comes from dojo widget only. Struts rewrites the tag s:datetimepicker with a call to dojo (in javascript) which is executed on the client side. You could find the process construction in dojo's source (widgetDatePicker.js). Regards, Sébastien Pablo Vázquez Blázquez a écrit : Thank you Sébastien, but this is not actually my issue, but when does dojo do create the hidden inputs for each s:datetimepicker tag. (why if I have the form when loads and once it is loaded, they are different.) Sébastien Domergue escribió: Hello, We are using Struts 2 + Dojo too and it seems that datetimepicker separate informations into a list with two elements. The first one is the date and the second one is the time. Nevertheless, we still have problems to repopulate our inputs after an action. So we rebuild Strings to render informations. Regards, Sébastien Pablo Vázquez Blázquez a écrit : Hello, I am using Struts 2.0.9 + dojo 0.4. I would like to know when dojo adds two hidden inputs for each s:datetimepicker tag. I have a topic that is published when I load a form and when I recieve the data and parse the form (type == load), it has N elements. When the form is rendered, if I see it in the DOM, it has N+2*m elements (where m is the number of s:datetimepicker tags the form has). So, why when I get the form from the data response in the subscribed topic those input tags are not present? When are they created? Thanks, - 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: s:datetimepicker
Yes, that is my problem. Do you know how to do to get it? I don´t see where struts call dojo via javascript to parse the form... Thank you very much. Sébastien Domergue escribió: Sorry for the misunderstanding. The difference that you see between the form while loading and the form loaded comes from dojo widget only. Struts rewrites the tag s:datetimepicker with a call to dojo (in javascript) which is executed on the client side. You could find the process construction in dojo's source (widgetDatePicker.js). Regards, Sébastien Pablo Vázquez Blázquez a écrit : Thank you Sébastien, but this is not actually my issue, but when does dojo do create the hidden inputs for each s:datetimepicker tag. (why if I have the form when loads and once it is loaded, they are different.) Sébastien Domergue escribió: Hello, We are using Struts 2 + Dojo too and it seems that datetimepicker separate informations into a list with two elements. The first one is the date and the second one is the time. Nevertheless, we still have problems to repopulate our inputs after an action. So we rebuild Strings to render informations. Regards, Sébastien Pablo Vázquez Blázquez a écrit : Hello, I am using Struts 2.0.9 + dojo 0.4. I would like to know when dojo adds two hidden inputs for each s:datetimepicker tag. I have a topic that is published when I load a form and when I recieve the data and parse the form (type == load), it has N elements. When the form is rendered, if I see it in the DOM, it has N+2*m elements (where m is the number of s:datetimepicker tags the form has). So, why when I get the form from the data response in the subscribed topic those input tags are not present? When are they created? Thanks, - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Struts2 startup service/action
There's been a number of messages about this, and I've tried a number of different suggestions. After going round in circles for a few days, I eventually ended up with just a few lines of code that seems to work. I basically extended the FilterDispatcher, added to the init() method and used the new FilterDispatcher in my web.xml instead. This seems to work but I was wondering if it would cause potential problems. I use Guice and it seems to work, have not tested it with anything else. public class ExtendedFilterDispatcher extends FilterDispatcher { @Override public void init(FilterConfig filterConfig) throws ServletException { super.init(filterConfig); try { Container cont = super.dispatcher.getContainer(); ObjectFactory.setObjectFactory(cont.getInstance(ObjectFactory.class)); QuartzService service = (QuartzService) ObjectFactory.getObjectFactory().buildBean(QuartzService.class, null); service.start(); } catch (Exception e) { e.printStackTrace(); } } } QuartzService is an example, it can be any action or service controlled by the struts objectfactory -- View this message in context: http://www.nabble.com/Struts2-startup-service-action-tp19738655p19738655.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: s:datetimepicker
I finally found where struts call dojo. In struts' jar, check the package template.simple. You'll find datetimepicker.ftl. This is the base used by struts to generate HTML. The syntax is not very hard and you'll easily see where dojo is called. If you want to modify this, you can modify the inner ftl (use with caution) or build a new external template. The problem when you create a template from simple is that when you use all of the others, you call simple. Regards Sébastien Pablo Vázquez Blázquez a écrit : Yes, that is my problem. Do you know how to do to get it? I don´t see where struts call dojo via javascript to parse the form... Thank you very much. Sébastien Domergue escribió: Sorry for the misunderstanding. The difference that you see between the form while loading and the form loaded comes from dojo widget only. Struts rewrites the tag s:datetimepicker with a call to dojo (in javascript) which is executed on the client side. You could find the process construction in dojo's source (widgetDatePicker.js). Regards, Sébastien Pablo Vázquez Blázquez a écrit : Thank you Sébastien, but this is not actually my issue, but when does dojo do create the hidden inputs for each s:datetimepicker tag. (why if I have the form when loads and once it is loaded, they are different.) Sébastien Domergue escribió: Hello, We are using Struts 2 + Dojo too and it seems that datetimepicker separate informations into a list with two elements. The first one is the date and the second one is the time. Nevertheless, we still have problems to repopulate our inputs after an action. So we rebuild Strings to render informations. Regards, Sébastien Pablo Vázquez Blázquez a écrit : Hello, I am using Struts 2.0.9 + dojo 0.4. I would like to know when dojo adds two hidden inputs for each s:datetimepicker tag. I have a topic that is published when I load a form and when I recieve the data and parse the form (type == load), it has N elements. When the form is rendered, if I see it in the DOM, it has N+2*m elements (where m is the number of s:datetimepicker tags the form has). So, why when I get the form from the data response in the subscribed topic those input tags are not present? When are they created? Thanks, - 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] - 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: s:datetimepicker
I would prefer to call whatever struts calls to apply this template instead of changing it. Do you know how struts invokes this template? Thank you. Sébastien Domergue escribió: I finally found where struts call dojo. In struts' jar, check the package template.simple. You'll find datetimepicker.ftl. This is the base used by struts to generate HTML. The syntax is not very hard and you'll easily see where dojo is called. If you want to modify this, you can modify the inner ftl (use with caution) or build a new external template. The problem when you create a template from simple is that when you use all of the others, you call simple. Regards Sébastien Pablo Vázquez Blázquez a écrit : Yes, that is my problem. Do you know how to do to get it? I don´t see where struts call dojo via javascript to parse the form... Thank you very much. Sébastien Domergue escribió: Sorry for the misunderstanding. The difference that you see between the form while loading and the form loaded comes from dojo widget only. Struts rewrites the tag s:datetimepicker with a call to dojo (in javascript) which is executed on the client side. You could find the process construction in dojo's source (widgetDatePicker.js). Regards, Sébastien Pablo Vázquez Blázquez a écrit : Thank you Sébastien, but this is not actually my issue, but when does dojo do create the hidden inputs for each s:datetimepicker tag. (why if I have the form when loads and once it is loaded, they are different.) Sébastien Domergue escribió: Hello, We are using Struts 2 + Dojo too and it seems that datetimepicker separate informations into a list with two elements. The first one is the date and the second one is the time. Nevertheless, we still have problems to repopulate our inputs after an action. So we rebuild Strings to render informations. Regards, Sébastien Pablo Vázquez Blázquez a écrit : Hello, I am using Struts 2.0.9 + dojo 0.4. I would like to know when dojo adds two hidden inputs for each s:datetimepicker tag. I have a topic that is published when I load a form and when I recieve the data and parse the form (type == load), it has N elements. When the form is rendered, if I see it in the DOM, it has N+2*m elements (where m is the number of s:datetimepicker tags the form has). So, why when I get the form from the data response in the subscribed topic those input tags are not present? When are they created? Thanks, - 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] - 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: s:datetimepicker
When a jsp enters in struts' filter, it's read and each tag prefixed by s: (if such declared for struts tag use) is rewrite using the ftl files in the template package. It's one of the core purposes and I don't think it's a good idea to change this. I would rather recommend you to modifiy the ftl instead or try not to use dojo by loocking at the ftl. It seems that there is a way not to call dojo but another mecanism with some parameter (but i'm not sure). You're welcome. Pablo Vázquez Blázquez a écrit : I would prefer to call whatever struts calls to apply this template instead of changing it. Do you know how struts invokes this template? Thank you. Sébastien Domergue escribió: I finally found where struts call dojo. In struts' jar, check the package template.simple. You'll find datetimepicker.ftl. This is the base used by struts to generate HTML. The syntax is not very hard and you'll easily see where dojo is called. If you want to modify this, you can modify the inner ftl (use with caution) or build a new external template. The problem when you create a template from simple is that when you use all of the others, you call simple. Regards Sébastien Pablo Vázquez Blázquez a écrit : Yes, that is my problem. Do you know how to do to get it? I don´t see where struts call dojo via javascript to parse the form... Thank you very much. Sébastien Domergue escribió: Sorry for the misunderstanding. The difference that you see between the form while loading and the form loaded comes from dojo widget only. Struts rewrites the tag s:datetimepicker with a call to dojo (in javascript) which is executed on the client side. You could find the process construction in dojo's source (widgetDatePicker.js). Regards, Sébastien Pablo Vázquez Blázquez a écrit : Thank you Sébastien, but this is not actually my issue, but when does dojo do create the hidden inputs for each s:datetimepicker tag. (why if I have the form when loads and once it is loaded, they are different.) Sébastien Domergue escribió: Hello, We are using Struts 2 + Dojo too and it seems that datetimepicker separate informations into a list with two elements. The first one is the date and the second one is the time. Nevertheless, we still have problems to repopulate our inputs after an action. So we rebuild Strings to render informations. Regards, Sébastien Pablo Vázquez Blázquez a écrit : Hello, I am using Struts 2.0.9 + dojo 0.4. I would like to know when dojo adds two hidden inputs for each s:datetimepicker tag. I have a topic that is published when I load a form and when I recieve the data and parse the form (type == load), it has N elements. When the form is rendered, if I see it in the DOM, it has N+2*m elements (where m is the number of s:datetimepicker tags the form has). So, why when I get the form from the data response in the subscribed topic those input tags are not present? When are they created? Thanks, - 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] - 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: Struts2, dojo, cascading select fields
Yes. I looked and even found article about this.. But Its aren't dinamic double select fields ReadOnly wrote: ReadOnly wrote: Hi.. May be someone can help me:)..I start use struts 2.0.11, spring, hibernate. I need create cascading select fields.. For example: first select: city second select: streets .. When you are choosing city in the first one select second one need show streets only for this city... I know how such things work in asp.net, ajax... I read some information that I need install and use dojo. I installes dojo and found an example, but don't want work.. Please help me with example and with dojo. Thank you... -- View this message in context: http://www.nabble.com/Struts2%2C-dojo%2C-cascading-select-fields-tp19731071p19739517.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Struts2 + jqGrid possible?
It would be grate if you could share your code. I am waiting for it :) About my code, I think ther big problem is how to pass the jsonResult to the script, because the line below is saving the result in a local string... String jsonResult = serializer.exclude(*.class).deepSerialize(json); Thanks Date: Mon, 29 Sep 2008 23:49:45 -0500 From: [EMAIL PROTECTED] To: user@struts.apache.org Subject: Re: Struts2 + jqGrid possible? I have used the jqGrid using the standard jsson plugin, using the exclude elements for excluding all the other action properties, and it works correctly. I thing the js that constructs the grid lacks the json mapper. Tomorrow morning I will send you the code I use for this. Si quieres ser más positivo, pierde un electrón Miguel Ruiz Velasco S. On Mon, Sep 29, 2008 at 16:50, Francisco Exposito [EMAIL PROTECTED] wrote: I am trying to do it by hand. I have this in my jsp: script type=text/javascript jQuery(document).ready(function() { jQuery(#list1).jqGrid({ url:'/WebAds/AjaxRetrieveUser.do', // this is the page where the XML Output is delivered datatype: json, colNames:['Nombre','Desc'], colModel:[ {name:'name',index:'name', width:20}, {name:'description',index:'description', width:20} ], rowNum:10, rowList:[10,20,30], imgpath: 'themes/sand/images', pager: jQuery('#pager1'), sortname: 'id', viewrecords: true, sortorder: desc, width: 620, // new width height: 220, rowheight: 10, // newrow height caption: Table Caption }); }); jQuery(#list1).navGrid('#pager1',{edit:false,add:false,del:false,refresh:true,searchtext:Suchen}); /script The AjaxRetrieveUser.do is defined in struts.xml as: action name=AjaxRetrieveUser class=ads.web.action.RetrieveUser result type=customJSON/ /action and my execute function from customJSON is: ListColor colors = new ArrayListColor(); Color c1 = new Color(); c1.setId(1); c1.setName(n1); c1.setDescription(d1); Color c2 = new Color(); c2.setId(2); c2.setName(n2); c2.setDescription(d2); colors.add(c1); colors.add(c2); JQGridJSONModel json = new JQGridJSONModel(); json.setPage(1); json.setRecords(colors.size()); json.setTotal(1); ListJQGridRow rows = new ArrayListJQGridRow(); for (Color c : colors) { JQGridRow row = new JQGridRow(); row.setId(c.getId()); ListString cells = new ArrayListString(); cells.add(c.getName()); cells.add(c.getDescription()); row.setCell(cells); rows.add(row); } json.setRows(rows); JSONSerializer serializer = new JSONSerializer(); String jsonResult = serializer.exclude(*.class).deepSerialize(json); System.out.println(Resultado = + jsonResult); which returns: {page:1,records:2,rows:[{cell:[n1,d1],id:1},{cell:[n2,d2],id:2}],total:1} and it is a JSON string used by jqGrid, as I've read. But I receive an error in the console error: Error: element is not found input file: http://localhost:8080/WebAds/AjaxRetrieveUser.do?page=1rows=10sidx=idsord=descnd=1222724640660_search=false Line: 1 To: user@struts.apache.org From: [EMAIL PROTECTED] Subject: Re: Struts2 + jqGrid possible? Date: Mon, 29 Sep 2008 16:22:00 -0400 Francisco Exposito wrote: Hi, Is it possible to use jqGrid with struts2? I am trying to use it but I don't know how to do it. In the script we have: jQuery(#list2).jqGrid({ url:'server.php?q=2', datatype: json, colNames:['Inv No','Date', 'Client', 'Amount','Tax','Total','Notes'], but what about the url? It seems that it will be the data which must be shown in the table, but if I create an action in struts.xml file like that, nothing happens. The class is executed, but no info is shown inside the table. Your approach is right. I can only assume the response you are generating in your action is incorrect. Are you using the JSON plugin to write the response, or constructing the JSON by hand? L. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Prueba los prototipos de los últimos en MSN Motor http://motor.es.msn.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Llega la nueva temporada. Consulta las nuevas tendencias en MSN Estilo http://estilo.es.msn.com/moda/
Re: s:datetimepicker
I have finally solved it! I did not modify any template. This is the code in my subscribe function: if (type == load) { dojo.require(dojo.widget.Parse); var widgetParser = new dojo.widget.Parse(); var xmlParser = new dojo.xml.Parse(); var initIndex = data.indexOf(form); var endIndex = data.indexOf(/form); if ((initIndex != -1) (endIndex != -1)) { var formStr = data.substring(initIndex, endIndex+7); var div = document.createElement(div); div.innerHTML = formStr; var results = widgetParser.createComponents( xmlParser.parseElement(div.childNodes[0],null,true)); for (var i = 0; i results.length; i++) { var formNode = results[i].formNode; if (formNode formNode != ) { form1 = formNode; } } } else { form1 = undefined; } Sébastien Domergue escribió: When a jsp enters in struts' filter, it's read and each tag prefixed by s: (if such declared for struts tag use) is rewrite using the ftl files in the template package. It's one of the core purposes and I don't think it's a good idea to change this. I would rather recommend you to modifiy the ftl instead or try not to use dojo by loocking at the ftl. It seems that there is a way not to call dojo but another mecanism with some parameter (but i'm not sure). You're welcome. Pablo Vázquez Blázquez a écrit : I would prefer to call whatever struts calls to apply this template instead of changing it. Do you know how struts invokes this template? Thank you. Sébastien Domergue escribió: I finally found where struts call dojo. In struts' jar, check the package template.simple. You'll find datetimepicker.ftl. This is the base used by struts to generate HTML. The syntax is not very hard and you'll easily see where dojo is called. If you want to modify this, you can modify the inner ftl (use with caution) or build a new external template. The problem when you create a template from simple is that when you use all of the others, you call simple. Regards Sébastien Pablo Vázquez Blázquez a écrit : Yes, that is my problem. Do you know how to do to get it? I don´t see where struts call dojo via javascript to parse the form... Thank you very much. Sébastien Domergue escribió: Sorry for the misunderstanding. The difference that you see between the form while loading and the form loaded comes from dojo widget only. Struts rewrites the tag s:datetimepicker with a call to dojo (in javascript) which is executed on the client side. You could find the process construction in dojo's source (widgetDatePicker.js). Regards, Sébastien Pablo Vázquez Blázquez a écrit : Thank you Sébastien, but this is not actually my issue, but when does dojo do create the hidden inputs for each s:datetimepicker tag. (why if I have the form when loads and once it is loaded, they are different.) Sébastien Domergue escribió: Hello, We are using Struts 2 + Dojo too and it seems that datetimepicker separate informations into a list with two elements. The first one is the date and the second one is the time. Nevertheless, we still have problems to repopulate our inputs after an action. So we rebuild Strings to render informations. Regards, Sébastien Pablo Vázquez Blázquez a écrit : Hello, I am using Struts 2.0.9 + dojo 0.4. I would like to know when dojo adds two hidden inputs for each s:datetimepicker tag. I have a topic that is published when I load a form and when I recieve the data and parse the form (type == load), it has N elements. When the form is rendered, if I see it in the DOM, it has N+2*m elements (where m is the number of s:datetimepicker tags the form has). So, why when I get the form from the data response in the subscribed topic those input tags are not present? When are they created? Thanks, - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional
validation problem
hi to everybody... i am getting the problem with validating the filed which contains the drop down box. from the box we can select the item to the field. the headerkey=-1 header value=select one item. how to validate these type of fileds. my problem is---? if didn't select any item from the dropdown box,then the default value is ---select One item if the filed contains the select one item,then how validate this one from validation.xml file? if have been selected any one of the items,no validation is required. jsp s:select key=Use Existing Group list=groupNames name=useExistingGroup emptyOption=false headerKey=0 headerValue=Select Group Name / -action class variable private ListString groupNames = new ArrayListString(); please send me the clue for this one. i tried in all the ways,but i am helpless Thanking u -- View this message in context: http://www.nabble.com/validation-problem-tp19740630p19740630.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Question regarding struts.multipart.maxSize
Hello all - sorry if this is a newbie question, but I haven't seen this addressed before. I'm currently using the fileupload interceptor in my application. I have 2 distinct portions of the web site where I'd like to have users upload files. The problem is the struts.multipart.maxSize attribute seems to be global. I'd like to have one upload allow for a much larger size than the other portion of the site. Is this possible? I have multiple packages defined, but it looks like only the default struts.xml value is being used. Is this correct? Or should I be able to apply a difference value for each package? Is it possible to apply a different maxSize value for different packages, or does this need to be done programmatically? Thanks! Chris This e-mail message is being sent solely for use by the intended recipient(s) and may contain confidential information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by phone or reply by e-mail, delete the original message and destroy all copies. Thank you.
Re: validation problem
Hi, if you use xml validation, you should use a validator like this one : validator type=int param name=fieldNamemySelectBox/param param name=min0/param messagePlease select a value/message /validator As your default value is -1, the validator will only check if the value is not -1. For the rest of the values, there won't be any other check. If you use annotation validation, there is a very similar way to define that even if i didn't use it (so i won't try to write something). Hope i helped you Regards Sébastien Naag a écrit : hi to everybody... i am getting the problem with validating the filed which contains the drop down box. from the box we can select the item to the field. the headerkey=-1 header value=select one item. how to validate these type of fileds. my problem is---? if didn't select any item from the dropdown box,then the default value is ---select One item if the filed contains the select one item,then how validate this one from validation.xml file? if have been selected any one of the items,no validation is required. jsp s:select key=Use Existing Group list=groupNames name=useExistingGroup emptyOption=false headerKey=0 headerValue=Select Group Name / -action class variable private ListString groupNames = new ArrayListString(); please send me the clue for this one. i tried in all the ways,but i am helpless Thanking u - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Help with Struts 2 + Spring 2 + JPA + AJAX
Hi, I'm trying to do the Struts 2 + Spring 2 + JPA + AJAX tutorial from http://struts.apache.org/2.1.2/docs/struts-2-spring-2-jpa-ajax.html but I am getting some errors when I start the app: 30/09/2008 22:35:35 org.apache.tomcat.util.digester.SetPropertiesRule begin WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:struts-tutorial' did not find a matching property. 30/09/2008 22:35:35 org.apache.catalina.core.AprLifecycleListener init INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jdk1.6.0_07\bin;.;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;c:\program files\imagemagick-6.4.2-q16;c:\ruby\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\ATI Technologies\ATI Control Panel;C:\Program Files\Subversion\bin;C:\Program Files\Java\jdk1.6.0_07\bin;C:\Program Files\TortoiseSVN\bin;C:\Program Files\GnuWin32\bin;C:\java_tools\apache-maven-2.0.9\bin;C:\java_tools\apache-ant-1.7.0\bin;C:\Program Files\QuickTime\QTSystem\;C:\Program Files\Common Files\Ulead Systems\MPEG;C:\Program Files\CVSNT\ 30/09/2008 22:35:36 org.apache.coyote.http11.Http11Protocol init INFO: Initializing Coyote HTTP/1.1 on http-8080 30/09/2008 22:35:36 org.apache.catalina.startup.Catalina load INFO: Initialization processed in 985 ms 30/09/2008 22:35:36 org.apache.catalina.core.StandardService start INFO: Starting service Catalina 30/09/2008 22:35:36 org.apache.catalina.core.StandardEngine start INFO: Starting Servlet Engine: Apache Tomcat/6.0.16 30/09/2008 22:35:36 org.apache.catalina.core.StandardContext addApplicationListener INFO: The listener org.springframework.web.context.ContextLoaderListener is already configured for this context. The duplicate definition has been ignored. 30/09/2008 22:35:37 org.apache.catalina.core.ApplicationContext log INFO: Initializing Spring root WebApplicationContext 30/09/2008 22:35:37 org.springframework.web.context.ContextLoader initWebApplicationContext INFO: Root WebApplicationContext: initialization started 30/09/2008 22:35:37 org.springframework.context.support.AbstractApplicationContext prepareRefresh INFO: Refreshing [EMAIL PROTECTED]: display name [Root WebApplicationContext]; startup date [Tue Sep 30 22:35:37 EST 2008]; root of context hierarchy 30/09/2008 22:35:37 org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions INFO: Loading XML bean definitions from ServletContext resource [/WEB-INF/applicationContext.xml] 30/09/2008 22:35:37 org.springframework.context.support.AbstractApplicationContext obtainFreshBeanFactory INFO: Bean factory for application context [EMAIL PROTECTED]: [EMAIL PROTECTED] 30/09/2008 22:35:37 org.springframework.beans.factory.support.DefaultListableBeanFactory preInstantiateSingletons INFO: Pre-instantiating singletons in [EMAIL PROTECTED]: defining beans [org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor#0,personService,entityManagerFactory,dataSource,transactionManager,org.springframework.aop.config.internalAutoProxyCreator,org.springframework.transaction.config.internalTransactionAdvisor,personAction]; root of factory hierarchy 30/09/2008 22:35:37 org.springframework.jdbc.datasource.DriverManagerDataSource setDriverClassName INFO: Loaded JDBC driver: com.mysql.jdbc.Driver SLF4J: Failed to load class org.slf4j.impl.StaticLoggerBinder. SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details. 30/09/2008 22:35:38 org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean createNativeEntityManagerFactory INFO: Building JPA container EntityManagerFactory for persistence unit 'punit' 30/09/2008 22:35:38 org.springframework.beans.factory.support.DefaultSingletonBeanRegistry destroySingletons INFO: Destroying singletons in [EMAIL PROTECTED]: defining beans [org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor#0,personService,entityManagerFactory,dataSource,transactionManager,org.springframework.aop.config.internalAutoProxyCreator,org.springframework.transaction.config.internalTransactionAdvisor,personAction]; root of factory hierarchy 30/09/2008 22:35:38 org.springframework.web.context.ContextLoader initWebApplicationContext SEVERE: Context initialization failed org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'personService': Injection of persistence methods failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: org/slf4j/impl/StaticLoggerBinder at
Re: Help with Struts 2 + Spring 2 + JPA + AJAX
A couple of interesting lines in the log: SLF4J: Failed to load class org.slf4j.impl.StaticLoggerBinder. SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details. Nils-H On Tue, Sep 30, 2008 at 2:41 PM, abmyers [EMAIL PROTECTED] wrote: Hi, I'm trying to do the Struts 2 + Spring 2 + JPA + AJAX tutorial from http://struts.apache.org/2.1.2/docs/struts-2-spring-2-jpa-ajax.html but I am getting some errors when I start the app: 30/09/2008 22:35:35 org.apache.tomcat.util.digester.SetPropertiesRule begin WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:struts-tutorial' did not find a matching property. 30/09/2008 22:35:35 org.apache.catalina.core.AprLifecycleListener init INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jdk1.6.0_07\bin;.;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;c:\program files\imagemagick-6.4.2-q16;c:\ruby\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\ATI Technologies\ATI Control Panel;C:\Program Files\Subversion\bin;C:\Program Files\Java\jdk1.6.0_07\bin;C:\Program Files\TortoiseSVN\bin;C:\Program Files\GnuWin32\bin;C:\java_tools\apache-maven-2.0.9\bin;C:\java_tools\apache-ant-1.7.0\bin;C:\Program Files\QuickTime\QTSystem\;C:\Program Files\Common Files\Ulead Systems\MPEG;C:\Program Files\CVSNT\ 30/09/2008 22:35:36 org.apache.coyote.http11.Http11Protocol init INFO: Initializing Coyote HTTP/1.1 on http-8080 30/09/2008 22:35:36 org.apache.catalina.startup.Catalina load INFO: Initialization processed in 985 ms 30/09/2008 22:35:36 org.apache.catalina.core.StandardService start INFO: Starting service Catalina 30/09/2008 22:35:36 org.apache.catalina.core.StandardEngine start INFO: Starting Servlet Engine: Apache Tomcat/6.0.16 30/09/2008 22:35:36 org.apache.catalina.core.StandardContext addApplicationListener INFO: The listener org.springframework.web.context.ContextLoaderListener is already configured for this context. The duplicate definition has been ignored. 30/09/2008 22:35:37 org.apache.catalina.core.ApplicationContext log INFO: Initializing Spring root WebApplicationContext 30/09/2008 22:35:37 org.springframework.web.context.ContextLoader initWebApplicationContext INFO: Root WebApplicationContext: initialization started 30/09/2008 22:35:37 org.springframework.context.support.AbstractApplicationContext prepareRefresh INFO: Refreshing [EMAIL PROTECTED]: display name [Root WebApplicationContext]; startup date [Tue Sep 30 22:35:37 EST 2008]; root of context hierarchy 30/09/2008 22:35:37 org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions INFO: Loading XML bean definitions from ServletContext resource [/WEB-INF/applicationContext.xml] 30/09/2008 22:35:37 org.springframework.context.support.AbstractApplicationContext obtainFreshBeanFactory INFO: Bean factory for application context [EMAIL PROTECTED]: [EMAIL PROTECTED] 30/09/2008 22:35:37 org.springframework.beans.factory.support.DefaultListableBeanFactory preInstantiateSingletons INFO: Pre-instantiating singletons in [EMAIL PROTECTED]: defining beans [org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor#0,personService,entityManagerFactory,dataSource,transactionManager,org.springframework.aop.config.internalAutoProxyCreator,org.springframework.transaction.config.internalTransactionAdvisor,personAction]; root of factory hierarchy 30/09/2008 22:35:37 org.springframework.jdbc.datasource.DriverManagerDataSource setDriverClassName INFO: Loaded JDBC driver: com.mysql.jdbc.Driver SLF4J: Failed to load class org.slf4j.impl.StaticLoggerBinder. SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details. 30/09/2008 22:35:38 org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean createNativeEntityManagerFactory INFO: Building JPA container EntityManagerFactory for persistence unit 'punit' 30/09/2008 22:35:38 org.springframework.beans.factory.support.DefaultSingletonBeanRegistry destroySingletons INFO: Destroying singletons in [EMAIL PROTECTED]: defining beans [org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor#0,personService,entityManagerFactory,dataSource,transactionManager,org.springframework.aop.config.internalAutoProxyCreator,org.springframework.transaction.config.internalTransactionAdvisor,personAction]; root of factory hierarchy 30/09/2008 22:35:38 org.springframework.web.context.ContextLoader initWebApplicationContext SEVERE: Context initialization failed org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'personService': Injection of persistence methods failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating
Re: Tree default expanded ??
any one who worked on tree control plz give some helping hand On Fri, Sep 26, 2008 at 3:34 PM, Narayana S [EMAIL PROTECTED] wrote: Hi Is it possible to display a tree expanded by default? I am using struts 2.1.2 dojo-plugin to create the tree structure. any one used tree...plz help me
Re: Tree default expanded ??
As far as I know, it is not possible to expand tree widget server-side. Client-side, javascript can be used to open the tree, like so:var nodes = dojo.widget.manager.getWidgetsByType('struts:StrutsTreeNode'); for( var i=0; i nodes.length; i++){ nodes[i].expand(); } Jukka On Tue, Sep 30, 2008 at 4:59 PM, Narayana S [EMAIL PROTECTED] wrote: any one who worked on tree control plz give some helping hand On Fri, Sep 26, 2008 at 3:34 PM, Narayana S [EMAIL PROTECTED] wrote: Hi Is it possible to display a tree expanded by default? I am using struts 2.1.2 dojo-plugin to create the tree structure. any one used tree...plz help me
Different error messages for client and server side validation
Hi all, we are using a elements in our error messages to allow the user to go to the form field when the error message shows up. Obviously this messes up the client side javascript popup message which shows like: a href=#UsernameUsername/a is missing. Is there a way to use a different error message or should we abandon the idea of client side validation? Regards Dimitris Mouchritsas - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Different error messages for client and server side validation
Dimitris Mouchritsas wrote: Hi all, we are using a elements in our error messages to allow the user to go to the form field when the error message shows up. Obviously this messes up the client side javascript popup message which shows like: a href=#UsernameUsername/a is missing. Is there a way to use a different error message or should we abandon the idea of client side validation? Regards Dimitris Mouchritsas - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] BTW Struts v1.3.8 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Different error messages for client and server side validation
Your Action classes can add ActionMessages for a specific property, not just GLOBAL_MESSAGES. Then, display GLOBAL_MESSAGES at the top of the page, and field-specific ones relative to the field. (this will work in 1.3.8) See http://struts.apache.org/1.2.7/api/org/apache/struts/action/ActionMessag es.html Specifically: add(java.lang.String, org.apache.struts.action.ActionMessage) get(java.lang.String) -Original Message- From: Dimitris Mouchritsas [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 30, 2008 11:23 AM To: Struts Users Mailing List Subject: Re: Different error messages for client and server side validation Dimitris Mouchritsas wrote: Hi all, we are using a elements in our error messages to allow the user to go to the form field when the error message shows up. Obviously this messes up the client side javascript popup message which shows like: a href=#UsernameUsername/a is missing. Is there a way to use a different error message or should we abandon the idea of client side validation? Regards Dimitris Mouchritsas - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] BTW Struts v1.3.8 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Notice: This e-mail message, together with any attachments, contains information of Merck Co., Inc. (One Merck Drive, Whitehouse Station, New Jersey, USA 08889), and/or its affiliates (which may be known outside the United States as Merck Frosst, Merck Sharp Dohme or MSD and in Japan, as Banyu - direct contact information for affiliates is available at http://www.merck.com/contact/contacts.html) that may be confidential, proprietary copyrighted and/or legally privileged. It is intended solely for the use of the individual or entity named on this message. If you are not the intended recipient, and have received this message in error, please notify us immediately by reply e-mail and then delete it from your system. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts2 startup service/action
I think the more common way is to use a standard ServletContextListener. (*Chris*) On Tue, Sep 30, 2008 at 2:16 AM, Ron Chan [EMAIL PROTECTED] wrote: There's been a number of messages about this, and I've tried a number of different suggestions. After going round in circles for a few days, I eventually ended up with just a few lines of code that seems to work. I basically extended the FilterDispatcher, added to the init() method and used the new FilterDispatcher in my web.xml instead. This seems to work but I was wondering if it would cause potential problems. I use Guice and it seems to work, have not tested it with anything else. public class ExtendedFilterDispatcher extends FilterDispatcher { @Override public void init(FilterConfig filterConfig) throws ServletException { super.init(filterConfig); try { Container cont = super.dispatcher.getContainer(); ObjectFactory.setObjectFactory(cont.getInstance(ObjectFactory.class)); QuartzService service = (QuartzService) ObjectFactory.getObjectFactory().buildBean(QuartzService.class, null); service.start(); } catch (Exception e) { e.printStackTrace(); } } } QuartzService is an example, it can be any action or service controlled by the struts objectfactory -- View this message in context: http://www.nabble.com/Struts2-startup-service-action-tp19738655p19738655.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Different error messages for client and server side validation
Geia sou wre Dimitri. Dimitris Mouchritsas wrote: we are using a elements in our error messages to allow the user to go to the form field when the error message shows up. Obviously this messes up the client side javascript popup message which shows like: a href=#UsernameUsername/a is missing. Is there a way to use a different error message or should we abandon the idea of client side validation? You could modify the JS file in the struts JARs (cant remember where it is) and modify the code to strip the markup from the alert() *only*. A function to strip markup is stripTags = function (s) { return s?s.replace(/[^]+/g,):s; }; so you could modify e.g. alert(errors); to alert(stripTags(errors)); Xeraitismata ston Pitarokili, to Valassopoulo kai to Nikita ;-) Cheers, Manos - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Different error messages for client and server side validation
Kawczynski, David wrote: Your Action classes can add ActionMessages for a specific property, not just GLOBAL_MESSAGES. Then, display GLOBAL_MESSAGES at the top of the page, and field-specific ones relative to the field. (this will work in 1.3.8) See http://struts.apache.org/1.2.7/api/org/apache/struts/action/ActionMessag es.html Specifically: add(java.lang.String, org.apache.struts.action.ActionMessage) get(java.lang.String) -Original Message- From: Dimitris Mouchritsas [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 30, 2008 11:23 AM To: Struts Users Mailing List Subject: Re: Different error messages for client and server side validation Dimitris Mouchritsas wrote: Hi all, we are using a elements in our error messages to allow the user to go to the form field when the error message shows up. Obviously this messes up the client side javascript popup message which shows like: a href=#UsernameUsername/a is missing. Is there a way to use a different error message or should we abandon the idea of client side validation? Regards Dimitris Mouchritsas - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] BTW Struts v1.3.8 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Notice: This e-mail message, together with any attachments, contains information of Merck Co., Inc. (One Merck Drive, Whitehouse Station, New Jersey, USA 08889), and/or its affiliates (which may be known outside the United States as Merck Frosst, Merck Sharp Dohme or MSD and in Japan, as Banyu - direct contact information for affiliates is available at http://www.merck.com/contact/contacts.html) that may be confidential, proprietary copyrighted and/or legally privileged. It is intended solely for the use of the individual or entity named on this message. If you are not the intended recipient, and have received this message in error, please notify us immediately by reply e-mail and then delete it from your system. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Can you please elaborate with a small example? I don't get it. Thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts2 startup service/action
but this does not give me access to the Guice injector, which is what I wanted. I think the ServletContextListener would work only if using Spring. Chris Pratt wrote: I think the more common way is to use a standard ServletContextListener. (*Chris*) On Tue, Sep 30, 2008 at 2:16 AM, Ron Chan [EMAIL PROTECTED] wrote: There's been a number of messages about this, and I've tried a number of different suggestions. After going round in circles for a few days, I eventually ended up with just a few lines of code that seems to work. I basically extended the FilterDispatcher, added to the init() method and used the new FilterDispatcher in my web.xml instead. This seems to work but I was wondering if it would cause potential problems. I use Guice and it seems to work, have not tested it with anything else. public class ExtendedFilterDispatcher extends FilterDispatcher { @Override public void init(FilterConfig filterConfig) throws ServletException { super.init(filterConfig); try { Container cont = super.dispatcher.getContainer(); ObjectFactory.setObjectFactory(cont.getInstance(ObjectFactory.class)); QuartzService service = (QuartzService) ObjectFactory.getObjectFactory().buildBean(QuartzService.class, null); service.start(); } catch (Exception e) { e.printStackTrace(); } } } QuartzService is an example, it can be any action or service controlled by the struts objectfactory -- View this message in context: http://www.nabble.com/Struts2-startup-service-action-tp19738655p19738655.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Struts2-startup-service-action-tp19738655p19745637.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Invoking Action Class from JSP
Hi all. I'm looking into how to invoke a Strut's action from a JSP page. I'm able to do it pretty easy in Stripes with this code: [EMAIL PROTECTED] import=simplifile.web.action.ScheduleTransactionAction% [EMAIL PROTECTED] import=net.sourceforge.stripes.action.ForwardResolution% [EMAIL PROTECTED] import=simplifile.quail.*,java.util.*,java.text.*,simplifile.search.*,s implifile.net.*,simplifile.ach.* errorPage=../error.jsp%[EMAIL PROTECTED] file=../html/nocache.html% mailto:[EMAIL PROTECTED]/html/nocache.html%22%25 % ForwardResolution forwardResolution = new ForwardResolution(ScheduleTransactionAction.class, schedule_bounce); forwardResolution.execute(request, response); % I'm looking into how to do the same exact thing in Struts. Any thoughts? --Eric
Struts 2 Ajax DateTime Picker compatibility with FireFox 3
I am using inbuilt struts 2 ajax date time picker for my web application. It works fine with FireFox 2 but I face issues with rendering of these controls in FireFox 3. FireFox 3 is really unpredictable in rendering date picker and time picker. Sometime it does not renders date picker or time picker or both , some times every thing works fine. Could you guys please suggest resolution to this issue. Thanks, Abhinav -- View this message in context: http://www.nabble.com/Struts-2-Ajax-DateTime-Picker-compatibility-with-FireFox-3-tp19745978p19745978.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Different error messages for client and server side validation
What I spoke of doesn't really address your immediate issue, which was how could you use different error messages for client-sided and server-sided validation. It's more of a workaround as it eliminates the need to have your error messages contain links to the fields. Have you ever filled out a form where invalid field values result in a big bold error message being rendered directly above the field that contained the invalid value? That's what this would do. Invalid values would result in a javascript alert box containing plain text (Username is required) for clients with javascript enabled. Script-disabled browsers would have an error box at the top of the page containing something like Please correct the errors below, and the username text box would have big red text above it reading Username is required. Unless your form is many pages long, linking to the errors would perhaps be considered a novelty. If your form really is that long, you may want to consider breaking it up into multiple pages. Just a thought. In your action class: public ActionForward execute(req, res, form, mapping) { ActionMessages failures = null; if(form.getUsername() == null) { failures.add(username, new ActionMessage(error.username)); failures.add(ActionMessages.GLOBAL_MESSAGE, new ActionError(validation.failure); } saveMessages(req, failures); ... } Your JSP page: body logic:messagesPresent message=true property=org.apache.struts.action.GLOBAL_MESSAGE div class=errorHeaderThe following error(s) occurred:/div ul html:messages property=org.apache.struts.action.GLOBAL_MESSAGE id=message libean:write name=message/br /html:messages /ul /logic:messagesPresent form logic:messagesPresent message=true property=username div class=errorDetailhtml:errors property=username//div /logic:messagesPresent input name=username/ logic:messagesPresent message=true property=password div class=errorDetailhtml:errors property=password//div /logic:messagesPresent input name=password/ /form /body -Original Message- From: Dimitris Mouchritsas [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 30, 2008 12:13 PM To: Struts Users Mailing List Subject: Re: Different error messages for client and server side validation Kawczynski, David wrote: Your Action classes can add ActionMessages for a specific property, not just GLOBAL_MESSAGES. Then, display GLOBAL_MESSAGES at the top of the page, and field-specific ones relative to the field. (this will work in 1.3.8) See http://struts.apache.org/1.2.7/api/org/apache/struts/action/ActionMessag es.html Specifically: add(java.lang.String, org.apache.struts.action.ActionMessage) get(java.lang.String) -Original Message- From: Dimitris Mouchritsas [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 30, 2008 11:23 AM To: Struts Users Mailing List Subject: Re: Different error messages for client and server side validation Dimitris Mouchritsas wrote: Hi all, we are using a elements in our error messages to allow the user to go to the form field when the error message shows up. Obviously this messes up the client side javascript popup message which shows like: a href=#UsernameUsername/a is missing. Is there a way to use a different error message or should we abandon the idea of client side validation? Regards Dimitris Mouchritsas BTW Struts v1.3.8 Can you please elaborate with a small example? I don't get it. Thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Notice: This e-mail message, together with any attachments, contains information of Merck Co., Inc. (One Merck Drive, Whitehouse Station, New Jersey, USA 08889), and/or its affiliates (which may be known outside the United States as Merck Frosst, Merck Sharp Dohme or MSD and in Japan, as Banyu - direct contact information for affiliates is available at http://www.merck.com/contact/contacts.html) that may be confidential, proprietary copyrighted and/or legally privileged. It is intended solely for the use of the individual or entity named on this message. If you are not the intended recipient, and have received this message in error, please notify us immediately by reply e-mail and then delete it from your system. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Invoking Action Class from JSP
You can use the struts s:action / tag. Just include a reference to the struts-tags%@ Then call the action like this: s:actionid=actionIdname=actionNamenamespace=/executeResult=true/http://struts.apache.org/2.x/docs/action.html Documentation can be found here: Hope this helps, Zak - Original Message From: Eric Nelson [EMAIL PROTECTED] To: user@struts.apache.org Sent: Tuesday, September 30, 2008 11:42:45 AM Subject: Invoking Action Class from JSP Hi all. I'm looking into how to invoke a Strut's action from a JSP page. I'm able to do it pretty easy in Stripes with this code: [EMAIL PROTECTED] import=simplifile.web.action.ScheduleTransactionAction% [EMAIL PROTECTED] import=net.sourceforge.stripes.action.ForwardResolution% [EMAIL PROTECTED] import=simplifile.quail.*,java.util.*,java.text.*,simplifile.search.*,s implifile.net.*,simplifile.ach.* errorPage=../error.jsp%[EMAIL PROTECTED] file=../html/nocache.html% mailto:[EMAIL PROTECTED]/html/nocache.html%22%25 % ForwardResolution forwardResolution = new ForwardResolution(ScheduleTransactionAction.class, schedule_bounce); forwardResolution.execute(request, response); % I'm looking into how to do the same exact thing in Struts. Any thoughts? --Eric taglibprefix=suri=/struts-tags%
RE: Invoking Action Class from JSP
Thanks Zak. However, the s:action tag calls an action inline, and renders the results on the same page. I'm looking to forward the request on, similar to jsp:forward/. Does Struts have a class similar to ForwardResolution? --Eric -Original Message- From: zakary melvin [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 30, 2008 11:49 AM To: Struts Users Mailing List Subject: Re: Invoking Action Class from JSP You can use the struts s:action / tag. Just include a reference to the struts-tags%@ Then call the action like this: s:actionid=actionIdname=actionNamenamespace=/executeResult=true/http://struts.apache.org/2.x/docs/action.html Documentation can be found here: Hope this helps, Zak - Original Message From: Eric Nelson [EMAIL PROTECTED] To: user@struts.apache.org Sent: Tuesday, September 30, 2008 11:42:45 AM Subject: Invoking Action Class from JSP Hi all. I'm looking into how to invoke a Strut's action from a JSP page. I'm able to do it pretty easy in Stripes with this code: [EMAIL PROTECTED] import=simplifile.web.action.ScheduleTransactionAction% [EMAIL PROTECTED] import=net.sourceforge.stripes.action.ForwardResolution% [EMAIL PROTECTED] import=simplifile.quail.*,java.util.*,java.text.*,simplifile.search.*,s implifile.net.*,simplifile.ach.* errorPage=../error.jsp%[EMAIL PROTECTED] file=../html/nocache.html% mailto:[EMAIL PROTECTED]/html/nocache.html%22%25 % ForwardResolution forwardResolution = new ForwardResolution(ScheduleTransactionAction.class, schedule_bounce); forwardResolution.execute(request, response); % I'm looking into how to do the same exact thing in Struts. Any thoughts? --Eric taglibprefix=suri=/struts-tags% - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Inspect Tile Definitions
Hi All, We're using Struts Tiles 1.3.5 in Spring 2.0 on Tomcat 5.5 and Java 1.6. With Spring, we're loading a view that is a Tile definition. That Tile loads several other Tiles respectively. Some of those sub-Tiles include global advertising Tiles such as the banner ad, a square ad, a pop-under ad, etc. The ad system we are using requires us to make one call to the ad server to get all of the ads needed for the page. In our first pass, we put flags in each ad Tile to indicate that our footer AJAX should retrieve the ads required by the Tiles inserted. This works ok, but we have some technical difficulties with post-render ad positioning that are causing us to consider alternatives. We were wondering if there is any way for us, in the primary view Tile, to inspect the Tile definitions that WILL be loaded into the page. Then we can simply determine if certain Tiles are present, we can insert the ads proactively as the page is constructed. Any suggestions? Thanks! -Ryan Shelley
Re: Inspect Tile Definitions
2008/9/30 Shelley, Ryan [EMAIL PROTECTED]: We were wondering if there is any way for us, in the primary view Tile, to inspect the Tile definitions that WILL be loaded into the page. I don't know if it's useful, but you could use a Tiles controller to preprocess your definition: http://struts.apache.org/1.3.8/apidocs/org/apache/struts/tiles/Controller.html The ComponentContext parameter has all the attributes that will be used in the definition. Antonio - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Inspect Tile Definitions
Thanks for the prompt response! We're using Spring Controllers and not Struts Controllers. Tiles is the only Struts component we're using. Unfortunately, we have hundreds of Spring Controllers, and it wouldn't be feasible to refactor them all to use a separate Controller type. Thanks for the suggestion! -Ryan -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Antonio Petrelli Sent: Tuesday, September 30, 2008 11:30 AM To: Struts Users Mailing List Subject: Re: Inspect Tile Definitions 2008/9/30 Shelley, Ryan [EMAIL PROTECTED]: We were wondering if there is any way for us, in the primary view Tile, to inspect the Tile definitions that WILL be loaded into the page. I don't know if it's useful, but you could use a Tiles controller to preprocess your definition: http://struts.apache.org/1.3.8/apidocs/org/apache/struts/tiles/Controlle r.html The ComponentContext parameter has all the attributes that will be used in the definition. Antonio - 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: Inspect Tile Definitions
2008/9/30 Shelley, Ryan [EMAIL PROTECTED]: Thanks for the prompt response! We're using Spring Controllers and not Struts Controllers. Tiles is the only Struts component we're using. Unfortunately, we have hundreds of Spring Controllers, and it wouldn't be feasible to refactor them all to use a separate Controller type. No wait, Tiles controllers are a totally different concept (in fact the name was pretty unfortunate, in Tiles 2 we renamed it into preparer). The Tiles controller is specified into the XML definition files, for example: definition name=my.definition page=/my/page.jsp controllerClass=my.package.MyControllerClass ... /definition HTH Antonio - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Inspect Tile Definitions
Interesting! Is there a URL to some documentation or examples or are there any examples of Tile Controllers in any of the packages? So in theory, if we put a custom Tile Controller on the primary Tile definition, that Controller class could inspect down into the Tile tree for that view and set page-level values that could be accessed when the JSP is rendered? -Ryan -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Antonio Petrelli Sent: Tuesday, September 30, 2008 11:51 AM To: Struts Users Mailing List Subject: Re: Inspect Tile Definitions 2008/9/30 Shelley, Ryan [EMAIL PROTECTED]: Thanks for the prompt response! We're using Spring Controllers and not Struts Controllers. Tiles is the only Struts component we're using. Unfortunately, we have hundreds of Spring Controllers, and it wouldn't be feasible to refactor them all to use a separate Controller type. No wait, Tiles controllers are a totally different concept (in fact the name was pretty unfortunate, in Tiles 2 we renamed it into preparer). The Tiles controller is specified into the XML definition files, for example: definition name=my.definition page=/my/page.jsp controllerClass=my.package.MyControllerClass ... /definition HTH Antonio - 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: Inspect Tile Definitions
2008/9/30 Shelley, Ryan [EMAIL PROTECTED]: Interesting! Is there a URL to some documentation or examples or are there any examples of Tile Controllers in any of the packages? The only thing that I can find is this: http://www.theserverside.com/tt/articles/article.tss?l=Tiles101 So in theory, if we put a custom Tile Controller on the primary Tile definition, that Controller class could inspect down into the Tile tree for that view and set page-level values that could be accessed when the JSP is rendered? Not exactly, it could inspect attributes that you put in, it won't inspect JSP pages. Antonio - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Inspect Tile Definitions
Well, I just need to know if Tile definitions A, B and C are in the chain of Tiles to be inserted in the particular page render, and if so, put some variables in the Request or Page scope for the JSP to pick up during render. -Ryan -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Antonio Petrelli Sent: Tuesday, September 30, 2008 12:04 PM To: Struts Users Mailing List Subject: Re: Inspect Tile Definitions 2008/9/30 Shelley, Ryan [EMAIL PROTECTED]: Interesting! Is there a URL to some documentation or examples or are there any examples of Tile Controllers in any of the packages? The only thing that I can find is this: http://www.theserverside.com/tt/articles/article.tss?l=Tiles101 So in theory, if we put a custom Tile Controller on the primary Tile definition, that Controller class could inspect down into the Tile tree for that view and set page-level values that could be accessed when the JSP is rendered? Not exactly, it could inspect attributes that you put in, it won't inspect JSP pages. Antonio - 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]
International Menu Help
I am trying to build and use a Yahoo UI menu in my struts2 / tiles2 application. The menu I am creating is a static 'logged out' menu created in the action triggerd by the web app 'index.jsp'. The menu is a ListMenu collection and is added to the session, e.g. session.put(basicMenu, basicMenuList); The data transfer object that I am using has a setLabel(String label) method. Everything works fine until I want to set the labels based on the current locale. My MenuBuilder action class is where the menu is constructed prior to placement in the session. I also have resource bundles configured for various languages in my MenuBuilder.properties. An example name/value pair is 'menu.login=Login' for english - en, and 'menu.login=Inicio de sesión' for spanish - es. Every time the user sets their language preference, I want to rebuild the menu using locale specific text like those found in the resource bundles. In the Language.java action, I remove the current menu from the session, build a new menu, and put in the session again. session.remove(basicMenu); basicMenuList = new MenuBuilder().getStaticMenu(); session.put(basicMenu, basicMenuList); Here are some of the things I've tried to pick up the properties file values with no success. I'm probably out in left field with little comprehension of the framework, but if there is someone that can help me with my problem, or suggest a different methodology, I'll thank you and sing your praises. Menu ts_login = new Menu(); ts_login.setId(1102); //ts_login.setLabel(Login); // This is hard coding ts_login.setLabel(menu.login); // This also is hard coding //ts_login.setLabel(%{getText('menu.login')});//The prevents the menu from dispalying at all //ts_login.setLabel(getText('menu.login')); //The prevents the menu from dispalying at all
RE: Inspect Tile Definitions
When I use ComponentContext and get the attributes in the context, is there a way to determine that attribute A is a Tile and I can then drill into that Tile and get a list of its attributes? Can I do an instanceof against the Object returned from getAttribute to compare it to some class that will have getAttribute and getAttributeNames methods? -Ryan -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Shelley, Ryan Sent: Tuesday, September 30, 2008 1:26 PM To: Struts Users Mailing List Subject: RE: Inspect Tile Definitions Well, I just need to know if Tile definitions A, B and C are in the chain of Tiles to be inserted in the particular page render, and if so, put some variables in the Request or Page scope for the JSP to pick up during render. -Ryan -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Antonio Petrelli Sent: Tuesday, September 30, 2008 12:04 PM To: Struts Users Mailing List Subject: Re: Inspect Tile Definitions 2008/9/30 Shelley, Ryan [EMAIL PROTECTED]: Interesting! Is there a URL to some documentation or examples or are there any examples of Tile Controllers in any of the packages? The only thing that I can find is this: http://www.theserverside.com/tt/articles/article.tss?l=Tiles101 So in theory, if we put a custom Tile Controller on the primary Tile definition, that Controller class could inspect down into the Tile tree for that view and set page-level values that could be accessed when the JSP is rendered? Not exactly, it could inspect attributes that you put in, it won't inspect JSP pages. Antonio - 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: International Menu Help
--- On Tue, 9/30/08, Williams, Marlon wrote: Menu ts_login = new Menu(); ts_login.setId(1102); //ts_login.setLabel(Login); // This is hard coding ts_login.setLabel(menu.login); // This also is hard coding //ts_login.setLabel(%{getText('menu.login')}); //The prevents the menu from dispalying at all I'm lost; this is Java code in an ActionSupport-derived action? That shouldn't even *compile* let alone do anything useful. Doesn't normal Java work? ts_login.setLabel(getText(menu.login)); Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: International Menu Help
Your solution works great! Syntax issue, bad on me. Thanks very much! DAN IS THE GREATEST! Singing the praises. From: Dave Newton [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 30, 2008 2:22 PM To: Struts Users Mailing List Subject: Re: International Menu Help --- On Tue, 9/30/08, Williams, Marlon wrote: Menu ts_login = new Menu(); ts_login.setId(1102); //ts_login.setLabel(Login); // This is hard coding ts_login.setLabel(menu.login); // This also is hard coding //ts_login.setLabel(%{getText('menu.login')}); //The prevents the menu from dispalying at all I'm lost; this is Java code in an ActionSupport-derived action? That shouldn't even *compile* let alone do anything useful. Doesn't normal Java work? ts_login.setLabel(getText(menu.login)); 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: International Menu Help
--- On Tue, 9/30/08, Williams, Marlon wrote: Your solution works great! Syntax issue, bad on me. Thanks very much! No problem. DAN IS THE GREATEST! Singing the praises. Who's Dan? Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts 2 Ajax DateTime Picker compatibility with FireFox 3
I had no issues using the datetimepicker with FF3. Maybe your problems are related with the following post: http://dojotoolkit.org/forum/dojo-0-4-x-legacy/dojo-0-4-x-support/firefox-3-and-struts-2-theme-ajax-render-issues 2008/9/30 Abhinav Sharma [EMAIL PROTECTED]: I am using inbuilt struts 2 ajax date time picker for my web application. It works fine with FireFox 2 but I face issues with rendering of these controls in FireFox 3. FireFox 3 is really unpredictable in rendering date picker and time picker. Sometime it does not renders date picker or time picker or both , some times every thing works fine. Could you guys please suggest resolution to this issue. Thanks, Abhinav -- View this message in context: http://www.nabble.com/Struts-2-Ajax-DateTime-Picker-compatibility-with-FireFox-3-tp19745978p19745978.html Sent from the Struts - User mailing list archive at Nabble.com. - 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: Inspect Tile Definitions
I considered putting the Tile Controller on each Ad Tile that would collect Ad codes to expose to in the request, which works, except that each Tile is rendered and flushed to the browser one at a time, so by the time the last Ad is processed, the header (which contains the Ad engine code) has already been sent to the browser. Ideally, we'd be able to inspect each Tile that WILL be loaded and then put a string of Ad codes in the request before the page is rendered so the Ad Engine code in the header will have a complete list of all the Ads to be rendered on the page. -Ryan -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Antonio Petrelli Sent: Tuesday, September 30, 2008 12:04 PM To: Struts Users Mailing List Subject: Re: Inspect Tile Definitions 2008/9/30 Shelley, Ryan [EMAIL PROTECTED]: Interesting! Is there a URL to some documentation or examples or are there any examples of Tile Controllers in any of the packages? The only thing that I can find is this: http://www.theserverside.com/tt/articles/article.tss?l=Tiles101 So in theory, if we put a custom Tile Controller on the primary Tile definition, that Controller class could inspect down into the Tile tree for that view and set page-level values that could be accessed when the JSP is rendered? Not exactly, it could inspect attributes that you put in, it won't inspect JSP pages. Antonio - 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]
FileUpload + Token interceptor problem
Hi, I have a problem when using the token and fileUpload interceptor together (Struts 2.0.11.2). When I put fileUpload before token in my interceptor stack and I upload a file larger than the maximum allowed I get 2 error messages: * the request was rejected because its size (14544755) exceeds the configured maximum (2097152) * The form has already been processed or no token was supplied, please try again. When I put token before fileUpload in my interceptor stack and I upload a file larger than the maximum allowed I get 1 error messages: * The form has already been processed or no token was supplied, please try again. Does someone know how to get just the one error message when uploading a file larger than maximum ? And only get the token error message when posting the form twice ? Thanks! Jeroen - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]