Re: Struts and Tiles
2007/5/16, David Miller [EMAIL PROTECTED]: I'd like to be able to insert *portions* of another page using tiles. I think that Sitemesh would be better for this task. Antonio - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
form is not getting submitted
hi im creating a application for online test so i have used a link to submit using java script document.forms[0].submit(); but some time this is not getting submitted im last moment can u give me idea for this . if i click again it gets submitted or if there is any time difference also its not getting submitted pls thanks jalal
Re: Interceptor execution
Ray Clough wrote: I've got a large S1 app into which I'm putting S2 features - starting with a How? Are you using S2 with the S1 plugin? Or just putting both versions into one WAR and mix'n'matching? LoginInterceptor, because the S1 security-implementation was NG. The S2 NG? No Good? Next Generation? Nearly Ganked? ;-) mapping in web.xml is to the url /*, which I figured would catch all requests, both from S1 actions and from S2 actions. The S1 Action servlet There is no 'from', only 'too'. Too or too not. There is not from. Oops, have I been watching too much Star Wars? The point is, it doesn't matter where a request comes from; once it comes in, it's just a request. What happens next is based on the form of the request; in this case, specifically, the URL that's requested. is mapped to *.do. It appears that the S1 actions aren't intercepted, making the LoginInterceptor not work for them. How is *.do bypassing /*. Given the request URL http://host:port/x/y/z.do, which pattern matches: /* or *.do? Obviously both patterns match. I'm not sure if the behaviour in this case is specified or not, but if it is then the order of the mappings is likely what determines which wins. Is this really the case, or can something be done to force S1 actions thru the S2 interceptor. Err... not sure I understand the question. You can't have an S2 interceptor applied to a request that's being handled by S1, since S1 doesn't know about interceptors. I think you'd need to post a more concrete example of the sort of process flow you're trying to achieve and the configuration(s) you're trying to get there. L. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
datetimepicker dateformat problem
Hi, If I use the datetimepicker and add the dateFormat=dd/MM/ attribute. When the form is posted I get a convertor error. If I leave it as the default format there is no problem. Does anyone know why please. Thanks Dave. Looking for a deal? Find great prices on flights and hotels with Yahoo! FareChase. http://farechase.yahoo.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Using jetty, struts2 with minimal spring and struts2 XML configuration for TDD (AJAX)
I am trying to: 1. Instantiate jetty from code (easy) 2. pre-instantiate proper controller class (with mock data and without spring) (easy) 3. Setup a minimal hard-coded struts action that will invoke the controller instance and render the jsp. I am trying to do it inside jetty but all I need is sufficient context to have struts2 and jsp rendering. I want to invoke: localhost:8080/test.action from some kind of test framework (selenium, httpunit or similar) and check the response according to parameters set in controller. Possibly I would want to re-run with different settings in the controller. The controller/jsp combination is an AJAX handler, so there is a very compelling case for unit-testing the actual response. Furthermore I have multiple such actions so I would really enjoy It if I could do it all in code ( no xml). If so I could probably make it a part of the unit test hierarchy. Anyone have suggestions or code for this? Kristian
Flexible textarea
Hi everyone ! I want to create a non-fixed size textarea. I want it to resize itself depending on the amount of text received. For example if it receives 20 characters the size should be different to when it receives 200 characters without the need of scrolling. Is there functionality for it in jsp or struts ? Jose * Working Together for a Better Tower Hamlets Web site : http://www.towerhamlets.gov.uk London Borough of Tower Hamlets E-Mail Disclaimer. This communication and any attachments are intended for the addressee only and may be confidential. It may contain privileged and confidential information and if you are not the intended recipient, you must not copy, distribute or take any action in reliance on it. If you have received this E-Mail in error please notify us as soon as possible and delete this E-Mail and any attachments. This message has been checked for viruses, however we cannot guarantee that this message or any attachment is virus free or has not been intercepted or amended. The information contained in this E-Mail may be subject to public disclosure under the Freedom of Information Act 2000. Unless the information is legally exempt from disclosure, the Confidentiality of this E-Mail and your reply cannot be guaranteed.
RE: Flexible textarea
Hi there ! No need to reply the Flexible textarea question. It was a matter of counting the number of words and passing it as a string to the jsp value for the cols bit. Like: tr tdbean:message key= /:/td tdhtml:textarea rows=10 cols=%=count% property=x //td /tr Thanks anyaway Jose -Original Message- From: Jose Cardoso [mailto:[EMAIL PROTECTED] Sent: 16 May 2007 09:29 To: Struts Users Mailing List Subject: Flexible textarea Hi everyone ! I want to create a non-fixed size textarea. I want it to resize itself depending on the amount of text received. For example if it receives 20 characters the size should be different to when it receives 200 characters without the need of scrolling. Is there functionality for it in jsp or struts ? Jose * Working Together for a Better Tower Hamlets Web site : http://www.towerhamlets.gov.uk London Borough of Tower Hamlets E-Mail Disclaimer. This communication and any attachments are intended for the addressee only and may be confidential. It may contain privileged and confidential information and if you are not the intended recipient, you must not copy, distribute or take any action in reliance on it. If you have received this E-Mail in error please notify us as soon as possible and delete this E-Mail and any attachments. This message has been checked for viruses, however we cannot guarantee that this message or any attachment is virus free or has not been intercepted or amended. The information contained in this E-Mail may be subject to public disclosure under the Freedom of Information Act 2000. Unless the information is legally exempt from disclosure, the Confidentiality of this E-Mail and your reply cannot be guaranteed. * Working Together for a Better Tower Hamlets Web site : http://www.towerhamlets.gov.uk London Borough of Tower Hamlets E-Mail Disclaimer. This communication and any attachments are intended for the addressee only and may be confidential. It may contain privileged and confidential information and if you are not the intended recipient, you must not copy, distribute or take any action in reliance on it. If you have received this E-Mail in error please notify us as soon as possible and delete this E-Mail and any attachments. This message has been checked for viruses, however we cannot guarantee that this message or any attachment is virus free or has not been intercepted or amended. The information contained in this E-Mail may be subject to public disclosure under the Freedom of Information Act 2000. Unless the information is legally exempt from disclosure, the Confidentiality of this E-Mail and your reply cannot be guaranteed. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[s2] break up a large struts.xml file into smaller pieces : extends problem
Hi all, I try to separate the modules of my app in differents xml files, but the extends seems to have problems. Struts.xml : struts constant name=struts.enable.DynamicMethodInvocation value=false / constant name=struts.objectFactory value=spring / constant name=struts.devMode value=true / constant name=struts.custom.i18n.resources value=package / include file=struts-default.xml/ package name=default extends=struts-default interceptors interceptor name=login class= com.abw.util.LoginInterceptor / interceptor-stack name=crmStack interceptor-ref name=servletConfig/ interceptor-ref name=i18n/ interceptor-ref name=login/ interceptor-ref name=modelDriven/ interceptor-ref name=fileUpload/ interceptor-ref name=checkbox/ interceptor-ref name=staticParams/ interceptor-ref name=params param name=excludeParamsdojo\..*/param /interceptor-ref interceptor-ref name=validation param name=excludeMethodsinput,back,cancel,browse /param /interceptor-ref interceptor-ref name=workflow param name=excludeMethodsinput,back,cancel,browse /param /interceptor-ref /interceptor-stack /interceptors default-interceptor-ref name=crmStack/ global-results result name=notLogged/loginV2.jsp/result result name=globalError/error.jsp/result /global-results /package include file=home.xml/ include file=activites.xml/ /struts home.xml : struts package name=home extends=default action name=enter class=com.abw.coordination.EnterAction result/loginV2.jsp/result /action action name=login class=com.abw.coordination.LoginAction result/frame.jsp/result result name=error/error.jsp/result /action action name=bandeau class=com.abw.coordination.BandeauAction /action action name=titre class=com.abw.coordination.TitreAction /action action name=home class=com.abw.coordination.HomeAction result type=redirectAction param name=actionNameactivites/param /result /action /package /struts The error : 2007-05-16 10:45:18,374 [main] ERROR com.opensymphony.xwork2.config.ConfigurationUtil - Unable to find parent package default 2007-05-16 10:45:18,374 [main] ERROR com.opensymphony.xwork2.config.providers.XmlConfigurationProvider - Unable to find parent packages default 2007-05-16 10:45:18,390 [main] ERROR org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/crm] - Exception au démarrage du filtre struts Error building results for action enter in namespace - action - file:/C:/_applis/eclipse/workspace/CRMV2/crm-webapp/WebContent/WEB-INF/classes/home.xml:7:71 at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.addAction( XmlConfigurationProvider.java:299) at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.addPackage( XmlConfigurationProvider.java:384) at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadPackages( XmlConfigurationProvider.java:239) I would like to have the default-interceptor to be crmStack in each sub-xml, so I would like to extends package default of struts.xml, not struts-default; Is that possible ? I'm in v2.1.0-SNAPSHOT-20070425 Thanks, Michaël.
RE: [s2] break up a large struts.xml file into smaller pieces : extends problem
There's a known bug in the parsing of the struts.xml file, which I believe has been fixed in the 2.0.2 version of the xwork library, that prevents it from finding the packages that you define in struts.xml and later extend. However, I was able to work around this problem by putting my own default package into its own file and including it *last* in the struts.xml. So, in your case, use the following: struts ... include file=home.xml/ include file=activites.xml/ include file=default.xml/ /struts where default.xml contains your default pacakge definition below. I don't like the ordering dependency of the includes, but I like how it makes my struts.xml file cleaner. -- David -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 16, 2007 4:03 AM To: user@struts.apache.org Subject: [s2] break up a large struts.xml file into smaller pieces : extends problem Hi all, I try to separate the modules of my app in differents xml files, but the extends seems to have problems. Struts.xml : struts constant name=struts.enable.DynamicMethodInvocation value=false / constant name=struts.objectFactory value=spring / constant name=struts.devMode value=true / constant name=struts.custom.i18n.resources value=package / include file=struts-default.xml/ package name=default extends=struts-default interceptors interceptor name=login class= com.abw.util.LoginInterceptor / interceptor-stack name=crmStack interceptor-ref name=servletConfig/ interceptor-ref name=i18n/ interceptor-ref name=login/ interceptor-ref name=modelDriven/ interceptor-ref name=fileUpload/ interceptor-ref name=checkbox/ interceptor-ref name=staticParams/ interceptor-ref name=params param name=excludeParamsdojo\..*/param /interceptor-ref interceptor-ref name=validation param name=excludeMethodsinput,back,cancel,browse /param /interceptor-ref interceptor-ref name=workflow param name=excludeMethodsinput,back,cancel,browse /param /interceptor-ref /interceptor-stack /interceptors default-interceptor-ref name=crmStack/ global-results result name=notLogged/loginV2.jsp/result result name=globalError/error.jsp/result /global-results /package include file=home.xml/ include file=activites.xml/ /struts home.xml : struts package name=home extends=default action name=enter class=com.abw.coordination.EnterAction result/loginV2.jsp/result /action action name=login class=com.abw.coordination.LoginAction result/frame.jsp/result result name=error/error.jsp/result /action action name=bandeau class=com.abw.coordination.BandeauAction /action action name=titre class=com.abw.coordination.TitreAction /action action name=home class=com.abw.coordination.HomeAction result type=redirectAction param name=actionNameactivites/param /result /action /package /struts The error : 2007-05-16 10:45:18,374 [main] ERROR com.opensymphony.xwork2.config.ConfigurationUtil - Unable to find parent package default 2007-05-16 10:45:18,374 [main] ERROR com.opensymphony.xwork2.config.providers.XmlConfigurationProvider - Unable to find parent packages default 2007-05-16 10:45:18,390 [main] ERROR org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/crm] - Exception au démarrage du filtre struts Error building results for action enter in namespace - action - file:/C:/_applis/eclipse/workspace/CRMV2/crm-webapp/WebContent/WEB-INF/class es/home.xml:7:71 at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.addAction( XmlConfigurationProvider.java:299) at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.addPackage ( XmlConfigurationProvider.java:384) at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadPackag es( XmlConfigurationProvider.java:239) I would like to have the default-interceptor to be crmStack in each sub-xml, so I would like to extends package default of struts.xml, not struts-default; Is that possible ? I'm in v2.1.0-SNAPSHOT-20070425 Thanks, Michaël. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [s2] break up a large struts.xml file into smaller pieces : extends problem
One more thing - once I upgraded to xwork 2.0.2, I was able to include my default/base package include file first. -- David -Original Message- From: David Chisholm [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 16, 2007 4:29 AM To: 'Struts Users Mailing List' Subject: RE: [s2] break up a large struts.xml file into smaller pieces : extends problem There's a known bug in the parsing of the struts.xml file, which I believe has been fixed in the 2.0.2 version of the xwork library, that prevents it from finding the packages that you define in struts.xml and later extend. However, I was able to work around this problem by putting my own default package into its own file and including it *last* in the struts.xml. So, in your case, use the following: struts ... include file=home.xml/ include file=activites.xml/ include file=default.xml/ /struts where default.xml contains your default pacakge definition below. I don't like the ordering dependency of the includes, but I like how it makes my struts.xml file cleaner. -- David -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 16, 2007 4:03 AM To: user@struts.apache.org Subject: [s2] break up a large struts.xml file into smaller pieces : extends problem Hi all, I try to separate the modules of my app in differents xml files, but the extends seems to have problems. Struts.xml : struts constant name=struts.enable.DynamicMethodInvocation value=false / constant name=struts.objectFactory value=spring / constant name=struts.devMode value=true / constant name=struts.custom.i18n.resources value=package / include file=struts-default.xml/ package name=default extends=struts-default interceptors interceptor name=login class= com.abw.util.LoginInterceptor / interceptor-stack name=crmStack interceptor-ref name=servletConfig/ interceptor-ref name=i18n/ interceptor-ref name=login/ interceptor-ref name=modelDriven/ interceptor-ref name=fileUpload/ interceptor-ref name=checkbox/ interceptor-ref name=staticParams/ interceptor-ref name=params param name=excludeParamsdojo\..*/param /interceptor-ref interceptor-ref name=validation param name=excludeMethodsinput,back,cancel,browse /param /interceptor-ref interceptor-ref name=workflow param name=excludeMethodsinput,back,cancel,browse /param /interceptor-ref /interceptor-stack /interceptors default-interceptor-ref name=crmStack/ global-results result name=notLogged/loginV2.jsp/result result name=globalError/error.jsp/result /global-results /package include file=home.xml/ include file=activites.xml/ /struts home.xml : struts package name=home extends=default action name=enter class=com.abw.coordination.EnterAction result/loginV2.jsp/result /action action name=login class=com.abw.coordination.LoginAction result/frame.jsp/result result name=error/error.jsp/result /action action name=bandeau class=com.abw.coordination.BandeauAction /action action name=titre class=com.abw.coordination.TitreAction /action action name=home class=com.abw.coordination.HomeAction result type=redirectAction param name=actionNameactivites/param /result /action /package /struts The error : 2007-05-16 10:45:18,374 [main] ERROR com.opensymphony.xwork2.config.ConfigurationUtil - Unable to find parent package default 2007-05-16 10:45:18,374 [main] ERROR com.opensymphony.xwork2.config.providers.XmlConfigurationProvider - Unable to find parent packages default 2007-05-16 10:45:18,390 [main] ERROR org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/crm] - Exception au démarrage du filtre struts Error building results for action enter in namespace - action - file:/C:/_applis/eclipse/workspace/CRMV2/crm-webapp/WebContent/WEB-INF/class es/home.xml:7:71 at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.addAction( XmlConfigurationProvider.java:299) at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.addPackage ( XmlConfigurationProvider.java:384) at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadPackag es( XmlConfigurationProvider.java:239) I would like to have the default-interceptor to be crmStack in each sub-xml, so I would like to extends package default of struts.xml, not struts-default; Is
Struts 2 and Velocity
Hi, Has anybody successfully used Velocity with Struts 2? I understand that there is built in support for Velocity in Struts 2. Can you point me to some online examples that I can use to see the use of Velocity with Struts 2? Thanks, CS - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
expression evaluation, injection
hi in a jsp file: s:property value=index/ s:property value=#session.mydata.myarray[...?...].textfield/ how can i inject the index' value to 'myarray' index rgds - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Redirecting from mapping error exceptions
Hey all I have the following lines in Struts.xml global-results result name=error/index/result /global-results global-exception-mappings exception-mapping result=error exception=java.lang.Throwable/ /global-exception-mappings But it won't catch exceptions where the user has typed in an unmapped address, all I get is There is no Action mapped for namespace / and action name xxx (with status report 500) Can I somehow redirect all these exceptions to my index page? Thanks! -- View this message in context: http://www.nabble.com/Redirecting-from-mapping-error-exceptions-tf3763683.html#a10638948 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: expression evaluation, injection
my question, my answer :) made a mistake by trying to escape ... s:property value=#session.mydata.myarray[index].textfield/ rgds On 16.05.2007 12:52, Jaan Tark wrote: hi in a jsp file: s:property value=index/ s:property value=#session.mydata.myarray[...?...].textfield/ how can i inject the index' value to 'myarray' index rgds - 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]
ValueStack - retrieve parent object inside s:iterator
Hi. The code: s:iterator value=collection of objects tags:render-some-jsp-page / /s:iterator On this rendered page i had a tag which format and display properties of this object. I retrieve those fields,properties in this way: stack.findValue(field) where stack is a ValueStack object. So i had an access to all fields of this object, but i want get the object not the fields. Is it is possible ? It must be on the valueStack but how to get/found him ? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Why I cannot use Interceptor to change the value of Action?
I need to use Interceptor to change a value of Action. For example, below is my intercept method. public String intercept(ActionInvocation invocation) throws Exception { String result; result = invocation.invoke(); MyAction action = (MyAction)invocation.getAction(); User user = action.getUser(); user.setName(name2); action.setUser(user); return result; } here is my Action class: public class MyAction extends ActionSupport { private User user; public MyAction() { user = new User(); } public String execute() throws Exception { user.setName(name1); } public User getUser() { return user; } public void setUser(User user) { this.user = user; } } In the jsp page, I use c:property value=user.name/ to display the user's name, but it always display name1. Why the interceptor cannot change the value after invode invocation.invoke() method? Thanks -- Regards, Fanbin
Re: Why I cannot use Interceptor to change the value of Action?
--- kong xx [EMAIL PROTECTED] wrote: Why the interceptor cannot change the value after invode invocation.invoke() method? http://struts.apache.org/2.x/docs/writing-interceptors.html Note in particular the big yellow box section about when the invoke method returns! d. Give spam the boot. Take control with tough spam protection in the all-new Yahoo! Mail Beta. http://advision.webevents.yahoo.com/mailbeta/newmail_html.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
how I can I have validation skip for the first page load?
Hello, I would like to allow my forms to load once before being validated. That is the form should only be validated upon submission, not on load. The way that I'm accomplishing this right now is by creating a separate action to load the form, however this is starting to clutter up the struts.xml file as the number of forms on my site grows. Is there any other way? Thanks for any help or ideas. -Dan Henry - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: how I can I have validation skip for the first page load?
--- Daniel Henry [EMAIL PROTECTED] wrote: I would like to allow my forms to load once before being validated. That is the form should only be validated upon submission, not on load. The way that I'm accomplishing this right now is by creating a separate action to load the form, however this is starting to clutter up the struts.xml file as the number of forms on my site grows. Is there any other way? I'm assuming S2 since you say struts.xml. The input result (among a few others) are pre-configured to not be validated (see the validation interceptor docs). d. Looking for earth-friendly autos? Browse Top Cars by Green Rating at Yahoo! Autos' Green Center. http://autos.yahoo.com/green_center/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [S2] How to refresh one tab in Tabbedpanel instead of whole page?
If you are using IE make sure you set showLoadingText=false(nasty difference with FF), and yes, it should work just assigning the form id to the formId attribute, something like: s:tabbedpanel ... s:div theme=ajax id=parent s:form id=myform ... s:submit theme=ajax showLoadingText=false target=parent/ /s:form /s:div /s:tabbedpanel musachy On 5/15/07, Jason Wyatt [EMAIL PROTECTED] wrote: Thanks Martin, Yes, I have been using s:form action=IacSummaryAction method=post Jason -Original Message- From: Martin Gainty [mailto:[EMAIL PROTECTED] Sent: Wednesday, 16 May 2007 11:02 AM To: Struts Users Mailing List Subject: Re: [S2] How to refresh one tab in Tabbedpanel instead of whole page? while constructing your form *presumably* with html:form be sure to specify method= attribute here is the 1.x Taglib doc http://struts.apache.org/1.x/struts-taglib/tlddoc/html/form.html the 2.x Taglib doc http://struts.apache.org/2.x/docs/form.html HTH/ M-- This email message and any files transmitted with it contain confidential information intended only for the person(s) to whom this email message is addressed. If you have received this email message in error, please notify the sender immediately by telephone or email and destroy the original message without making a copy. Thank you. - Original Message - From: Jason Wyatt [EMAIL PROTECTED] To: 'Struts Users Mailing List' user@struts.apache.org Sent: Tuesday, May 15, 2007 8:36 PM Subject: RE: [S2] How to refresh one tab in Tabbedpanel instead of whole page? Hi Marco, I tried using the code template you gave, but couldn't get it to do a *form submit* to the action... It just seems to just do a GET without form parameters. Does it do a form submit for you? Sorry, I mightn't have been clear... I wanted to *submit a form* inside a tab to that tab's Action, then have the tab load the updated contents. For example, say I have a tab that searches for employees. I fill out the search criteria then press Search. I want the search form to be submitted to the employeeSearchAction, then the search tab to be refreshed with the list of employees, without loading the whole page. So far I've only been able to either just refresh a tab with some URL (without the form submitting), or submit a form and refresh the whole page. I haven't got both the form to submit correctly and then only that tab to refresh. It would be great if this is possible! Thanks Jason -Original Message- From: Marco Carnevale [mailto:[EMAIL PROTECTED] Sent: Wednesday, 16 May 2007 2:29 AM To: Struts Users Mailing List Subject: Re: [S2] How to refresh one tab in Tabbedpanel instead of whole page? I am doing this on my project. The tab refreshes when the user selects a button. 1) You should know the div name for the tab you are interested in. In this example the div name is: myTabDivId s:url id=myUrl action=/MyAction/ s:tabbedPanel id=myTabs name=myTabs selectedTab=%{activeCaseTab} s:div id=myTabDivId href=%{myUrl} theme=ajax label=The Tabs Name / /s:tabbedPanel 2) You need a URL to submit to when the button is pressed that returns the contents (i.e. tile) of the tab (this may be the same as the url in step 1) s:url id=refreshURL action=/RefreshAction / 3) You need to turn on th ajax on the button and specify the tab div id that you want to replace. s:submit key=button.add theme=ajax targets=myTabDivId disabled=false href=%{refreshURL} / Marco On 5/15/07, Musachy Barroso [EMAIL PROTECTED] wrote: If you put a whole tabbedpanel inside a remote div, then you can reload it anytime you want. regards musachy On 5/15/07, Jason Wyatt [EMAIL PROTECTED] wrote: Hi, we're using the Struts 2 tabbedpanel tag. One problem we're having is that whenever we do a submit from within a tab, we to reload the same tab with the results. At the moment we our submit button posts to an XAction mentioned in the s:div tag for the given X tab. The XAction returns a TabsResult that causes the main.jsp page containing the tabbedpanel to be loaded. The main.jsp page causes the XAction related the given X tab to be hit again, this time to load the contents of the tab. The XAction returns a different TabXResult, causing a related Xtab.jspto be loaded and displayed in the s:div layer. This works ok for one layer of tabs... we now want nested layers, which is looking like a complex problem. Is there an easier solution, that can maybe just reload the specific tab's s:div layer with the result of the XAction? That would be most excellent. Thanks in advance, regards Jason - Falun Dafa Truth - Compassion - Forbearance A mind body practice under persecution in China http://www.faluninfo.net/ http://www.faluninfo.net -- Hey you! Would you help me to carry the stone? Pink Floyd
Re: datetimepicker dateformat problem
The dateFormat should not be used and will be removed. Date will always be submitted as RFC 3339. musachy On 5/16/07, David Harland [EMAIL PROTECTED] wrote: Hi, If I use the datetimepicker and add the dateFormat=dd/MM/ attribute. When the form is posted I get a convertor error. If I leave it as the default format there is no problem. Does anyone know why please. Thanks Dave. Looking for a deal? Find great prices on flights and hotels with Yahoo! FareChase. http://farechase.yahoo.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Hey you! Would you help me to carry the stone? Pink Floyd
RE: datetimepicker dateformat problem
How can I format the displayed date? -Original Message- From: Musachy Barroso [mailto:[EMAIL PROTECTED] Sent: 16 May 2007 14:10 To: Struts Users Mailing List Subject: Re: datetimepicker dateformat problem The dateFormat should not be used and will be removed. Date will always be submitted as RFC 3339. musachy On 5/16/07, David Harland [EMAIL PROTECTED] wrote: Hi, If I use the datetimepicker and add the dateFormat=dd/MM/ attribute. When the form is posted I get a convertor error. If I leave it as the default format there is no problem. Does anyone know why please. Thanks Dave. __ __Looking for a deal? Find great prices on flights and hotels with Yahoo! FareChase. http://farechase.yahoo.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Hey you! Would you help me to carry the stone? Pink Floyd - -- ML {UFI} __ Ufi Limited Registered in England No. 3980770 Registered Office: Dearing House, 1 Young Street, Sheffield, S1 4UP learndirect Solutions Ltd Registered in England No. 5081669 Registered Office: Dearing House, 1 Young Street, Sheffield, S1 4UP UFI Charitable Trust Registered in England No. 3658378 Registered Charity No. 1081028 Registered Office: Dearing House, 1 Young Street, Sheffield, S1 4UP This email has been scanned by the MessageLabs Email Security System. __ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: datetimepicker dateformat problem
use displayFormat musachy On 5/16/07, David Harland [EMAIL PROTECTED] wrote: How can I format the displayed date? -Original Message- From: Musachy Barroso [mailto:[EMAIL PROTECTED] Sent: 16 May 2007 14:10 To: Struts Users Mailing List Subject: Re: datetimepicker dateformat problem The dateFormat should not be used and will be removed. Date will always be submitted as RFC 3339. musachy On 5/16/07, David Harland [EMAIL PROTECTED] wrote: Hi, If I use the datetimepicker and add the dateFormat=dd/MM/ attribute. When the form is posted I get a convertor error. If I leave it as the default format there is no problem. Does anyone know why please. Thanks Dave. __ __Looking for a deal? Find great prices on flights and hotels with Yahoo! FareChase. http://farechase.yahoo.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Hey you! Would you help me to carry the stone? Pink Floyd - -- ML {UFI} __ Ufi Limited Registered in England No. 3980770 Registered Office: Dearing House, 1 Young Street, Sheffield, S1 4UP learndirect Solutions Ltd Registered in England No. 5081669 Registered Office: Dearing House, 1 Young Street, Sheffield, S1 4UP UFI Charitable Trust Registered in England No. 3658378 Registered Charity No. 1081028 Registered Office: Dearing House, 1 Young Street, Sheffield, S1 4UP This email has been scanned by the MessageLabs Email Security System. __ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Hey you! Would you help me to carry the stone? Pink Floyd
forwarding to another action passing parameters
This is a Struts 2 question. I'm looking for a common solution to the problem stated in the subject. The easiest way to explain what exactly I want is with an example. I have two actions: 1) ListAction, that displays a list of database entries. 2) CreateAction, that receives input from a form, creates a new entry in the database and passes control to the ListAction. The last thing to say about the ListAction is that it should be able to display messages like entry successfully created if it is executed after CreateAction (as described above). Following things are important for me: 1) Both actions must run within the same HTTP request from browser. (don't really care how many HttpRequest instances are created.) 2) The ListAction should NOT receive any of the parameters, received by CreateAction. (a new clean HttpRequest for ListAction would be actually ideal) Please don't tell me something like if the action properties of both action classes don't match, the parameters won't be transferred anyway or use another method instead of execute. _I want to avoid any effort of ensuring that no accidental parameter interference between the two actions occurs_. 3) it should be able to specify explicitely (via struts.xml or within the execute() of CreateAction) which parameters I want to pass to ListAction. 4) I DON'T want to pass parameters through session. I have tried following things, neither of which satisfies me: 1) for CreateAction use result type=redirect-action and use dynamic parameters in struts.xml. Don't like this approach because there are two requests from browser and the parameters are passed through an URI of the second request. Thus I'm unable to easily pass anything more complicated than a string and finally I don't want to dispose any internal stuff through URLs visible in the browser. 2) use result type=chain As far as I can see this thing is designed to allow two actions to process the same HttpRequest (If I'm wrong or missing something a comment is appreciated) Which is again NOT what I want. If the ListAction accidentally recognizes some parameters recognized by CreateAction, I will have a problem. Further using this approach I have tried to clear() the request Map (obtained through RequestAware) but when this is done, the JSP of ListAction won't display any ListAction properties. Obviously clear() breaks some essentials. (it kills the valuestack object in the request map as far as I have seen while debugging, which for some obscure reason prevents the final JSP to obtain any of the properties of ListAction). Thus my question is: What's the right way of forwarding to another action, having a clean request for this another action but being able to pass some parameters from the initial action. This is a simple requirement, that is needed in almost any webapp I can imagine, and I absolutely believe something like this must be a core feature. But I simply don't see a solution after spending several days on it! Any ideas or comments heavily appreciated! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AJAX query
I have a code in JSP file span id=oamHeaderDateTimeInfo%= userDate() %/span and I'm updating it using AJAX . but surprisingly, the control doesnt go to this userDate() function again ..due to which my date time is not gettingupdated . Pls help. Thanks Kavita *DISCLAIMER* This message and/or attachment(s) contained here are confidential, proprietary to HUGHES SYSTIQUE and its customers. Contents may be privileged or otherwise protected by law. The information is solely intended for the entity it is addressed to. If you are not the intended recipient of this message, it is strictly prohibited to read, forward, print, retain, copy or disseminate this message or any part of it. If you have received this e-mail in error, please notify the sender immediately and delete the message.
RE: datetimepicker dateformat problem
Sorry Musachy that was a typo I mean't displayFormat. If I use displayFormat=dd/MM/ I get a convertor error when I post the form. -Original Message- From: Musachy Barroso [mailto:[EMAIL PROTECTED] Sent: 16 May 2007 14:19 To: Struts Users Mailing List Subject: Re: datetimepicker dateformat problem use displayFormat musachy On 5/16/07, David Harland [EMAIL PROTECTED] wrote: How can I format the displayed date? -Original Message- From: Musachy Barroso [mailto:[EMAIL PROTECTED] Sent: 16 May 2007 14:10 To: Struts Users Mailing List Subject: Re: datetimepicker dateformat problem The dateFormat should not be used and will be removed. Date will always be submitted as RFC 3339. musachy On 5/16/07, David Harland [EMAIL PROTECTED] wrote: Hi, If I use the datetimepicker and add the dateFormat=dd/MM/ attribute. When the form is posted I get a convertor error. If I leave it as the default format there is no problem. Does anyone know why please. Thanks Dave. __ __Looking for a deal? Find great prices on flights and hotels with Yahoo! FareChase. http://farechase.yahoo.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Hey you! Would you help me to carry the stone? Pink Floyd - -- ML {UFI} __ Ufi Limited Registered in England No. 3980770 Registered Office: Dearing House, 1 Young Street, Sheffield, S1 4UP learndirect Solutions Ltd Registered in England No. 5081669 Registered Office: Dearing House, 1 Young Street, Sheffield, S1 4UP UFI Charitable Trust Registered in England No. 3658378 Registered Charity No. 1081028 Registered Office: Dearing House, 1 Young Street, Sheffield, S1 4UP This email has been scanned by the MessageLabs Email Security System. __ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Hey you! Would you help me to carry the stone? Pink Floyd - -- ML {UFI} __ Ufi Limited Registered in England No. 3980770 Registered Office: Dearing House, 1 Young Street, Sheffield, S1 4UP learndirect Solutions Ltd Registered in England No. 5081669 Registered Office: Dearing House, 1 Young Street, Sheffield, S1 4UP UFI Charitable Trust Registered in England No. 3658378 Registered Charity No. 1081028 Registered Office: Dearing House, 1 Young Street, Sheffield, S1 4UP This email has been scanned by the MessageLabs Email Security System. __ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: AJAX query
When you say your updating it using AJAX, do you mean you are making an AJAX request and putting the results into oamHeaderDateTimeInfo? Or do you mean you are making an AJAX request who's response is generated by this JSP? If the former, then it makes perfect sense: userData() is a server-side function and would absolutely not be executed again... if the later, we may need further details to know because it certainly appears that it should be working as you expect. Frank -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com AIM/Yahoo: fzammetti MSN: [EMAIL PROTECTED] Author of Practical Ajax Projects With Java Technology (2006, Apress, ISBN 1-59059-695-1) and JavaScript, DOM Scripting and Ajax Projects (2007, Apress, ISBN 1-59059-816-4) Java Web Parts - http://javawebparts.sourceforge.net Supplying the wheel, so you don't have to reinvent it! Kavita Mehta wrote: I have a code in JSP file span id=oamHeaderDateTimeInfo%= userDate() %/span and I'm updating it using AJAX . but surprisingly, the control doesnt go to this userDate() function again ..due to which my date time is not gettingupdated . Pls help. Thanks Kavita *DISCLAIMER* This message and/or attachment(s) contained here are confidential, proprietary to HUGHES SYSTIQUE and its customers. Contents may be privileged or otherwise protected by law. The information is solely intended for the entity it is addressed to. If you are not the intended recipient of this message, it is strictly prohibited to read, forward, print, retain, copy or disseminate this message or any part of it. If you have received this e-mail in error, please notify the sender immediately and delete the message. No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.467 / Virus Database: 269.7.1/805 - Release Date: 5/15/2007 10:47 AM -- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: form is not getting submitted
Is there any particular reason your doing the submit via Javascript? If not, I'd suggest using a plain old submit button and see if you still have the problem. If you do have a reason for doing it this way, try giving the form an id and submit it via document.getElementById(xxx).submit() ... I don't have any reason to believe this would work any better, but I've seen stranger things :) Frank -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com AIM/Yahoo: fzammetti MSN: [EMAIL PROTECTED] Author of Practical Ajax Projects With Java Technology (2006, Apress, ISBN 1-59059-695-1) and JavaScript, DOM Scripting and Ajax Projects (2007, Apress, ISBN 1-59059-816-4) Java Web Parts - http://javawebparts.sourceforge.net Supplying the wheel, so you don't have to reinvent it! jalal udeen wrote: hi im creating a application for online test so i have used a link to submit using java script document.forms[0].submit(); but some time this is not getting submitted im last moment can u give me idea for this . if i click again it gets submitted or if there is any time difference also its not getting submitted pls thanks jalal No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.467 / Virus Database: 269.7.1/805 - Release Date: 5/15/2007 10:47 AM -- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: how I can I have validation skip for the first page load?
Dave Newton wrote: --- Daniel Henry [EMAIL PROTECTED] wrote: I would like to allow my forms to load once before being validated. That is the form should only be validated upon submission, not on load. The way that I'm accomplishing this right now is by creating a separate action to load the form, however this is starting to clutter up the struts.xml file as the number of forms on my site grows. Is there any other way? I'm assuming S2 since you say struts.xml. The input result (among a few others) are pre-configured to not be validated (see the validation interceptor docs). d. Looking for earth-friendly autos? Browse Top Cars by Green Rating at Yahoo! Autos' Green Center. http://autos.yahoo.com/green_center/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Thank you Dave. I am using s2. However, I'm not sure how to implement this solution. The validation interceptor runs before my Action, therefore I don't have a chance to return input. -Dan Henry - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: datetimepicker dateformat problem
Then you are probably another victim of: https://issues.apache.org/struts/browse/WW-1917 only work around is to have a String property for the date, or define your own type converter. regards musachy On 5/16/07, David Harland [EMAIL PROTECTED] wrote: Sorry Musachy that was a typo I mean't displayFormat. If I use displayFormat=dd/MM/ I get a convertor error when I post the form. -Original Message- From: Musachy Barroso [mailto:[EMAIL PROTECTED] Sent: 16 May 2007 14:19 To: Struts Users Mailing List Subject: Re: datetimepicker dateformat problem use displayFormat musachy On 5/16/07, David Harland [EMAIL PROTECTED] wrote: How can I format the displayed date? -Original Message- From: Musachy Barroso [mailto:[EMAIL PROTECTED] Sent: 16 May 2007 14:10 To: Struts Users Mailing List Subject: Re: datetimepicker dateformat problem The dateFormat should not be used and will be removed. Date will always be submitted as RFC 3339. musachy On 5/16/07, David Harland [EMAIL PROTECTED] wrote: Hi, If I use the datetimepicker and add the dateFormat=dd/MM/ attribute. When the form is posted I get a convertor error. If I leave it as the default format there is no problem. Does anyone know why please. Thanks Dave. __ __Looking for a deal? Find great prices on flights and hotels with Yahoo! FareChase. http://farechase.yahoo.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Hey you! Would you help me to carry the stone? Pink Floyd - -- ML {UFI} __ Ufi Limited Registered in England No. 3980770 Registered Office: Dearing House, 1 Young Street, Sheffield, S1 4UP learndirect Solutions Ltd Registered in England No. 5081669 Registered Office: Dearing House, 1 Young Street, Sheffield, S1 4UP UFI Charitable Trust Registered in England No. 3658378 Registered Charity No. 1081028 Registered Office: Dearing House, 1 Young Street, Sheffield, S1 4UP This email has been scanned by the MessageLabs Email Security System. __ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Hey you! Would you help me to carry the stone? Pink Floyd - -- ML {UFI} __ Ufi Limited Registered in England No. 3980770 Registered Office: Dearing House, 1 Young Street, Sheffield, S1 4UP learndirect Solutions Ltd Registered in England No. 5081669 Registered Office: Dearing House, 1 Young Street, Sheffield, S1 4UP UFI Charitable Trust Registered in England No. 3658378 Registered Charity No. 1081028 Registered Office: Dearing House, 1 Young Street, Sheffield, S1 4UP This email has been scanned by the MessageLabs Email Security System. __ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Hey you! Would you help me to carry the stone? Pink Floyd
Struts 2, Popup window ?
I am trying to accomplish the following: 1. I am on a page and would like the user to click on a link which would invoke my popup window picker. 2. The popup window is an Action that allows the user to make a multi selection. 3. After the user selects his values and clicks ok, I would like the Popup window to close and the selected values to appear on the page. The selected values should be just text(not a form field). To accomplish this, 1. I do the following, # picker This does create a new screen, with my action invoked. 2. Now how to I accept the values and close the screen. 3. How do I display them on the parent screen as just none editable text(not a form textfield text) ( what i am trying to accomplish here is show a list of selected values) Any help would be much appreciated. Will -- View this message in context: http://www.nabble.com/Struts-2%2C-Popup-window---tf3764664.html#a10642057 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
s:select .../
Can someone identify the attributes of this example code, preferably in the documentation itself? http://struts.apache.org/2.x/docs/select.html s:select label=Pets name=petIds list=petDao.pets listKey=id listValue=name multiple=true size=3 required=true / Is there an expectation that a getPetDao() exists somewhere? Also, what is listKey/listValue and what does the discussion concerning (if list is an Iterable Map) have to do with the setup? A select box is so common that it eludes me how development comes to a screeching halt when you need to drop one on a screen! -- Scott [EMAIL PROTECTED]
Re: Struts 2, Popup window ?
1. I am on a page and would like the user to click on a link which would invoke my popup window picker. Sorry, but what is a popup window picker? I've a need to display popup windows in my application I've tried googling and can't find anything. Incidentally, has anyone tried overriding the Struts 2 error tags to display the messages in a popup window like the javascript alert() box. I particularly want to override the existing Struts 2 tags so when I finally convince the client that this is not a good idea, it will be straight forward to revert to standard Struts 2 behaviour. Regards Roger - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Action View wiring
On 16/05/07, Mansour [EMAIL PROTECTED] wrote: Mansour wrote: I found it. I'll post it just in case someone needs it. I used %{id} instead of ${id} and EL expression is evaluated immediately on the first load. I don't know why. I 'd love to hear explanation form someone. But it's working after all. Is there any clear documentation that will explain when you need to use '%', '$' or '#' in Struts2 .jsp pages as I'm finding it all very confusing. Regards Roger - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Displaytag
Dear Struts users, I've recently downloaded displaytag-1.1 and followed all the instructions on how to install it. It would have been too nice if it had worked immediately, but I get this annoying error message all the time. I ask you guys how to solve this, because I found no posts on this specific error. When I paste the taglib line (%@ taglib uri=http://displaytag.sf.net; prefix=display %) in my jsp, I get the following error message: The absolute uri: http://displaytag.sf.net cannot be resolved in either web.xml or the jar files deployed with this application. The documentation says that all I should do is to put the jars in my WEB-INF/lib and paste the %@ taglib uri. % line in the jsp. It doesn't say that I should make modification in my web.xml... Any ideas what to do now? Thanks a lot, BM We won't tell. Get more on shows you hate to love (and love to hate): Yahoo! TV's Guilty Pleasures list. http://tv.yahoo.com/collections/265
Re: Why I cannot use Interceptor to change the value of Action?
Thanks for your help, I got it. Dave Newton-4 wrote: --- kong xx [EMAIL PROTECTED] wrote: Why the interceptor cannot change the value after invode invocation.invoke() method? http://struts.apache.org/2.x/docs/writing-interceptors.html Note in particular the big yellow box section about when the invoke method returns! d. Give spam the boot. Take control with tough spam protection in the all-new Yahoo! Mail Beta. http://advision.webevents.yahoo.com/mailbeta/newmail_html.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Why-I-cannot-use-Interceptor-to-change-the-value-of-Action--tf3764097.html#a10643197 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: how I can I have validation skip for the first page load?
I'm having a similar issue with S2 as well. When using the validation xml it will work but when using annotations it does not. Any clues to this would be help full. Thanks Richard Jackson On 5/16/07, Daniel Henry [EMAIL PROTECTED] wrote: Dave Newton wrote: --- Daniel Henry [EMAIL PROTECTED] wrote: I would like to allow my forms to load once before being validated. That is the form should only be validated upon submission, not on load. The way that I'm accomplishing this right now is by creating a separate action to load the form, however this is starting to clutter up the struts.xml file as the number of forms on my site grows. Is there any other way? I'm assuming S2 since you say struts.xml. The input result (among a few others) are pre-configured to not be validated (see the validation interceptor docs). d. Looking for earth-friendly autos? Browse Top Cars by Green Rating at Yahoo! Autos' Green Center. http://autos.yahoo.com/green_center/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Thank you Dave. I am using s2. However, I'm not sure how to implement this solution. The validation interceptor runs before my Action, therefore I don't have a chance to return input. -Dan Henry - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Displaytag
2007/5/16, Balazs Michnay [EMAIL PROTECTED]: Any ideas what to do now? Asking the displaytag mailing list would be nice! :-P Antonio
RE Displaytag
Hi, With this declaration, your server has to have acces to the Internet, to download the tld and so one. If you don't have this acces, try to download the tld file, add it in your WEB-INF/tld folder, and add the mapping in your web.xml. Regards, Michaël Balazs Michnay [EMAIL PROTECTED] 16/05/2007 16:43 Veuillez répondre à Struts Users Mailing List user@struts.apache.org A user@struts.apache.org cc Objet Displaytag Dear Struts users, I've recently downloaded displaytag-1.1 and followed all the instructions on how to install it. It would have been too nice if it had worked immediately, but I get this annoying error message all the time. I ask you guys how to solve this, because I found no posts on this specific error. When I paste the taglib line (%@ taglib uri=http://displaytag.sf.net; prefix=display %) in my jsp, I get the following error message: The absolute uri: http://displaytag.sf.net cannot be resolved in either web.xml or the jar files deployed with this application. The documentation says that all I should do is to put the jars in my WEB-INF/lib and paste the %@ taglib uri. % line in the jsp. It doesn't say that I should make modification in my web.xml... Any ideas what to do now? Thanks a lot, BM We won't tell. Get more on shows you hate to love (and love to hate): Yahoo! TV's Guilty Pleasures list. http://tv.yahoo.com/collections/265
Re: forwarding to another action passing parameters
--- Gena Batsyan [EMAIL PROTECTED] wrote: This is a simple requirement, that is needed in almost any webapp I can imagine, and I absolutely believe something like this must be a core feature. I'm not entirely sure I complete understand what you're asking for. The *most* common solution for this is a post-redirect(-get) where the form is posted, processed, and you redirect to the list. Messages for that are generally stored in a flash-like context (session but with automagic removal after the next request completes). If your list action isn't ParameterAware it won't get any params anyway, I believe. (it kills the valuestack object in the request map as far as I have seen while debugging, which for some obscure reason prevents the final JSP to obtain any of the properties of ListAction) Some obscure reason? The value stack is where the properties of the list action are *kept*. Of course if you remove it the properties will be gone. If you want to forward, the best way to do it is with an action-chain. If you want to redirect then you need to have some way of storing the message, like you said. That's just the nature of HTTP, AFAICT. You can work *around* the limitations of HTTP with interceptors, parameter map tweaking, etc. but you can't *avoid* those limitations. Someone else might be more helpful, though. d. Pinpoint customers who are looking for what you sell. http://searchmarketing.yahoo.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: RE Displaytag
2007/5/16, [EMAIL PROTECTED] [EMAIL PROTECTED]: Hi, With this declaration, your server has to have acces to the Internet Wrong, as long as the TLD file is in the META-INF folder of DisplayTag package, the URI will point to the local TLD file.
[S2] menu
Hello, there is a way to have menu using tags in Struts2 or we must use external tags libraries? Thanks Stefano - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: s:select .../
--- [EMAIL PROTECTED] wrote: Can someone identify the attributes of this example code, preferably in the documentation itself? http://struts.apache.org/2.x/docs/select.html s:select label=Pets The label. name=petIds The action property. list=petDao.pets Where the list comes from (the list used to populate the options). listKey=id The value for option value=xxx listValue=name The text of the option option...XXX/option multiple=true Multiple select? size=3 How tall is it? required=true Is it a required form element? Is there an expectation that a getPetDao() exists somewhere? Yes. That's where the list comes from. Also, what is listKey/listValue See above. [...] it eludes me how development comes to a \ screeching halt when you need to drop one on a screen! That eludes me too. d. Park yourself in front of a world of choices in alternative vehicles. Visit the Yahoo! Auto Green Center. http://autos.yahoo.com/green_center/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to pass a javascript array to formbean array ?
Thank you for your help. It works fine for me! Thomas Ramapuram escribió: We do this quite often. We have a method which goes through the array and inserts the elements as new dom input objects of type hidden and name the name of the element in the form bean with an array index. eg. input type=hidden name=myelement[0].name value=Name / do this for all the properties for each element in your array and you will have them in your from bean. Frank W. Zammetti wrote: You seem to be mixing server-side and client-side concepts... if I understand you correctly, you have a Javascript array ON THE CLIENT that you want to populate in the form bean ON THE SERVER. If that's not correct, could you explain it further? If that is correct, you need to pass the array back to the server as part of your form submission (or AJAX request, if your going that route). Rememeber that at the point your JSP is evaluated, it's on the server, and Javascript has not executed yet. Seems like you might be making that mistake, although I'm not sure. Frank - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Action View wiring
--- Roger Varley [EMAIL PROTECTED] wrote: Is there any clear documentation that will explain when you need to use '%', '$' or '#' in Struts2 .jsp pages as I'm finding it all very confusing. I thought there was, but I can't access it at the moment. In a nutshell, if you use ${} you're using JSP EL. S2 wraps things up so if what you're trying to access isn't in scope it will get passed on to the OGNL value stack. %{} is OGNL EL and is often optional depending on what attribute you're using... this is the most confusing part AFAIC. # is used for accessing non-root OGNL objects, like an iterator-defined variable, etc. d. Now that's room service! Choose from over 150,000 hotels in 45,000 destinations on Yahoo! Travel to find your fit. http://farechase.yahoo.com/promo-generic-14795097 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: forwarding to another action passing parameters
Dave Newton wrote: --- Gena Batsyan [EMAIL PROTECTED] wrote: This is a simple requirement, that is needed in almost any webapp I can imagine, and I absolutely believe something like this must be a core feature. I'm not entirely sure I complete understand what you're asking for. The *most* common solution for this is a post-redirect(-get) where the form is posted, processed, and you redirect to the list. Messages for that are generally stored in a flash-like context (session but with automagic removal after the next request completes). that' Interesting. Where can I read about flash-like context you are talking about? If your list action isn't ParameterAware it won't get any params anyway, I believe. Sure, but what if I still want it to be able to get some parameters other than from redirect (I don't want to limit this action in any way) (it kills the valuestack object in the request map as far as I have seen while debugging, which for some obscure reason prevents the final JSP to obtain any of the properties of ListAction) Some obscure reason? The value stack is where the properties of the list action are *kept*. Of course if you remove it the properties will be gone. The funny thing is that cleaning request map in the first action totally breaks the second action. if you have a getter in the second action it simply returns nothing when accessed through OGNL from JSP. That's weird. If you want to forward, the best way to do it is with an action-chain. If you want to redirect then you need to have some way of storing the message, like you said. As I said, if using chain, the whole load of parameters is applied to the second action, which I want to avoid, I want it to get nothing except of what I'm explicitly define. That's just the nature of HTTP, AFAICT. You can work *around* the limitations of HTTP with interceptors, parameter map tweaking, etc. but you can't *avoid* those limitations. Someone else might be more helpful, though. d. Pinpoint customers who are looking for what you sell. http://searchmarketing.yahoo.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: s:select .../
Dave you are a funny guy! Let's try this again. On 5/16/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Can someone identify the attributes of this example code, preferably in the documentation itself? http://struts.apache.org/2.x/docs/select.html s:select name=petIds list=petDao.pets listKey=id listValue=name / 1. Where is the getPetDao() method expected to be coded? I'd like to set this data from my Tiles Controller. 2. Where do the properties listKey/listValue need to be coded and what is the effect of this when list is an Iterable Map? -- Scott [EMAIL PROTECTED]
nightly build dist location empty
I'm interested in some of the bug fixes going into 2.1.x (particularly around conversion errors w/ the datetimepicker tag). http://struts.apache.org/dev/builds.html says there's a nightly build of the development tree, but when I looked on http://people.apache.org/builds/struts/nightlies/ all I found were empty folders. Is this a temporary outage or should I just plan on building the S2 trunk from scratch myself? Thanks, Jon
Re: s:select .../
--- [EMAIL PROTECTED] wrote: 1. Where is the getPetDao() method expected to be coded? I'd like to set this data from my Tiles Controller. It can be coded anywhere, but like most of the other tags, is expected to be accessible via the OGNL stack. 2. Where do the properties listKey/listValue need to be coded and what is the effect of this when list is an Iterable Map? Those are properties of whatever object the list is of. I don't have my code in front of me and I don't recall what happens when the s:select.../ is being populated from a map, sorry :/ IIRC if it's a simple map the value will be the key and the text will be the toString of the value, but... IRRC (I Rarely Remember Correctly). The following may be wrong, but it tripped me up for about 15 minutes, and this was how I solved it: One thing of note regarding s:select.../ is that the value attribute apparently needs to be a map with a *string* key. So even if the list/set you're populating the list from has a java.lang.Long id (like all my Hibernate POJOs do) the *value* attribute must be a map in order for list pre-selection to work. *If* this is true, it is unfortunate, as it adds a step between simply getting the appropriate sets and values and just throwing them at s:select.../ but I suppose it makes sense from a practicality standpoint. d. Be a PS3 game guru. Get your game face on with the latest PS3 news and previews at Yahoo! Games. http://videogames.yahoo.com/platform?platform=120121 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Fwd: Best method for dynamic fields round trip]
Any takers?, even saying Nope, not possible in a nice way would be useful. ---BeginMessage--- I've got an application which has a dynamic number of customisable fields attached to each record. The customisable fields have a display name, an internal name, and a value. Some records have no fields and there is no way of determining at compile time the maximum number of fields a record can have. So my questions are; 1) What's the best way to get the dynamic fields to a JSP so the user can edit them? 2) What's the best way to get the modified data back into an action so the action can update the data? I'm ideally hunting for a non-AJAX based solution because this app may be used on PDAs which don't support JavaScript. ---End Message--- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: forwarding to another action passing parameters
--- Gena Batsyan [EMAIL PROTECTED] wrote: Dave Newton wrote: --- Gena Batsyan [EMAIL PROTECTED] wrote: Messages for that are generally stored in a flash-like context (session but with automagic removal after the next request completes). that' Interesting. Where can I read about flash-like context you are talking about? Um... I'm not sure. I would have sworn I remember somebody talking about it on this list within the last week or so, but wouldn't swear by it; maybe somebody was talking about a flash-scope interceptor? In any case, the concept is simple: something gets put into flash-scope (which is just a chunk of data in the session) for the *next* request only, then is automatically removed. It should be a pretty simple interceptor, and it's a very useful beast, since it can hold *anything*, not just simple strings. If your list action isn't ParameterAware it won't get any params anyway, I believe. Sure, but what if I still want it to be able to get some parameters other than from redirect That would be a problem. As I said, if using chain, the whole load of parameters is applied to the second action, which I want to avoid, I want it to get nothing except of what I'm explicitly define. Someone else may have a better idea, but I think this is just the nature of the way HTTP works: you can forward or redirect; forward means you get the same request, redirect means you get a new one. So you'd either need to strip, or re-create, the request parameters you're interested in. You might be able to put objects on the OGNL stack via ActionContext before a chained action and get at them that way, perhaps. d. Looking for a deal? Find great prices on flights and hotels with Yahoo! FareChase. http://farechase.yahoo.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Fwd: Best method for dynamic fields round trip]
S2? Build an array or map of the form fields and provide an appropriate setter in the action. Probably easiest to build the form tags by hand (i.e., non s:xxx.../ tags). So you'd iterate over the dynamic fields, create the tags. On submit you'd end up with a list (or map, or whatever) of the values. Did that help? d. --- Al Sutton [EMAIL PROTECTED] wrote: Any takers?, even saying Nope, not possible in a nice way would be useful. From: Al Sutton [EMAIL PROTECTED] To: 'Struts Users Mailing List' user@struts.apache.org Subject: Best method for dynamic fields round trip Date: Tue, 15 May 2007 15:59:02 +0100 I've got an application which has a dynamic number of customisable fields attached to each record. The customisable fields have a display name, an internal name, and a value. Some records have no fields and there is no way of determining at compile time the maximum number of fields a record can have. So my questions are; 1) What's the best way to get the dynamic fields to a JSP so the user can edit them? 2) What's the best way to get the modified data back into an action so the action can update the data? I'm ideally hunting for a non-AJAX based solution because this app may be used on PDAs which don't support JavaScript. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Yahoo! oneSearch: Finally, mobile search that gives answers, not web links. http://mobile.yahoo.com/mobileweb/onesearch?refer=1ONXIC - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[S2] Action returns blank page
I'm trying to split my Struts 2 app up a bit using namespaces, but have run into a bit of trouble I have an action mapping that works fine without a namespace, but when I move that same action to another package with a namespace, the action returns a blank page. I'm not seeing any errors in the app server logs, just the blank page. Beyond setting the namespace attribute on the package, is there anything I need to be doing? Thanks in advance for the help. Matt -- View this message in context: http://www.nabble.com/-S2--Action-returns-blank-page-tf3765523.html#a10644874 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: Displaytag
Displaytag works fine for me in struts1.3 just doing the things below. Perhaps you need to re-deploy your webapp or re-start tomcat. mas Balazs Michnay wrote: Dear Struts users, I've recently downloaded displaytag-1.1 and followed all the instructions on how to install it. It would have been too nice if it had worked immediately, but I get this annoying error message all the time. I ask you guys how to solve this, because I found no posts on this specific error. When I paste the taglib line (%@ taglib uri=http://displaytag.sf.net; prefix=display %) in my jsp, I get the following error message: The absolute uri: http://displaytag.sf.net cannot be resolved in either web.xml or the jar files deployed with this application. The documentation says that all I should do is to put the jars in my WEB-INF/lib and paste the %@ taglib uri. % line in the jsp. It doesn't say that I should make modification in my web.xml... Any ideas what to do now? Thanks a lot, BM We won't tell. Get more on shows you hate to love (and love to hate): Yahoo! TV's Guilty Pleasures list. http://tv.yahoo.com/collections/265 -- 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]
Unexpected Exception catched: Error setting expression
Hello, I use struts 2.0.6. Below is a record from the log file when I call a page with parameter ac=XXX [#|2007-05-15 16:10:30,860|ERROR|com.opensymphony.xwork2.interceptor.ParametersInterceptor|setParameters:198|ParametersInterceptor - [setParameters]: Unexpected Exception catched: Error setting expression 'ac' with value '[Ljava.lang.String;@777031'|#] Also, I expect to see that ac parameter was properly set up with this value, the action class has variable private String ac; and public setter and getter are provided. This is not an issue in Windows environment (Sun App Server 8.2). Any ideas? Thanks for your help. -- View this message in context: http://www.nabble.com/Unexpected-Exception-catched%3A-Error-setting-expression-tf3765627.html#a10645209 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: [S2] Action returns blank page
I use a name space as well and it works just fine. Here is the snippet: struts package name=default namespace = /mynamespace extends=struts-default action name=myIndex class=myAction method=myIndex result name=success/index.jsp/result etc. When I call the action: localhost:8080/projectname/mynamespace/myIndex.action mhargus wrote: I'm trying to split my Struts 2 app up a bit using namespaces, but have run into a bit of trouble I have an action mapping that works fine without a namespace, but when I move that same action to another package with a namespace, the action returns a blank page. I'm not seeing any errors in the app server logs, just the blank page. Beyond setting the namespace attribute on the package, is there anything I need to be doing? Thanks in advance for the help. Matt -- View this message in context: http://www.nabble.com/-S2--Action-returns-blank-page-tf3765523.html#a10645353 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: Interceptor execution
I'm just mix-and-matching - not using S1 plugin. But the S2 Filter, mapped to /* ought to catch all requests, because filters execute before servlets. Therefore I wonder why the LoginInterceptor doesn't get executed on S1-generated requests (ie. those with a *.do url, or even with a *.jsp url). Perhaps the S2 Filter says If the Request isn't mapped to *.action, I won't process it at all. Does the S2 Filter really behave this way? If that is how the filter behaves, is this configurable? Is there a recommended way around it? (In S1 I subclassed the RequestProcessor, I'd rather not subclass the Filter) My own feeling is that I can write a filter which redirects all requests without a login credential to login.action, to force it thru the S2 processor, and so thru the LoginInterceptor, but then I'd be using a Filter *AND* an Interceptor to accomplish the login. Perhaps I'll get rid of the Interceptor and just do it with a Filter, but there are advantages to the Interceptor which would be lost that way. (by the way, Laurie, These are not the Droids you're looking for!) - Ray C. Laurie Harper wrote: Ray Clough wrote: I've got a large S1 app into which I'm putting S2 features - starting with a How? Are you using S2 with the S1 plugin? Or just putting both versions into one WAR and mix'n'matching? LoginInterceptor, because the S1 security-implementation was NG. The S2 NG? No Good? Next Generation? Nearly Ganked? ;-) mapping in web.xml is to the url /*, which I figured would catch all requests, both from S1 actions and from S2 actions. The S1 Action servlet There is no 'from', only 'too'. Too or too not. There is not from. Oops, have I been watching too much Star Wars? The point is, it doesn't matter where a request comes from; once it comes in, it's just a request. What happens next is based on the form of the request; in this case, specifically, the URL that's requested. is mapped to *.do. It appears that the S1 actions aren't intercepted, making the LoginInterceptor not work for them. How is *.do bypassing /*. Given the request URL http://host:port/x/y/z.do, which pattern matches: /* or *.do? Obviously both patterns match. I'm not sure if the behaviour in this case is specified or not, but if it is then the order of the mappings is likely what determines which wins. Is this really the case, or can something be done to force S1 actions thru the S2 interceptor. Err... not sure I understand the question. You can't have an S2 interceptor applied to a request that's being handled by S1, since S1 doesn't know about interceptors. I think you'd need to post a more concrete example of the sort of process flow you're trying to achieve and the configuration(s) you're trying to get there. L. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Interceptor-execution-tf3762074.html#a10645544 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[S2] UTF8 with ajax results
Which Ajax Framework is in use ? If it´s an JSON-Respone-Object: see RFC 4627 for details. http://www.ietf.org/rfc/rfc4627.txt?number=4627 regards, toepper - Jetzt Mails schnell in einem Vorschaufenster überfliegen. Dies und viel mehr bietet das neue Yahoo! Mail .
RE: [Fwd: Best method for dynamic fields round trip]
That's just what I was looking for, thanks Dave. I was looking for a way to do it with s:xxx/ tags, so I'm now more confident it's best done without them as opposed to thinking I might have missed something. Thanks again, Al. -Original Message- From: Dave Newton [mailto:[EMAIL PROTECTED] Sent: 16 May 2007 17:02 To: Struts Users Mailing List Subject: Re: [Fwd: Best method for dynamic fields round trip] S2? Build an array or map of the form fields and provide an appropriate setter in the action. Probably easiest to build the form tags by hand (i.e., non s:xxx.../ tags). So you'd iterate over the dynamic fields, create the tags. On submit you'd end up with a list (or map, or whatever) of the values. Did that help? d. --- Al Sutton [EMAIL PROTECTED] wrote: Any takers?, even saying Nope, not possible in a nice way would be useful. From: Al Sutton [EMAIL PROTECTED] To: 'Struts Users Mailing List' user@struts.apache.org Subject: Best method for dynamic fields round trip Date: Tue, 15 May 2007 15:59:02 +0100 I've got an application which has a dynamic number of customisable fields attached to each record. The customisable fields have a display name, an internal name, and a value. Some records have no fields and there is no way of determining at compile time the maximum number of fields a record can have. So my questions are; 1) What's the best way to get the dynamic fields to a JSP so the user can edit them? 2) What's the best way to get the modified data back into an action so the action can update the data? I'm ideally hunting for a non-AJAX based solution because this app may be used on PDAs which don't support JavaScript. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Yahoo! oneSearch: Finally, mobile search that gives answers, not web links. http://mobile.yahoo.com/mobileweb/onesearch?refer=1ONXIC - 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: [s2] Can someone with permissions update the wiki
Reported with Key WW-1928 and assigned to you. -Original Message- From: news [mailto:[EMAIL PROTECTED] On Behalf Of Laurie Harper Sent: 15 May 2007 22:02 To: user@struts.apache.org Subject: Re: [s2] Can someone with permissions update the wiki Hmm, the struts.apache.org/2.x/docs site is a static export of the cwiki, so I wouldn't expect the link there to be pointing to the wiki at all. I do see the same thing when I follow the steps you outlined, though, so there's definitely something awry. Could you file this as an issue in Jira, including the steps to reproduce? Hopefully someone who knows more about how the cwiki gets mirrored to the static site will know how to fix the problem. L. Al Sutton wrote: Hmm... Follow this path; 1) Log out of Confluence 2) Go to http://struts.apache.org/2.x/docs/tag-reference.html 3) Click Guides from the breadcrumbs at the top of the page 4) Click struts.xml under Configuration Files 5) Click the struts.xml Examples link near the bottom of the page. 6) Click the Configuration Elements link I get a Confluence login page every time. -Original Message- From: news [mailto:[EMAIL PROTECTED] On Behalf Of Laurie Harper Sent: 15 May 2007 09:34 To: user@struts.apache.org Subject: Re: [s2] Can someone with permissions update the wiki Just checked it, and it works for me as-is. L. Al Sutton wrote: Can someone with the correct permissions change the link on http://cwiki.apache.org/confluence/display/WW/struts.xml+Examples which is labelled http://cwiki.apache.org/confluence/display/WW/Configuration+Elements Configuration Elements to point to http://struts.apache.org/2.x/docs/configuration-elements.html At the moment it breaks (for me at least) Thanks, Al. - 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: forwarding to another action passing parameters
Gena Batsyan wrote: As I said, if using chain, the whole load of parameters is applied to the second action, which I want to avoid, I want it to get nothing except of what I'm explicitly define. It sounds like you're trying to use the wrong tools. You're looking for a way to trigger the creation of an object, but you don't want to let the browser know that an action that does this exists, and you don't want to allow any other than a specific few parameters to get to that action. Then why does it need to be a (web layer) struts action? Sounds like it should be a method call in a manager class. The action from which you're trying to chain should really just be collecting all the bits you approve of and making a method call. -Dale - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [S2] Action returns blank page
Looks like what I've got. My thought is that this is related to other parts of the application, like Sitemesh or Acegi (security). I'll try eliminating those as variables and post my findings. Thanks for the info. Matt sr wrote: I use a name space as well and it works just fine. Here is the snippet: struts package name=default namespace = /mynamespace extends=struts-default action name=myIndex class=myAction method=myIndex result name=success/index.jsp/result etc. When I call the action: localhost:8080/projectname/mynamespace/myIndex.action mhargus wrote: I'm trying to split my Struts 2 app up a bit using namespaces, but have run into a bit of trouble I have an action mapping that works fine without a namespace, but when I move that same action to another package with a namespace, the action returns a blank page. I'm not seeing any errors in the app server logs, just the blank page. Beyond setting the namespace attribute on the package, is there anything I need to be doing? Thanks in advance for the help. Matt -- View this message in context: http://www.nabble.com/-S2--Action-returns-blank-page-tf3765523.html#a10646399 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: [Fwd: Best method for dynamic fields round trip]
The main part I'm having trouble with is keeping the association between the editable field name and the editable value, so if we start with Phone1 : 555-12345 And the user changes the field name and value to be Fax : 555-12346 Getting the action to recognise that it should update the both values. This is part of porting an app to s2, and currently it's don using two input fields which include an id, so it's basically input type=text name=fieldname_%=fieldId% value=phone1 input type=text name=fieldvalue_%=fieldId% value=555-12345 Currently the servlet taking the input goes through the servlet request parameter map and when it finds a request parameter that starts with fieldname_ it gets the corresponding fieldvalue_ entry and updates the field record with the id. If there is a nice way I'd appreciate a pointer because at the moment it looks like we're going to have to use the same method of going through the parameter map which feels like it's a bit of a hack and makes unit testing a bit more tricky. Al. -Original Message- From: Dave Newton [mailto:[EMAIL PROTECTED] Sent: 16 May 2007 18:19 To: Struts Users Mailing List Subject: RE: [Fwd: Best method for dynamic fields round trip] --- Al Sutton [EMAIL PROTECTED] wrote: That's just what I was looking for, thanks Dave. I was looking for a way to do it with s:xxx/ tags, so I'm now more confident it's best done without them as opposed to thinking I might have missed something. Well, I'm just one opinion :) It could still be done with the S2 tags if, say, you had a map of dynamic parameter names (or ids, etc.) and iterate over the map etc. It may depend more on how the dynamic parameters are defined or declared, etc. I think either way is acceptable, though (the map idea might be easier in some ways)... it just depends. d. You snooze, you lose. Get messages ASAP with AutoCheck in the all-new Yahoo! Mail Beta. http://advision.webevents.yahoo.com/mailbeta/newmail_html.html - 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: [Fwd: Best method for dynamic fields round trip]
Just off of the top of my head I would probably use a collection or map of name/values... so the tag might look something like: s:textfield name=pairs[fieldId].fieldName/ s:textfield name=pairs[fieldId].fieldValue/ etc. (with minor syntax changes depending on how things are shuffled to the JSP). d. --- Al Sutton [EMAIL PROTECTED] wrote: The main part I'm having trouble with is keeping the association between the editable field name and the editable value, so if we start with Phone1 : 555-12345 And the user changes the field name and value to be Fax : 555-12346 Getting the action to recognise that it should update the both values. This is part of porting an app to s2, and currently it's don using two input fields which include an id, so it's basically input type=text name=fieldname_%=fieldId% value=phone1 input type=text name=fieldvalue_%=fieldId% value=555-12345 Currently the servlet taking the input goes through the servlet request parameter map and when it finds a request parameter that starts with fieldname_ it gets the corresponding fieldvalue_ entry and updates the field record with the id. If there is a nice way I'd appreciate a pointer because at the moment it looks like we're going to have to use the same method of going through the parameter map which feels like it's a bit of a hack and makes unit testing a bit more tricky. Al. -Original Message- From: Dave Newton [mailto:[EMAIL PROTECTED] Sent: 16 May 2007 18:19 To: Struts Users Mailing List Subject: RE: [Fwd: Best method for dynamic fields round trip] --- Al Sutton [EMAIL PROTECTED] wrote: That's just what I was looking for, thanks Dave. I was looking for a way to do it with s:xxx/ tags, so I'm now more confident it's best done without them as opposed to thinking I might have missed something. Well, I'm just one opinion :) It could still be done with the S2 tags if, say, you had a map of dynamic parameter names (or ids, etc.) and iterate over the map etc. It may depend more on how the dynamic parameters are defined or declared, etc. I think either way is acceptable, though (the map idea might be easier in some ways)... it just depends. d. You snooze, you lose. Get messages ASAP with AutoCheck in the all-new Yahoo! Mail Beta. http://advision.webevents.yahoo.com/mailbeta/newmail_html.html - 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] Sick sense of humor? Visit Yahoo! TV's Comedy with an Edge to see what's on, when. http://tv.yahoo.com/collections/222 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [Fwd: Best method for dynamic fields round trip]
A... (lightbulb moment). I thought you could only use array indexes in the value attribute of s: tags. So if I have a composite object which had fieldName and fieldValue I could put; CompositeObject[] getPairs() in the action which uses the JSP to display the data and setPairs(CompositeObject[] pairs) in the action which updates the database. This is great, the only other thing is I've now got to put a mapping in place because the original IDs are generated by Hibernate and will probably be non-sequential and almost definatley non-zero based, but that's a non S2 story. Many Many Many thanks. Al. -Original Message- From: Dave Newton [mailto:[EMAIL PROTECTED] Sent: 16 May 2007 18:37 To: Struts Users Mailing List Subject: RE: [Fwd: Best method for dynamic fields round trip] Just off of the top of my head I would probably use a collection or map of name/values... so the tag might look something like: s:textfield name=pairs[fieldId].fieldName/ s:textfield name=pairs[fieldId].fieldValue/ etc. (with minor syntax changes depending on how things are shuffled to the JSP). d. --- Al Sutton [EMAIL PROTECTED] wrote: The main part I'm having trouble with is keeping the association between the editable field name and the editable value, so if we start with Phone1 : 555-12345 And the user changes the field name and value to be Fax : 555-12346 Getting the action to recognise that it should update the both values. This is part of porting an app to s2, and currently it's don using two input fields which include an id, so it's basically input type=text name=fieldname_%=fieldId% value=phone1 input type=text name=fieldvalue_%=fieldId% value=555-12345 Currently the servlet taking the input goes through the servlet request parameter map and when it finds a request parameter that starts with fieldname_ it gets the corresponding fieldvalue_ entry and updates the field record with the id. If there is a nice way I'd appreciate a pointer because at the moment it looks like we're going to have to use the same method of going through the parameter map which feels like it's a bit of a hack and makes unit testing a bit more tricky. Al. -Original Message- From: Dave Newton [mailto:[EMAIL PROTECTED] Sent: 16 May 2007 18:19 To: Struts Users Mailing List Subject: RE: [Fwd: Best method for dynamic fields round trip] --- Al Sutton [EMAIL PROTECTED] wrote: That's just what I was looking for, thanks Dave. I was looking for a way to do it with s:xxx/ tags, so I'm now more confident it's best done without them as opposed to thinking I might have missed something. Well, I'm just one opinion :) It could still be done with the S2 tags if, say, you had a map of dynamic parameter names (or ids, etc.) and iterate over the map etc. It may depend more on how the dynamic parameters are defined or declared, etc. I think either way is acceptable, though (the map idea might be easier in some ways)... it just depends. d. You snooze, you lose. Get messages ASAP with AutoCheck in the all-new Yahoo! Mail Beta. http://advision.webevents.yahoo.com/mailbeta/newmail_html.html - 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] Sick sense of humor? Visit Yahoo! TV's Comedy with an Edge to see what's on, when. http://tv.yahoo.com/collections/222 - 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: [S2] Action returns blank page
Ah, yes. Looks like another case of user error. My pages are located underneath the WEB-INF folder of the web app, which I mapped like so: result name=inputWEB-INF/pages/clientSearch.jsp/result This worked fine, until I added the namespace to the package, which resulted in URLs like this: /packagename/WEB-INF/pages/clientSearch.jsp All you Struts-savvy developers out there have already noticed the missing / before WEB-INF. Kudos to you, and may your lives be full of rainbows and sunshine. After properly placing the / in the result path, everything works as expected. Matt mhargus wrote: I'm trying to split my Struts 2 app up a bit using namespaces, but have run into a bit of trouble I have an action mapping that works fine without a namespace, but when I move that same action to another package with a namespace, the action returns a blank page. I'm not seeing any errors in the app server logs, just the blank page. Beyond setting the namespace attribute on the package, is there anything I need to be doing? Thanks in advance for the help. Matt -- View this message in context: http://www.nabble.com/-S2--Action-returns-blank-page-tf3765523.html#a10651130 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: forwarding to another action passing parameters
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Dave, Dave Newton wrote: Someone else may have a better idea, but I think this is just the nature of the way HTTP works: you can forward or redirect; forward means you get the same request, redirect means you get a new one. I'm not entirely sure this is true, at least not through Struts. For instance, I have actions that forward to other actions and add request parameters along the way. I do this by returning an ActionForward from the first action which contains GET-style parameters added to the path. One way or another, the request as viewed by the second action (via forward, not redirect) gets those newly-added parameters. Perhaps the original request is wrapped in something that makes it look like additional parameters have been added, so you get a sort-of aggregate request. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGS0i+9CaO5/Lv0PARAntEAKCRkdx/J/XlhkhWuhTeaSruX+lMHwCeJx6d y+HCxEFxJ7NolfR+7kCb24s= =5MTJ -END PGP SIGNATURE- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: s:select .../
Thanks d! It appears that if neither you nor I can easily drop a s:select / on a page and wire it up without fuss-n-muss, perhaps it is causing others grief too. I just think something this typical should be simple to code. Scott On 5/16/07, Dave Newton [EMAIL PROTECTED] wrote: --- [EMAIL PROTECTED] wrote: 1. Where is the getPetDao() method expected to be coded? I'd like to set this data from my Tiles Controller. It can be coded anywhere, but like most of the other tags, is expected to be accessible via the OGNL stack. 2. Where do the properties listKey/listValue need to be coded and what is the effect of this when list is an Iterable Map? Those are properties of whatever object the list is of. I don't have my code in front of me and I don't recall what happens when the s:select.../ is being populated from a map, sorry :/ IIRC if it's a simple map the value will be the key and the text will be the toString of the value, but... IRRC (I Rarely Remember Correctly). The following may be wrong, but it tripped me up for about 15 minutes, and this was how I solved it: One thing of note regarding s:select.../ is that the value attribute apparently needs to be a map with a *string* key. So even if the list/set you're populating the list from has a java.lang.Long id (like all my Hibernate POJOs do) the *value* attribute must be a map in order for list pre-selection to work. *If* this is true, it is unfortunate, as it adds a step between simply getting the appropriate sets and values and just throwing them at s:select.../ but I suppose it makes sense from a practicality standpoint. d. Be a PS3 game guru. Get your game face on with the latest PS3 news and previews at Yahoo! Games. http://videogames.yahoo.com/platform?platform=120121 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Scott [EMAIL PROTECTED]
Re: how I can I have validation skip for the first page load?
Daniel Henry wrote: Dave Newton wrote: --- Daniel Henry [EMAIL PROTECTED] wrote: I would like to allow my forms to load once before being validated. That is the form should only be validated upon submission, not on load. The way that I'm accomplishing this right now is by creating a separate action to load the form, however this is starting to clutter up the struts.xml file as the number of forms on my site grows. Is there any other way? I'm assuming S2 since you say struts.xml. The input result (among a few others) are pre-configured to not be validated (see the validation interceptor docs). Thank you Dave. I am using s2. However, I'm not sure how to implement this solution. The validation interceptor runs before my Action, therefore I don't have a chance to return input. -Dan Henry The validation interceptor fires based on what you request, not based on what you return. The technique Dave's referring to is to create an action mapping with method='input' and a corresponding input() method in the action. You then load your form with a URL of the form ...action!input.action. The interceptor knows not to validate a request that's routed to the 'input' method, so your form loads without validation. You then submit it to the action's normal execute() method (or some other method besides input) and validation occurs. HTH, L. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: forwarding to another action passing parameters
--- Christopher Schultz wrote: Dave Newton wrote: Someone else may have a better idea, but I think this is just the nature of the way HTTP works: you can forward or redirect; forward means you get the same request, redirect means you get a new one. I'm not entirely sure this is true, at least not through Struts. For instance, I have actions that forward to other actions and add request parameters along the way. I do this by returning an ActionForward from the first action which contains GET-style parameters added to the path. One way or another, the request as viewed by the second action (via forward, not redirect) gets those newly-added parameters. Sure, you can *modify* the request, but AFAIK it's still the same request (at least from a logical standpoint) as opposed to a redirect which is an entirely new one. d. Park yourself in front of a world of choices in alternative vehicles. Visit the Yahoo! Auto Green Center. http://autos.yahoo.com/green_center/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: how I can I have validation skip for the first page load?
Sounds like an unrelated issue to me. There's not enough information here to tell what the problem is. For example, what annotations did you configure? How did it not work? What did you do that did work? What does your configuration and action code look like? Start a new thread with a complete description of the problem and hopefully someone will be able to see where the issue is. L. richard jackson wrote: I'm having a similar issue with S2 as well. When using the validation xml it will work but when using annotations it does not. Any clues to this would be help full. Thanks Richard Jackson On 5/16/07, Daniel Henry [EMAIL PROTECTED] wrote: Dave Newton wrote: --- Daniel Henry [EMAIL PROTECTED] wrote: I would like to allow my forms to load once before being validated. That is the form should only be validated upon submission, not on load. The way that I'm accomplishing this right now is by creating a separate action to load the form, however this is starting to clutter up the struts.xml file as the number of forms on my site grows. Is there any other way? I'm assuming S2 since you say struts.xml. The input result (among a few others) are pre-configured to not be validated (see the validation interceptor docs). d. Looking for earth-friendly autos? Browse Top Cars by Green Rating at Yahoo! Autos' Green Center. http://autos.yahoo.com/green_center/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Thank you Dave. I am using s2. However, I'm not sure how to implement this solution. The validation interceptor runs before my Action, therefore I don't have a chance to return input. -Dan Henry - 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:select .../
But it is simple :-) The note in the docs about 'If the list is a Map...' is just telling you that the tag will automatically use the map key/value pairs to fill the option tags -- i.e. that these are (roughly) equivalent: s:select list=someMap.entrySet() listKey=key listValue=value ... s:select list=someMap ... If 'list' points to a collection that is not a Map, then you need to specify listKey and listValue to tell the tag what properties of the instance objects in the list should be placed into the options. L. [EMAIL PROTECTED] wrote: Thanks d! It appears that if neither you nor I can easily drop a s:select / on a page and wire it up without fuss-n-muss, perhaps it is causing others grief too. I just think something this typical should be simple to code. Scott On 5/16/07, Dave Newton [EMAIL PROTECTED] wrote: --- [EMAIL PROTECTED] wrote: 1. Where is the getPetDao() method expected to be coded? I'd like to set this data from my Tiles Controller. It can be coded anywhere, but like most of the other tags, is expected to be accessible via the OGNL stack. 2. Where do the properties listKey/listValue need to be coded and what is the effect of this when list is an Iterable Map? Those are properties of whatever object the list is of. I don't have my code in front of me and I don't recall what happens when the s:select.../ is being populated from a map, sorry :/ IIRC if it's a simple map the value will be the key and the text will be the toString of the value, but... IRRC (I Rarely Remember Correctly). The following may be wrong, but it tripped me up for about 15 minutes, and this was how I solved it: One thing of note regarding s:select.../ is that the value attribute apparently needs to be a map with a *string* key. So even if the list/set you're populating the list from has a java.lang.Long id (like all my Hibernate POJOs do) the *value* attribute must be a map in order for list pre-selection to work. *If* this is true, it is unfortunate, as it adds a step between simply getting the appropriate sets and values and just throwing them at s:select.../ but I suppose it makes sense from a practicality standpoint. d. Be a PS3 game guru. Get your game face on with the latest PS3 news and previews at Yahoo! Games. http://videogames.yahoo.com/platform?platform=120121 - 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]
datagrid doubt
Hi , i wish to implement datagrid in struts ...query's, validations, type of boxes and other things will be in XML file ...I have to parse it and know the query and depending on the query i have to get the fields. I have to give an edit option for the fields. At present what I am doing is I am putting all the values in the arraylist and keeping that arraylist in Map this map I am keeping in session and changing the values in session after user edits and after he clicks save I am commiting to database. I feel the implementation is not generic. Can you please give me a better way to implement datagrid. I am not using struts layout. Struts 1.3.8 is the version. thanks and regards Viplav Kallepu
Re: [Fwd: Best method for dynamic fields round trip]
Just as a little added pointer, instead of CompositeObject[] getPairs() you could make that MapString,CompositeObject getPairs(), where the map key would be the field ID. That would handle non-zero-based, non-sequential field IDs cleanly. There are some caveats if you would need the map key to be non-String valued but we can talk about that if it becomes an issue ;-) L. Al Sutton wrote: A... (lightbulb moment). I thought you could only use array indexes in the value attribute of s: tags. So if I have a composite object which had fieldName and fieldValue I could put; CompositeObject[] getPairs() in the action which uses the JSP to display the data and setPairs(CompositeObject[] pairs) in the action which updates the database. This is great, the only other thing is I've now got to put a mapping in place because the original IDs are generated by Hibernate and will probably be non-sequential and almost definatley non-zero based, but that's a non S2 story. Many Many Many thanks. Al. -Original Message- From: Dave Newton [mailto:[EMAIL PROTECTED] Sent: 16 May 2007 18:37 To: Struts Users Mailing List Subject: RE: [Fwd: Best method for dynamic fields round trip] Just off of the top of my head I would probably use a collection or map of name/values... so the tag might look something like: s:textfield name=pairs[fieldId].fieldName/ s:textfield name=pairs[fieldId].fieldValue/ etc. (with minor syntax changes depending on how things are shuffled to the JSP). d. --- Al Sutton [EMAIL PROTECTED] wrote: The main part I'm having trouble with is keeping the association between the editable field name and the editable value, so if we start with Phone1 : 555-12345 And the user changes the field name and value to be Fax : 555-12346 Getting the action to recognise that it should update the both values. This is part of porting an app to s2, and currently it's don using two input fields which include an id, so it's basically input type=text name=fieldname_%=fieldId% value=phone1 input type=text name=fieldvalue_%=fieldId% value=555-12345 Currently the servlet taking the input goes through the servlet request parameter map and when it finds a request parameter that starts with fieldname_ it gets the corresponding fieldvalue_ entry and updates the field record with the id. If there is a nice way I'd appreciate a pointer because at the moment it looks like we're going to have to use the same method of going through the parameter map which feels like it's a bit of a hack and makes unit testing a bit more tricky. Al. -Original Message- From: Dave Newton [mailto:[EMAIL PROTECTED] Sent: 16 May 2007 18:19 To: Struts Users Mailing List Subject: RE: [Fwd: Best method for dynamic fields round trip] --- Al Sutton [EMAIL PROTECTED] wrote: That's just what I was looking for, thanks Dave. I was looking for a way to do it with s:xxx/ tags, so I'm now more confident it's best done without them as opposed to thinking I might have missed something. Well, I'm just one opinion :) It could still be done with the S2 tags if, say, you had a map of dynamic parameter names (or ids, etc.) and iterate over the map etc. It may depend more on how the dynamic parameters are defined or declared, etc. I think either way is acceptable, though (the map idea might be easier in some ways)... it just depends. d. You snooze, you lose. Get messages ASAP with AutoCheck in the all-new Yahoo! Mail Beta. http://advision.webevents.yahoo.com/mailbeta/newmail_html.html - 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] Sick sense of humor? Visit Yahoo! TV's Comedy with an Edge to see what's on, when. http://tv.yahoo.com/collections/222 - 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: [Fwd: Best method for dynamic fields round trip]
--- Laurie Harper [EMAIL PROTECTED] wrote: Just as a little added pointer, instead of CompositeObject[] getPairs() you could make that MapString,CompositeObject getPairs(), where the map key would be the field ID. That would handle non-zero-based, non-sequential field IDs cleanly. Sorry, that's what I was attempting to get at, but I'm having spurts of business today and I flailed a bit :/ d. Al Sutton wrote: A... (lightbulb moment). I thought you could only use array indexes in the value attribute of s: tags. So if I have a composite object which had fieldName and fieldValue I could put; CompositeObject[] getPairs() in the action which uses the JSP to display the data and setPairs(CompositeObject[] pairs) in the action which updates the database. This is great, the only other thing is I've now got to put a mapping in place because the original IDs are generated by Hibernate and will probably be non-sequential and almost definatley non-zero based, but that's a non S2 story. Many Many Many thanks. Al. -Original Message- From: Dave Newton [mailto:[EMAIL PROTECTED] Sent: 16 May 2007 18:37 To: Struts Users Mailing List Subject: RE: [Fwd: Best method for dynamic fields round trip] Just off of the top of my head I would probably use a collection or map of name/values... so the tag might look something like: s:textfield name=pairs[fieldId].fieldName/ s:textfield name=pairs[fieldId].fieldValue/ etc. (with minor syntax changes depending on how things are shuffled to the JSP). d. --- Al Sutton [EMAIL PROTECTED] wrote: The main part I'm having trouble with is keeping the association between the editable field name and the editable value, so if we start with Phone1 : 555-12345 And the user changes the field name and value to be Fax : 555-12346 Getting the action to recognise that it should update the both values. This is part of porting an app to s2, and currently it's don using two input fields which include an id, so it's basically input type=text name=fieldname_%=fieldId% value=phone1 input type=text name=fieldvalue_%=fieldId% value=555-12345 Currently the servlet taking the input goes through the servlet request parameter map and when it finds a request parameter that starts with fieldname_ it gets the corresponding fieldvalue_ entry and updates the field record with the id. If there is a nice way I'd appreciate a pointer because at the moment it looks like we're going to have to use the same method of going through the parameter map which feels like it's a bit of a hack and makes unit testing a bit more tricky. Al. -Original Message- From: Dave Newton [mailto:[EMAIL PROTECTED] Sent: 16 May 2007 18:19 To: Struts Users Mailing List Subject: RE: [Fwd: Best method for dynamic fields round trip] --- Al Sutton [EMAIL PROTECTED] wrote: That's just what I was looking for, thanks Dave. I was looking for a way to do it with s:xxx/ tags, so I'm now more confident it's best done without them as opposed to thinking I might have missed something. Well, I'm just one opinion :) It could still be done with the S2 tags if, say, you had a map of dynamic parameter names (or ids, etc.) and iterate over the map etc. It may depend more on how the dynamic parameters are defined or declared, etc. I think either way is acceptable, though (the map idea might be easier in some ways)... it just depends. d. You snooze, you lose. Get messages ASAP with AutoCheck in the all-new Yahoo! Mail Beta. http://advision.webevents.yahoo.com/mailbeta/newmail_html.html - 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] Sick sense of humor? Visit Yahoo! TV's Comedy with an Edge to see what's on, when. http://tv.yahoo.com/collections/222 - 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] === message truncated === Looking for a deal? Find great
Re: [S2] How to refresh one tab in Tabbedpanel instead of whole page?
Jason, Using the includeParams=all attribute of the s:url tag will probably give you what you need. s:url id=refreshURL includeParams=all action=/RefreshAction / Marco On 5/15/07, Jason Wyatt [EMAIL PROTECTED] wrote: Hi Marco, I tried using the code template you gave, but couldn't get it to do a *form submit* to the action... It just seems to just do a GET without form parameters. Does it do a form submit for you? Sorry, I mightn't have been clear... I wanted to *submit a form* inside a tab to that tab's Action, then have the tab load the updated contents. For example, say I have a tab that searches for employees. I fill out the search criteria then press Search. I want the search form to be submitted to the employeeSearchAction, then the search tab to be refreshed with the list of employees, without loading the whole page. So far I've only been able to either just refresh a tab with some URL (without the form submitting), or submit a form and refresh the whole page. I haven't got both the form to submit correctly and then only that tab to refresh. It would be great if this is possible! Thanks Jason -Original Message- From: Marco Carnevale [mailto:[EMAIL PROTECTED] Sent: Wednesday, 16 May 2007 2:29 AM To: Struts Users Mailing List Subject: Re: [S2] How to refresh one tab in Tabbedpanel instead of whole page? I am doing this on my project. The tab refreshes when the user selects a button. 1) You should know the div name for the tab you are interested in. In this example the div name is: myTabDivId s:url id=myUrl action=/MyAction/ s:tabbedPanel id=myTabs name=myTabs selectedTab=%{activeCaseTab} s:div id=myTabDivId href=%{myUrl} theme=ajax label=The Tabs Name / /s:tabbedPanel 2) You need a URL to submit to when the button is pressed that returns the contents (i.e. tile) of the tab (this may be the same as the url in step 1) s:url id=refreshURL action=/RefreshAction / 3) You need to turn on th ajax on the button and specify the tab div id that you want to replace. s:submit key=button.add theme=ajax targets=myTabDivId disabled=false href=%{refreshURL} / Marco On 5/15/07, Musachy Barroso [EMAIL PROTECTED] wrote: If you put a whole tabbedpanel inside a remote div, then you can reload it anytime you want. regards musachy On 5/15/07, Jason Wyatt [EMAIL PROTECTED] wrote: Hi, we're using the Struts 2 tabbedpanel tag. One problem we're having is that whenever we do a submit from within a tab, we to reload the same tab with the results. At the moment we our submit button posts to an XAction mentioned in the s:div tag for the given X tab. The XAction returns a TabsResult that causes the main.jsp page containing the tabbedpanel to be loaded. The main.jsp page causes the XAction related the given X tab to be hit again, this time to load the contents of the tab. The XAction returns a different TabXResult, causing a related Xtab.jspto be loaded and displayed in the s:div layer. This works ok for one layer of tabs... we now want nested layers, which is looking like a complex problem. Is there an easier solution, that can maybe just reload the specific tab's s:div layer with the result of the XAction? That would be most excellent. Thanks in advance, regards Jason - Falun Dafa Truth - Compassion - Forbearance A mind body practice under persecution in China http://www.faluninfo.net/ http://www.faluninfo.net -- Hey you! Would you help me to carry the stone? Pink Floyd - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Fwd: Best method for dynamic fields round trip]
OK, now I'm going to show my lack of knowlege, whats the best way to access the map? I was going to do the following in an iterator over an array of composite objects constructed in the display action; s:hidden name=composites[count].id / s:textfield name=composites[count].fieldname / s:textvalue name=composites[count].fieldvalue / would using a map improve on this? Dave Newton wrote: --- Laurie Harper [EMAIL PROTECTED] wrote: Just as a little added pointer, instead of CompositeObject[] getPairs() you could make that MapString,CompositeObject getPairs(), where the map key would be the field ID. That would handle non-zero-based, non-sequential field IDs cleanly. Sorry, that's what I was attempting to get at, but I'm having spurts of business today and I flailed a bit :/ d. Al Sutton wrote: A... (lightbulb moment). I thought you could only use array indexes in the value attribute of s: tags. So if I have a composite object which had fieldName and fieldValue I could put; CompositeObject[] getPairs() in the action which uses the JSP to display the data and setPairs(CompositeObject[] pairs) in the action which updates the database. This is great, the only other thing is I've now got to put a mapping in place because the original IDs are generated by Hibernate and will probably be non-sequential and almost definatley non-zero based, but that's a non S2 story. Many Many Many thanks. Al. -Original Message- From: Dave Newton [mailto:[EMAIL PROTECTED] Sent: 16 May 2007 18:37 To: Struts Users Mailing List Subject: RE: [Fwd: Best method for dynamic fields round trip] Just off of the top of my head I would probably use a collection or map of name/values... so the tag might look something like: s:textfield name=pairs[fieldId].fieldName/ s:textfield name=pairs[fieldId].fieldValue/ etc. (with minor syntax changes depending on how things are shuffled to the JSP). d. --- Al Sutton [EMAIL PROTECTED] wrote: The main part I'm having trouble with is keeping the association between the editable field name and the editable value, so if we start with Phone1 : 555-12345 And the user changes the field name and value to be Fax : 555-12346 Getting the action to recognise that it should update the both values. This is part of porting an app to s2, and currently it's don using two input fields which include an id, so it's basically input type=text name=fieldname_%=fieldId% value=phone1 input type=text name=fieldvalue_%=fieldId% value=555-12345 Currently the servlet taking the input goes through the servlet request parameter map and when it finds a request parameter that starts with fieldname_ it gets the corresponding fieldvalue_ entry and updates the field record with the id. If there is a nice way I'd appreciate a pointer because at the moment it looks like we're going to have to use the same method of going through the parameter map which feels like it's a bit of a hack and makes unit testing a bit more tricky. Al. -Original Message- From: Dave Newton [mailto:[EMAIL PROTECTED] Sent: 16 May 2007 18:19 To: Struts Users Mailing List Subject: RE: [Fwd: Best method for dynamic fields round trip] --- Al Sutton [EMAIL PROTECTED] wrote: That's just what I was looking for, thanks Dave. I was looking for a way to do it with s:xxx/ tags, so I'm now more confident it's best done without them as opposed to thinking I might have missed something. Well, I'm just one opinion :) It could still be done with the S2 tags if, say, you had a map of dynamic parameter names (or ids, etc.) and iterate over the map etc. It may depend more on how the dynamic parameters are defined or declared, etc. I think either way is acceptable, though (the map idea might be easier in some ways)... it just depends. d. You snooze, you lose. Get messages ASAP with AutoCheck in the all-new Yahoo! Mail Beta. http://advision.webevents.yahoo.com/mailbeta/newmail_html.html - 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 vs jsf?
first of all , i know it's not all or nothing, i know that struts2 has a plug-in for jsf, my question ism why? what does JSF connection to struts2 gives me? i know that struts2 tags give me automatic validation messages atttached to each control, automatic layout (too restrictive) ajax connection, why should i use jsf with struts2 instead it's own tags? _ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [s2] Is there a struts2 best practices site?
There's a FAQ and a Cookbook area * http://struts.apache.org/2.0.6/docs/faqs.html * http://struts.apache.org/2.0.6/docs/cookbook.html As to best practices, I started a list of Struts 2 Tips, but I had to set it aside to meet some other deadlines. * http://husted.com/struts/tips/index.html -Ted. On 5/15/07, Al Sutton [EMAIL PROTECTED] wrote: Is anyone putting together a Best Practices site covering things like handling dynamic numbers of parameters on a single page, UTF-8 encoding, etc., etc., etc.? I think it's something that would be pretty useful because many people find learning by example easier than reading manuals. Al. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: s:select .../
Awesome! It looked like using the Map saved time and I was looking for a second opinion. I have it working the way you have identified it here, but just wanted to make sure it was not some twisted end-around solution that people would laugh at later! Say, if I want to display an item's value from the map, what is the syntax? I tried this, but obviously this was too intuitive. :) s:property value=someMap[someKey] / Scott On 5/16/07, Laurie Harper [EMAIL PROTECTED] wrote: But it is simple :-) The note in the docs about 'If the list is a Map...' is just telling you that the tag will automatically use the map key/value pairs to fill the option tags -- i.e. that these are (roughly) equivalent: s:select list=someMap.entrySet() listKey=key listValue=value ... s:select list=someMap ... If 'list' points to a collection that is not a Map, then you need to specify listKey and listValue to tell the tag what properties of the instance objects in the list should be placed into the options. L. [EMAIL PROTECTED] wrote: Thanks d! It appears that if neither you nor I can easily drop a s:select / on a page and wire it up without fuss-n-muss, perhaps it is causing others grief too. I just think something this typical should be simple to code. Scott On 5/16/07, Dave Newton [EMAIL PROTECTED] wrote: --- [EMAIL PROTECTED] wrote: 1. Where is the getPetDao() method expected to be coded? I'd like to set this data from my Tiles Controller. It can be coded anywhere, but like most of the other tags, is expected to be accessible via the OGNL stack. 2. Where do the properties listKey/listValue need to be coded and what is the effect of this when list is an Iterable Map? Those are properties of whatever object the list is of. I don't have my code in front of me and I don't recall what happens when the s:select.../ is being populated from a map, sorry :/ IIRC if it's a simple map the value will be the key and the text will be the toString of the value, but... IRRC (I Rarely Remember Correctly). The following may be wrong, but it tripped me up for about 15 minutes, and this was how I solved it: One thing of note regarding s:select.../ is that the value attribute apparently needs to be a map with a *string* key. So even if the list/set you're populating the list from has a java.lang.Long id (like all my Hibernate POJOs do) the *value* attribute must be a map in order for list pre-selection to work. *If* this is true, it is unfortunate, as it adds a step between simply getting the appropriate sets and values and just throwing them at s:select.../ but I suppose it makes sense from a practicality standpoint. d. Be a PS3 game guru. Get your game face on with the latest PS3 news and previews at Yahoo! Games. http://videogames.yahoo.com/platform?platform=120121 - 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] -- Scott [EMAIL PROTECTED]
Re: s:select .../
--- [EMAIL PROTECTED] wrote: Say, if I want to display an item's value from the map, what is the syntax? I tried this, but obviously this was too intuitive. s:property value=someMap[someKey] / That's what I do. With names changed to protect the innocent, here's one of my textfields: s:textfield name=exDataMap[%{#result.id}].%{which}[0].foo/ Each map entry is a collection of objects with a foo property. The %{which} is because each map entry has a few different properties that I need to display based on a request parameter. #result is a set variable hence the # to distinquish it from the stack's root. It's a reasonably complex data structure I'm dealing with, but so far I haven't had any issues, including dynamically generating additional rows via JavaScript. d. Be a better Globetrotter. Get better travel answers from someone who knows. Yahoo! Answers - Check it out. http://answers.yahoo.com/dir/?link=listsid=396545469 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Action View wiring
Dave: For a moment I thought I am the only one struggling with this. Thank you for the clarification. Do you know any tutorial with examples ? Dave Newton wrote: --- Roger Varley [EMAIL PROTECTED] wrote: Is there any clear documentation that will explain when you need to use '%', '$' or '#' in Struts2 .jsp pages as I'm finding it all very confusing. I thought there was, but I can't access it at the moment. In a nutshell, if you use ${} you're using JSP EL. S2 wraps things up so if what you're trying to access isn't in scope it will get passed on to the OGNL value stack. %{} is OGNL EL and is often optional depending on what attribute you're using... this is the most confusing part AFAIC. # is used for accessing non-root OGNL objects, like an iterator-defined variable, etc. d. Now that's room service! Choose from over 150,000 hotels in 45,000 destinations on Yahoo! Travel to find your fit. http://farechase.yahoo.com/promo-generic-14795097 - 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] ognl.NoSuchPropertyException with param passing redirect-action
I'm getting the following stacktrace using 2.0.7 while trying to pass action values during an action redirect result (action config below) and I'm wondering if this is a bug with the test build I'm using or if this is user error (probably the later). I followed the http://www.mail-archive.com/user@struts.apache.org/msg59492.html thread in setting up the action. Interestingly enough I do see this in the log (after the WARN), which is all that I would've expected: May-16-2007 3:44:51:781 PM, PDT [DEBUG] (org.apache.struts2.dispatcher.ServletRedirectResult) - Redirecting to finalLocation /member/loadMyObjectInput.action?subDetail.id=2 May-16-2007 3:44:51:781 PM, PDT [WARN ] (com.opensymphony.xwork2.util.OgnlUtil) - Caught OgnlException while setting property subDetail.id' on type 'org.apache.struts2.dispatcher.ServletActionRedirectResult'. ognl.NoSuchPropertyException: org.apache.struts2.dispatcher.ServletActionRedirectResult.course at ognl.ObjectPropertyAccessor.getProperty(ObjectPropertyAccessor.java:122) at com.opensymphony.xwork2.util.OgnlValueStack$ObjectAccessor.getProperty(OgnlValueStack.java:58) at ognl.OgnlRuntime.getProperty(OgnlRuntime.java:1643) at ognl.ASTProperty.getValueBody(ASTProperty.java:92) at ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:170) at ognl.SimpleNode.getValue(SimpleNode.java:210) at ognl.ASTChain.setValueBody(ASTChain.java:168) at ognl.SimpleNode.evaluateSetValueBody(SimpleNode.java:177) at ognl.SimpleNode.setValue(SimpleNode.java:246) at ognl.Ognl.setValue(Ognl.java:476) at com.opensymphony.xwork2.util.OgnlUtil.setValue(OgnlUtil.java:186) at com.opensymphony.xwork2.util.OgnlUtil.internalSetProperty(OgnlUtil.java:360) at com.opensymphony.xwork2.util.OgnlUtil.setProperties(OgnlUtil.java:76) at com.opensymphony.xwork2.util.OgnlUtil.setProperties(OgnlUtil.java:49) at com.opensymphony.xwork2.ObjectFactory.buildResult(ObjectFactory.java:219) at com.opensymphony.xwork2.DefaultActionInvocation.createResult(DefaultActionInvocation.java:190) at com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:337) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248) at com.opensymphony.xwork2.interceptor.ParameterFilterInterceptor.intercept(ParameterFilterInterceptor.java:143) action name=saveMyObject class=MyObjectAction method=save interceptor-ref name=paramFilter param name=blockedlabel.btn.save,dojo.datePlayed/param /interceptor-ref interceptor-ref name=formStack/ result name=success/member/saved.jsp/result result name=input type=redirect-action param name=actionNameloadMyObjectInput/param param name=parsetrue/param param name=subDetail.id${subDetail.id}/param /result result name=biz.error type=redirect-action param name=actionNameloadMyObjectInput/param param name=parsetrue/param param name=subDetail.id${subDetail.id}/param /result /action - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [s2] ognl.NoSuchPropertyException with param passing redirect-action
Does it not work or are you just getting the WARN? With devmode turned on I'm pretty sure I've seen the same logs for previous versions as well. d. --- Jon Wilmoth [EMAIL PROTECTED] wrote: I'm getting the following stacktrace using 2.0.7 while trying to pass action values during an action redirect result (action config below) and I'm wondering if this is a bug with the test build I'm using or if this is user error (probably the later). I followed the http://www.mail-archive.com/user@struts.apache.org/msg59492.html thread in setting up the action. Interestingly enough I do see this in the log (after the WARN), which is all that I would've expected: May-16-2007 3:44:51:781 PM, PDT [DEBUG] (org.apache.struts2.dispatcher.ServletRedirectResult) - Redirecting to finalLocation /member/loadMyObjectInput.action?subDetail.id=2 May-16-2007 3:44:51:781 PM, PDT [WARN ] (com.opensymphony.xwork2.util.OgnlUtil) - Caught OgnlException while setting property subDetail.id' on type 'org.apache.struts2.dispatcher.ServletActionRedirectResult'. ognl.NoSuchPropertyException: org.apache.struts2.dispatcher.ServletActionRedirectResult.course at ognl.ObjectPropertyAccessor.getProperty(ObjectPropertyAccessor.java:122) at com.opensymphony.xwork2.util.OgnlValueStack$ObjectAccessor.getProperty(OgnlValueStack.java:58) at ognl.OgnlRuntime.getProperty(OgnlRuntime.java:1643) at ognl.ASTProperty.getValueBody(ASTProperty.java:92) at ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:170) at ognl.SimpleNode.getValue(SimpleNode.java:210) at ognl.ASTChain.setValueBody(ASTChain.java:168) at ognl.SimpleNode.evaluateSetValueBody(SimpleNode.java:177) at ognl.SimpleNode.setValue(SimpleNode.java:246) at ognl.Ognl.setValue(Ognl.java:476) at com.opensymphony.xwork2.util.OgnlUtil.setValue(OgnlUtil.java:186) at com.opensymphony.xwork2.util.OgnlUtil.internalSetProperty(OgnlUtil.java:360) at com.opensymphony.xwork2.util.OgnlUtil.setProperties(OgnlUtil.java:76) at com.opensymphony.xwork2.util.OgnlUtil.setProperties(OgnlUtil.java:49) at com.opensymphony.xwork2.ObjectFactory.buildResult(ObjectFactory.java:219) at com.opensymphony.xwork2.DefaultActionInvocation.createResult(DefaultActionInvocation.java:190) at com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:337) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248) at com.opensymphony.xwork2.interceptor.ParameterFilterInterceptor.intercept(ParameterFilterInterceptor.java:143) action name=saveMyObject class=MyObjectAction method=save interceptor-ref name=paramFilter param name=blockedlabel.btn.save,dojo.datePlayed/param /interceptor-ref interceptor-ref name=formStack/ result name=success/member/saved.jsp/result result name=input type=redirect-action param name=actionNameloadMyObjectInput/param param name=parsetrue/param param name=subDetail.id${subDetail.id}/param /result result name=biz.error type=redirect-action param name=actionNameloadMyObjectInput/param param name=parsetrue/param param name=subDetail.id${subDetail.id}/param /result /action - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Get the Yahoo! toolbar and be alerted to new email wherever you're surfing. http://new.toolbar.yahoo.com/toolbar/features/mail/index.php - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
checkboxlist formatted vertically?
is there any way to make checkboxes created from a checkboxlist formatted vertically by adding a br/ after each checkbox or some other means. right now it just dumps them all out in a row. same thing for the radio button options. -- Allen - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Action View wiring
--- Mansour [EMAIL PROTECTED] wrote: For a moment I thought I am the only one struggling with this. I'm pretty sure you're not! It gave me nothing but grief for a few weeks, and I still get a little confused sometimes. One of the issues is that the tag library docs don't specify which tag attributes are expecting OGNL expressions and which aren't. Digging in the source is actually the quickest way to figure some stuff out for now, and has other benefits as well :) Thank you for the clarification. Do you know any tutorial with examples ? Honestly, *everything* I know about OGNL came from the following three links: http://struts.apache.org/2.x/docs/ognl.html http://struts.apache.org/2.x/docs/ognl-basics.html http://www.ognl.org/2.6.9/Documentation/html/LanguageGuide/index.html I also spent a few hours just playing around with OGNL EL expressions, trying out the stuff from the OGNL language guide, etc. That proved to be the most beneficial, and there are a lot of neat little OGNL tricks that are very handy sometimes from that guide, in particular: http://www.ognl.org/2.6.9/Documentation/html/LanguageGuide/specialCollectionsProperties.html and http://www.ognl.org/2.6.9/Documentation/html/LanguageGuide/projection.html which, if followed to its logical conclusion, gives you a fair amount of power in selecting items from an existing list without having to write any Java code. d. Take the Internet to Go: Yahoo!Go puts the Internet in your pocket: mail, news, photos more. http://mobile.yahoo.com/go?refer=1GNXIC - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Displaytag
We use displaytag with S2 with no issues. When deployed on Tomcat 6 we did have to use this tag declaration %@ taglib uri=/WEB-INF/displaytag-el-12.tld prefix=display % And place a copy of the tld file in the WEB-INF directory. Z. Dear Struts users, I've recently downloaded displaytag-1.1 and followed all the instructions on how to install it. It would have been too nice if it had worked immediately, but I get this annoying error message all the time. I ask you guys how to solve this, because I found no posts on this specific error. When I paste the taglib line (%@ taglib uri=http://displaytag.sf.net; prefix=display %) in my jsp, I get the following error message: The absolute uri: http://displaytag.sf.net cannot be resolved in either web.xml or the jar files deployed with this application. The documentation says that all I should do is to put the jars in my WEB-INF/lib and paste the %@ taglib uri. % line in the jsp. It doesn't say that I should make modification in my web.xml... Any ideas what to do now? Thanks a lot, BM __ __ We won't tell. Get more on shows you hate to love (and love to hate): Yahoo! TV's Guilty Pleasures list. http://tv.yahoo.com/collections/265 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [s2] ognl.NoSuchPropertyException with param passing redirect-action
It appears to work. I'm just leary of having stacktraces in my log file ;) If turning devmode off will eliminate it I'll try that. - Original Message From: Dave Newton [EMAIL PROTECTED] To: Struts Users Mailing List user@struts.apache.org; Jon Wilmoth [EMAIL PROTECTED] Sent: Wednesday, May 16, 2007 4:16:38 PM Subject: Re: [s2] ognl.NoSuchPropertyException with param passing redirect-action Does it not work or are you just getting the WARN? With devmode turned on I'm pretty sure I've seen the same logs for previous versions as well. d. --- Jon Wilmoth [EMAIL PROTECTED] wrote: I'm getting the following stacktrace using 2.0.7 while trying to pass action values during an action redirect result (action config below) and I'm wondering if this is a bug with the test build I'm using or if this is user error (probably the later). I followed the http://www.mail-archive.com/user@struts.apache.org/msg59492.html thread in setting up the action. Interestingly enough I do see this in the log (after the WARN), which is all that I would've expected: May-16-2007 3:44:51:781 PM, PDT [DEBUG] (org.apache.struts2.dispatcher.ServletRedirectResult) - Redirecting to finalLocation /member/loadMyObjectInput.action?subDetail.id=2 May-16-2007 3:44:51:781 PM, PDT [WARN ] (com.opensymphony.xwork2.util.OgnlUtil) - Caught OgnlException while setting property subDetail.id' on type 'org.apache.struts2.dispatcher.ServletActionRedirectResult'. ognl.NoSuchPropertyException: org.apache.struts2.dispatcher.ServletActionRedirectResult.course at ognl.ObjectPropertyAccessor.getProperty(ObjectPropertyAccessor.java:122) at com.opensymphony.xwork2.util.OgnlValueStack$ObjectAccessor.getProperty(OgnlValueStack.java:58) at ognl.OgnlRuntime.getProperty(OgnlRuntime.java:1643) at ognl.ASTProperty.getValueBody(ASTProperty.java:92) at ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:170) at ognl.SimpleNode.getValue(SimpleNode.java:210) at ognl.ASTChain.setValueBody(ASTChain.java:168) at ognl.SimpleNode.evaluateSetValueBody(SimpleNode.java:177) at ognl.SimpleNode.setValue(SimpleNode.java:246) at ognl.Ognl.setValue(Ognl.java:476) at com.opensymphony.xwork2.util.OgnlUtil.setValue(OgnlUtil.java:186) at com.opensymphony.xwork2.util.OgnlUtil.internalSetProperty(OgnlUtil.java:360) at com.opensymphony.xwork2.util.OgnlUtil.setProperties(OgnlUtil.java:76) at com.opensymphony.xwork2.util.OgnlUtil.setProperties(OgnlUtil.java:49) at com.opensymphony.xwork2.ObjectFactory.buildResult(ObjectFactory.java:219) at com.opensymphony.xwork2.DefaultActionInvocation.createResult(DefaultActionInvocation.java:190) at com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:337) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248) at com.opensymphony.xwork2.interceptor.ParameterFilterInterceptor.intercept(ParameterFilterInterceptor.java:143) action name=saveMyObject class=MyObjectAction method=save interceptor-ref name=paramFilter param name=blockedlabel.btn.save,dojo.datePlayed/param /interceptor-ref interceptor-ref name=formStack/ result name=success/member/saved.jsp/result result name=input type=redirect-action param name=actionNameloadMyObjectInput/param param name=parsetrue/param param name=subDetail.id${subDetail.id}/param /result result name=biz.error type=redirect-action param name=actionNameloadMyObjectInput/param param name=parsetrue/param param name=subDetail.id${subDetail.id}/param /result /action - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Get the Yahoo! toolbar and be alerted to new email wherever you're surfing. http://new.toolbar.yahoo.com/toolbar/features/mail/index.php - 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: [s2] ognl.NoSuchPropertyException with param passing redirect-action
--- Jon Wilmoth [EMAIL PROTECTED] wrote: It appears to work. I'm just leary of having stacktraces in my log file ;) They're good for you; exercises disk failure modes. Definitely see if turning devmode off fixes it; there are a fair number of messages that are useful in... um... dev mode that seem to go away once it's turned off :) d. Looking for a deal? Find great prices on flights and hotels with Yahoo! FareChase. http://farechase.yahoo.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Struts 2 migration ISSUES- missing properties in ...
Hi, We have the following in the struts 1.x html:text property=studentId size=7 maxlength=7/ when I try to convert this to S2 I can't see the size and the maxlength properties for e.g. s:text name= id=/s:text What I can see is only name and id attributes only. I thought S2 tag library got all. Let me know how to overcome this. thanks Looking for earth-friendly autos? Browse Top Cars by Green Rating at Yahoo! Autos' Green Center. http://autos.yahoo.com/green_center/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: RE Displaytag
Where does one download the struts-bean.tld file and the others?? Thanks, Vikas. On 5/16/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi, With this declaration, your server has to have acces to the Internet, to download the tld and so one. If you don't have this acces, try to download the tld file, add it in your WEB-INF/tld folder, and add the mapping in your web.xml. Regards, Michaël Balazs Michnay [EMAIL PROTECTED] 16/05/2007 16:43 Veuillez répondre à Struts Users Mailing List user@struts.apache.org A user@struts.apache.org cc Objet Displaytag Dear Struts users, I've recently downloaded displaytag-1.1 and followed all the instructions on how to install it. It would have been too nice if it had worked immediately, but I get this annoying error message all the time. I ask you guys how to solve this, because I found no posts on this specific error. When I paste the taglib line (%@ taglib uri=http://displaytag.sf.net; prefix=display %) in my jsp, I get the following error message: The absolute uri: http://displaytag.sf.net cannot be resolved in either web.xml or the jar files deployed with this application. The documentation says that all I should do is to put the jars in my WEB-INF/lib and paste the %@ taglib uri. % line in the jsp. It doesn't say that I should make modification in my web.xml... Any ideas what to do now? Thanks a lot, BM We won't tell. Get more on shows you hate to love (and love to hate): Yahoo! TV's Guilty Pleasures list. http://tv.yahoo.com/collections/265
Session Expires too early! Help!
Hi, I am working on a bug in my application, the problem is, the session expires every 2 minutes or so and I have to log back in to continue, this is very frustrating. How do I go about debugging this? Which areas of the code do you guys think would be best to check for errors? Any inputs would be very appreciated. Thanks. Vikas.
Re: Session Expires too early! Help!
Hi, look at you web.xml, you may have specified session time out time as 2 mins. session-config session-timeout30/session-timeout /session-config if you set this as 30, the session will time out after 30 min of idle time, Thanks Nuwan - Original Message - From: vikas rao [EMAIL PROTECTED] To: user@struts.apache.org Sent: Thursday, May 17, 2007 4:47 AM Subject: Session Expires too early! Help! Hi, I am working on a bug in my application, the problem is, the session expires every 2 minutes or so and I have to log back in to continue, this is very frustrating. How do I go about debugging this? Which areas of the code do you guys think would be best to check for errors? Any inputs would be very appreciated. Thanks. Vikas. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Session Expires too early! Help!
I did check the session time out tag, it is: session-config session-timeout3600/session-timeout /session-config But inspite of this, error comes from my logout.java: if ((request.getSession() == null) || (request.getSession().getAttribute(userType) == null)) { System.out.print( userType SESSION ATTRIBUTE IS NULL in LOGOUT Action !!!); On 5/17/07, Nuwan Chandrasoma [EMAIL PROTECTED] wrote: Hi, look at you web.xml, you may have specified session time out time as 2 mins. session-config session-timeout30/session-timeout /session-config if you set this as 30, the session will time out after 30 min of idle time, Thanks Nuwan - Original Message - From: vikas rao [EMAIL PROTECTED] To: user@struts.apache.org Sent: Thursday, May 17, 2007 4:47 AM Subject: Session Expires too early! Help! Hi, I am working on a bug in my application, the problem is, the session expires every 2 minutes or so and I have to log back in to continue, this is very frustrating. How do I go about debugging this? Which areas of the code do you guys think would be best to check for errors? Any inputs would be very appreciated. Thanks. Vikas. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[OT]Re: Session Expires too early! Help!
This is not a struts related issue, check your logic in the code, the attribute userType may be not in the session. Thanks, Nuwan - Original Message - From: vikas rao [EMAIL PROTECTED] To: Struts Users Mailing List user@struts.apache.org Sent: Thursday, May 17, 2007 5:32 AM Subject: Re: Session Expires too early! Help! I did check the session time out tag, it is: session-config session-timeout3600/session-timeout /session-config But inspite of this, error comes from my logout.java: if ((request.getSession() == null) || (request.getSession().getAttribute(userType) == null)) { System.out.print( userType SESSION ATTRIBUTE IS NULL in LOGOUT Action !!!); On 5/17/07, Nuwan Chandrasoma [EMAIL PROTECTED] wrote: Hi, look at you web.xml, you may have specified session time out time as 2 mins. session-config session-timeout30/session-timeout /session-config if you set this as 30, the session will time out after 30 min of idle time, Thanks Nuwan - Original Message - From: vikas rao [EMAIL PROTECTED] To: user@struts.apache.org Sent: Thursday, May 17, 2007 4:47 AM Subject: Session Expires too early! Help! Hi, I am working on a bug in my application, the problem is, the session expires every 2 minutes or so and I have to log back in to continue, this is very frustrating. How do I go about debugging this? Which areas of the code do you guys think would be best to check for errors? Any inputs would be very appreciated. Thanks. Vikas. - 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]