Strecks 1.0-alpha-1 released
I'm pleased to announce the first public release of Strecks, a set of open source extensions to the Struts framework aimed at Java 5 users. Strecks (which stands for Struts Extensions) is built on the existing Struts 1.2 code base. Strecks contains a range of features aimed to streamline the Struts programming model. Some key features include: - pure POJO action beans with zero framework dependencies - action vs controller separation. Request processing logic is encapsulated into Action controllers, simplifying action implementations - annotation-based dependency injection (typed request parameters, session attributes, Spring beans, and many others) - annotation-based form validators (XML and code-free) - annotation-based data binding from form properties to domain model - annotations for additional per-field control over type conversion - simplified mechanisms to support navigation and redirecting after posts - pluggable navigation using annotations - pre and post action interceptors For a more complete list, see http://strecks.sourceforge.net/features.php The main design goals of Strecks are to: - introduce no compatibility issues apart from Java 5 - simplify the action/form programming model in line with recent software development best practices - offer or even improve on advanced features offered by competitive frameworks - keep easy to learn for existing Struts users Strecks 1.0-alpha-1 is available for download from http://strecks.sourceforge.net/. Phil Zoio web: http://www.realsolve.co.uk/ email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Display Struts Configuration
Hello all, Last week I saw a blog which showed how to display information at the beginning of your JSP about Struts such as which action the request was mapped to, the form being used, and associated information like the request headers. I should have bookmarked it, but I didn't. I have checked my history, googled for it, etc., but cannot find it again. Does anyone know what I am talking about and/or can they post a link for this information? Or does anyone have something similar? Thanks for your help. Matt - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
struts and javascript
In a JS file I created a function as below. function showPopup(htmlRewrite) { var w = 480, h = 340; if (document.all || document.layers) { w = screen.availWidth; h = screen.availHeight; } var popW = 200, popH = 100; var leftPos = (w-popW)/2, topPos = (h-popH)/2; window.open( 'htmlRewrite', , resizable, toolbar=yes, statusbar=yes, menubar=yes, status=yes, location=yes, scrollbars=yes, 'width=' + popW + ',height=' + popH + ',top=' + topPos + ',left=' + leftPos); } But getting error at the select statement below. how to call the above function?? html:select name=Form1 property=typeselected onchange='showPopup(html:rewrite action=/PrepareSchedule.do/);' htmlptions collection=typeList property=value labelProperty=label/ /html:select * Was working fine when I had the js function in the jsp itself. i.e it was working fine with below code function showPopup() { var w = 480, h = 340; if (document.all || document.layers) { w = screen.availWidth; h = screen.availHeight; } var popW = 200, popH = 100; var leftPos = (w-popW)/2, topPos = (h-popH)/2; window.open('html:rewrite action=/PrepareSchedule.do/', , resizable, toolbar=yes, statusbar=yes, menubar=yes, status=yes, location=yes, scrollbars=yes, 'width=' + popW + ',height=' + popH + ',top=' + topPos + ',left=' + leftPos); } /script html:select name=Form1 property=typeselected onchange='showPopup();' htmloptions collection=typeList property=value labelProperty=label/ /html:select But now trying to have a common function in the js file and pass an argument for the url it has to go to. what's is the right way of doing this? Thanks. _ Is your PC infected? Get a FREE online computer virus scan from McAfee® Security. http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
html:text tag, EL expressions follow-up
Hello, Last week I started a thread about issues using EL expressions within html: tags. Anyway Craig posted a follow up thread on 4_07, and I finally had time to enact on it. Here is his thread: Don't forget to use a Servlet 2.4 compatible declaration on your web.xmlfile, if you want EL evaluation to be turned on in the JSP pages. Anyway, this worked. I had 2.3 in the web.xml file, and once I made the change all EL works great. I want to thank Rick and Craig for the follow ups. I am reposting this, so others may solve their problems in the future. Thanks, - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: struts and javascript
The JS file is retrieved by the browser after the page loads and is not processed on the server, so the html:rewrite tag will not be interpreted. Either leave the script in the JSP as you mentioned, or include it in the JSP via server-side JSP include, or configure you web/app server to run .js files through the JSP processor. Frank -Original Message- From: fea jabi [EMAIL PROTECTED] To: user@struts.apache.org Sent: 4/13/06 9:14 AM Subject: struts and javascript In a JS file I created a function as below. function showPopup(htmlRewrite) { var w = 480, h = 340; if (document.all || document.layers) { w = screen.availWidth; h = screen.availHeight; } var popW = 200, popH = 100; var leftPos = (w-popW)/2, topPos = (h-popH)/2; window.open( 'htmlRewrite', , resizable, toolbar=yes, statusbar=yes, menubar=yes, status=yes, location=yes, scrollbars=yes, 'width=' + popW + ',height=' + popH + ',top=' + topPos + ',left=' + leftPos); } But getting error at the select statement below. how to call the above function?? html:select name=Form1 property=typeselected onchange='showPopup(html:rewrite action=/PrepareSchedule.do/);' htmlptions collection=typeList property=value labelProperty=label/ /html:select * Was working fine when I had the js function in the jsp itself. i.e it was working fine with below code function showPopup() { var w = 480, h = 340; if (document.all || document.layers) { w = screen.availWidth; h = screen.availHeight; } var popW = 200, popH = 100; var leftPos = (w-popW)/2, topPos = (h-popH)/2; window.open('html:rewrite action=/PrepareSchedule.do/', , resizable, toolbar=yes, statusbar=yes, menubar=yes, status=yes, location=yes, scrollbars=yes, 'width=' + popW + ',height=' + popH + ',top=' + topPos + ',left=' + leftPos); } /script html:select name=Form1 property=typeselected onchange='showPopup();' htmloptions collection=typeList property=value labelProperty=label/ /html:select But now trying to have a common function in the js file and pass an argument for the url it has to go to. what's is the right way of doing this? Thanks. _ Is your PC infected? Get a FREE online computer virus scan from McAfee Security. http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 - 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]
ActionForm and JavaBean Specifications
JavaBeans Specification doesn't allow more than one setter method (with different argument signatures) for the same property, in other words, JavaBeans specification doesn't allow the method overloading for property setters, does this also apply for Struts ActionForms? Is so, why I did have an over loaded getter methods in an ActionForm and it works fine? Thanks. - Love cheap thrills? Enjoy PC-to-Phone calls to 30+ countries for just 2¢/min with Yahoo! Messenger with Voice.
System architechture best practice
I want to make several web applications using struts, running on tomcat, mysql database, and torque to generate object model. For example, a shopping cart and an email front-end. I want to build them in such a way that I can reuse them in other webapps. Any suggestions on the best way to go about this? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Display Struts Configuration
I don't know if this is what you are looking for, but I've found it useful in the past: http://struts.sourceforge.net/strutsdoc/index.html Basically, it is Javadoc for Struts, Tiles, and stxx configuration. Struts Action 2 (and WebWork) has: - SiteGraph http://www.opensymphony.com/webwork/wikidocs/SiteGraph.html - Config Browser http://www.opensymphony.com/webwork/wikidocs/Config%20Browser.html If you have any other ideas of tools that would be useful, let us know. Don On 4/13/06, Matthew J. Vincent [EMAIL PROTECTED] wrote: Hello all, Last week I saw a blog which showed how to display information at the beginning of your JSP about Struts such as which action the request was mapped to, the form being used, and associated information like the request headers. I should have bookmarked it, but I didn't. I have checked my history, googled for it, etc., but cannot find it again. Does anyone know what I am talking about and/or can they post a link for this information? Or does anyone have something similar? Thanks for your help. Matt - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Radio button group
Hi, I have a jsp with a table showing few records of data where each record corresponds to an object of a bean. Beside the bean data I need to have a radio button group with (Approve, Reject and Ignore). Can any one help me to put the bean object and the radio button group together.. in Jsp and action form. Any help is much appreciated. Thanks, Vidya This message and any attachments are confidential and intended solely for the addressee. If you have received this message in error, please notify Discovery immediately, telephone number +27 11 529 2888. Any unauthorised use; alteration or dissemination of the contents of this email is strictly prohibited. In no event will Discovery or the sender be liable in any manner whatsoever to any person for any loss or any direct, indirect, special or consequential damages arising from use of this email or any linked website, including, without limitation, from any lost profits, business interruption, loss of programmes or other data that may be stored on any information handling system or otherwise from any assurance that this email is virus free even if Discovery is expressly advised of the possibility of such damages. Discovery is an Authorised Financial Services Provider.
Re: Display Struts Configuration
This is helpful, but not *exactly* what I am looking for. What I am looking for is used for debugging purposes during runtime. Anyone? Thanks again Don. Matt Don Brown wrote: I don't know if this is what you are looking for, but I've found it useful in the past: http://struts.sourceforge.net/strutsdoc/index.html Basically, it is Javadoc for Struts, Tiles, and stxx configuration. Struts Action 2 (and WebWork) has: - SiteGraph http://www.opensymphony.com/webwork/wikidocs/SiteGraph.html - Config Browser http://www.opensymphony.com/webwork/wikidocs/Config%20Browser.html If you have any other ideas of tools that would be useful, let us know. Don On 4/13/06, Matthew J. Vincent [EMAIL PROTECTED] wrote: Hello all, Last week I saw a blog which showed how to display information at the beginning of your JSP about Struts such as which action the request was mapped to, the form being used, and associated information like the request headers. I should have bookmarked it, but I didn't. I have checked my history, googled for it, etc., but cannot find it again. Does anyone know what I am talking about and/or can they post a link for this information? Or does anyone have something similar? Thanks for your help. Matt - 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: Display Struts Configuration
On 4/13/06, Matthew J. Vincent [EMAIL PROTECTED] wrote: This is helpful, but not *exactly* what I am looking for. What I am looking for is used for debugging purposes during runtime. Anyone? I keep 'debug.jsp' around, and include it at the bottom of my main (Tiles) layout during development. It uses JSTL and the implicit objects to print out everything in request/session/application scope. http://wiki.wsmoak.net/cgi-bin/wiki.pl?DebugJSP HTH, -- Wendy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Display Struts Configuration
Wendy - This is excellent and very close to what I am looking for. The only thing missing from this is the *Struts* specific information such as which action the request was mapped to, the form being used, etc. Is there anyone who has this information or an idea of how to retrieve it? Thanks! Matt Wendy Smoak wrote: On 4/13/06, Matthew J. Vincent [EMAIL PROTECTED] wrote: This is helpful, but not *exactly* what I am looking for. What I am looking for is used for debugging purposes during runtime. Anyone? I keep 'debug.jsp' around, and include it at the bottom of my main (Tiles) layout during development. It uses JSTL and the implicit objects to print out everything in request/session/application scope. http://wiki.wsmoak.net/cgi-bin/wiki.pl?DebugJSP HTH, -- Wendy - 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: Display Struts Configuration
Maybe this is what you are referring to? http://marc.theaimsgroup.com/?l=struts-userm=114406604109454w=2 http://www.jamesholmes.com/struts/console/ http://exadel.com/web/portal/products/ExadelStudio http://www.m7.com/ -Dennis Matthew J. Vincent [EMAIL PROTECTED] 04/13/2006 10:38 AM Please respond to Struts Users Mailing List user@struts.apache.org To Struts Users Mailing List user@struts.apache.org cc Subject Re: Display Struts Configuration This is helpful, but not *exactly* what I am looking for. What I am looking for is used for debugging purposes during runtime. Anyone? Thanks again Don. Matt Don Brown wrote: I don't know if this is what you are looking for, but I've found it useful in the past: http://struts.sourceforge.net/strutsdoc/index.html Basically, it is Javadoc for Struts, Tiles, and stxx configuration. Struts Action 2 (and WebWork) has: - SiteGraph http://www.opensymphony.com/webwork/wikidocs/SiteGraph.html - Config Browser http://www.opensymphony.com/webwork/wikidocs/Config%20Browser.html If you have any other ideas of tools that would be useful, let us know. Don On 4/13/06, Matthew J. Vincent [EMAIL PROTECTED] wrote: Hello all, Last week I saw a blog which showed how to display information at the beginning of your JSP about Struts such as which action the request was mapped to, the form being used, and associated information like the request headers. I should have bookmarked it, but I didn't. I have checked my history, googled for it, etc., but cannot find it again. Does anyone know what I am talking about and/or can they post a link for this information? Or does anyone have something similar? Thanks for your help. Matt - 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]
Validation Rules and Messages
Is there a way to associate multiple messages with a single validation rule? In particular, I would like to associate multiple messages with the required rule so that I can have a different message displayed depending on the field being validated. Thanks. - Asad - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Display Struts Configuration
This is nice for config before the application is running, I want to know during runtime. Thanks! Matt [EMAIL PROTECTED] wrote: Maybe this is what you are referring to? http://marc.theaimsgroup.com/?l=struts-userm=114406604109454w=2 http://www.jamesholmes.com/struts/console/ http://exadel.com/web/portal/products/ExadelStudio http://www.m7.com/ -Dennis Matthew J. Vincent [EMAIL PROTECTED] 04/13/2006 10:38 AM Please respond to Struts Users Mailing List user@struts.apache.org To Struts Users Mailing List user@struts.apache.org cc Subject Re: Display Struts Configuration This is helpful, but not *exactly* what I am looking for. What I am looking for is used for debugging purposes during runtime. Anyone? Thanks again Don. Matt Don Brown wrote: I don't know if this is what you are looking for, but I've found it useful in the past: http://struts.sourceforge.net/strutsdoc/index.html Basically, it is Javadoc for Struts, Tiles, and stxx configuration. Struts Action 2 (and WebWork) has: - SiteGraph http://www.opensymphony.com/webwork/wikidocs/SiteGraph.html - Config Browser http://www.opensymphony.com/webwork/wikidocs/Config%20Browser.html If you have any other ideas of tools that would be useful, let us know. Don On 4/13/06, Matthew J. Vincent [EMAIL PROTECTED] wrote: Hello all, Last week I saw a blog which showed how to display information at the beginning of your JSP about Struts such as which action the request was mapped to, the form being used, and associated information like the request headers. I should have bookmarked it, but I didn't. I have checked my history, googled for it, etc., but cannot find it again. Does anyone know what I am talking about and/or can they post a link for this information? Or does anyone have something similar? Thanks for your help. Matt - 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]
[OT]Re: System architechture best practice
You might like this book, I did: http://www.manning.com/ford/ -Dennis draegoon Z [EMAIL PROTECTED] 04/13/2006 10:13 AM Please respond to Struts Users Mailing List user@struts.apache.org To struts-user@jakarta.apache.org cc Subject System architechture best practice I want to make several web applications using struts, running on tomcat, mysql database, and torque to generate object model. For example, a shopping cart and an email front-end. I want to build them in such a way that I can reuse them in other webapps. Any suggestions on the best way to go about this? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Display Struts Configuration
I'm just guessing, but it sounds like you're gonna have to extend RequestProcessor and create a tag that can cooperate with it. And it does sound like it'd be a useful debug extension to any/all releases of struts. -Dennis Matthew J. Vincent [EMAIL PROTECTED] 04/13/2006 11:04 AM Please respond to Struts Users Mailing List user@struts.apache.org To Struts Users Mailing List user@struts.apache.org cc Subject Re: Display Struts Configuration This is nice for config before the application is running, I want to know during runtime. Thanks! Matt [EMAIL PROTECTED] wrote: Maybe this is what you are referring to? http://marc.theaimsgroup.com/?l=struts-userm=114406604109454w=2 http://www.jamesholmes.com/struts/console/ http://exadel.com/web/portal/products/ExadelStudio http://www.m7.com/ -Dennis Matthew J. Vincent [EMAIL PROTECTED] 04/13/2006 10:38 AM Please respond to Struts Users Mailing List user@struts.apache.org To Struts Users Mailing List user@struts.apache.org cc Subject Re: Display Struts Configuration This is helpful, but not *exactly* what I am looking for. What I am looking for is used for debugging purposes during runtime. Anyone? Thanks again Don. Matt Don Brown wrote: I don't know if this is what you are looking for, but I've found it useful in the past: http://struts.sourceforge.net/strutsdoc/index.html Basically, it is Javadoc for Struts, Tiles, and stxx configuration. Struts Action 2 (and WebWork) has: - SiteGraph http://www.opensymphony.com/webwork/wikidocs/SiteGraph.html - Config Browser http://www.opensymphony.com/webwork/wikidocs/Config%20Browser.html If you have any other ideas of tools that would be useful, let us know. Don On 4/13/06, Matthew J. Vincent [EMAIL PROTECTED] wrote: Hello all, Last week I saw a blog which showed how to display information at the beginning of your JSP about Struts such as which action the request was mapped to, the form being used, and associated information like the request headers. I should have bookmarked it, but I didn't. I have checked my history, googled for it, etc., but cannot find it again. Does anyone know what I am talking about and/or can they post a link for this information? Or does anyone have something similar? Thanks for your help. Matt - 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: Display Struts Configuration
Hi Matthew, I don't know the blog you refer to, but I might be able to help... As far as the request information goes, check out: http://javawebparts.sourceforge.net Specifically, go to the javadocs and look at the RequestHelpers class in the javawebparts.request package. That should give you everything you want as far as that goes. For the Struts info, what I think you want is the request attribute org.apache.struts.action.mapping.instance. This is the ActionMapping that was used to fulfill the request. That gives you the mapped path, the bean used, the forward, etc. So, what you could do in your JSP is this: %=RequestHelpers.getAllRequestInfo()% ...and you should see the ActionMapping, mixed in with any other attributes present, along with the parameters and headers too. HTH, Frank -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com AIM: fzammetti Yahoo: fzammetti MSN: [EMAIL PROTECTED] Java Web Parts - http://javawebparts.sourceforge.net Supplying the wheel, so you don't have to reinvent it! On Thu, April 13, 2006 10:38 am, Matthew J. Vincent said: This is helpful, but not *exactly* what I am looking for. What I am looking for is used for debugging purposes during runtime. Anyone? Thanks again Don. Matt Don Brown wrote: I don't know if this is what you are looking for, but I've found it useful in the past: http://struts.sourceforge.net/strutsdoc/index.html Basically, it is Javadoc for Struts, Tiles, and stxx configuration. Struts Action 2 (and WebWork) has: - SiteGraph http://www.opensymphony.com/webwork/wikidocs/SiteGraph.html - Config Browser http://www.opensymphony.com/webwork/wikidocs/Config%20Browser.html If you have any other ideas of tools that would be useful, let us know. Don On 4/13/06, Matthew J. Vincent [EMAIL PROTECTED] wrote: Hello all, Last week I saw a blog which showed how to display information at the beginning of your JSP about Struts such as which action the request was mapped to, the form being used, and associated information like the request headers. I should have bookmarked it, but I didn't. I have checked my history, googled for it, etc., but cannot find it again. Does anyone know what I am talking about and/or can they post a link for this information? Or does anyone have something similar? Thanks for your help. Matt - 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: [OT]Re: System architechture best practice
Thanks. I haven't read that one yet, but I'll be sure to check it out. [EMAIL PROTECTED] wrote: You might like this book, I did: http://www.manning.com/ford/ -Dennis draegoon Z [EMAIL PROTECTED] 04/13/2006 10:13 AM Please respond to Struts Users Mailing List user@struts.apache.org To struts-user@jakarta.apache.org cc Subject System architechture best practice I want to make several web applications using struts, running on tomcat, mysql database, and torque to generate object model. For example, a shopping cart and an email front-end. I want to build them in such a way that I can reuse them in other webapps. Any suggestions on the best way to go about this? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: struts and javascript
Or generate the target location in JSP like this: script language=javascript var mytarget = html:rewrite action=/PrepareSchedule.do/ /script Then look up for target in your main Javascript function. I guess it would be easier to attach target to some well-know object like window, for example: window.mytarget = html:rewrite action=/PrepareSchedule.do/ I am not a Javascript pro, but you get the idea. On 4/13/06, Frank W. Zammetti [EMAIL PROTECTED] wrote: The JS file is retrieved by the browser after the page loads and is not processed on the server, so the html:rewrite tag will not be interpreted. Either leave the script in the JSP as you mentioned, or include it in the JSP via server-side JSP include, or configure you web/app server to run .js files through the JSP processor. Frank -Original Message- From: fea jabi [EMAIL PROTECTED] To: user@struts.apache.org Sent: 4/13/06 9:14 AM Subject: struts and javascript In a JS file I created a function as below. function showPopup(htmlRewrite) { var w = 480, h = 340; if (document.all || document.layers) { w = screen.availWidth; h = screen.availHeight; } var popW = 200, popH = 100; var leftPos = (w-popW)/2, topPos = (h-popH)/2; window.open( 'htmlRewrite', , resizable, toolbar=yes, statusbar=yes, menubar=yes, status=yes, location=yes, scrollbars=yes, 'width=' + popW + ',height=' + popH + ',top=' + topPos + ',left=' + leftPos); } But getting error at the select statement below. how to call the above function?? html:select name=Form1 property=typeselected onchange='showPopup(html:rewrite action=/PrepareSchedule.do/);' htmlptions collection=typeList property=value labelProperty=label/ /html:select * Was working fine when I had the js function in the jsp itself. i.e it was working fine with below code function showPopup() { var w = 480, h = 340; if (document.all || document.layers) { w = screen.availWidth; h = screen.availHeight; } var popW = 200, popH = 100; var leftPos = (w-popW)/2, topPos = (h-popH)/2; window.open('html:rewrite action=/PrepareSchedule.do/', , resizable, toolbar=yes, statusbar=yes, menubar=yes, status=yes, location=yes, scrollbars=yes, 'width=' + popW + ',height=' + popH + ',top=' + topPos + ',left=' + leftPos); } /script html:select name=Form1 property=typeselected onchange='showPopup();' htmloptions collection=typeList property=value labelProperty=label/ /html:select But now trying to have a common function in the js file and pass an argument for the url it has to go to. what's is the right way of doing this? Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: struts and javascript
On Thu, April 13, 2006 12:26 pm, Michael Jouravlev said: Or generate the target location in JSP like this: script language=javascript var mytarget = html:rewrite action=/PrepareSchedule.do/ /script That's a good option too. Then look up for target in your main Javascript function. I guess it would be easier to attach target to some well-know object like window, for example: window.mytarget = html:rewrite action=/PrepareSchedule.do/ FYI, I have experienced some problems with custom attributes on objects in some browsers. I suggest always using setAttribute()/getAttribute when working with custom attributes. Seems to be more cross-browser-friendly at this point. Frank -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com AIM: fzammetti Yahoo: fzammetti MSN: [EMAIL PROTECTED] Java Web Parts - http://javawebparts.sourceforge.net Supplying the wheel, so you don't have to reinvent it! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Shale] standalone-tiles with Netbeans 5.0 problem - and a fix
Netbeans 5.0 with standalone-tiles, myfaces, and the Bundled Tomcat 5.5.9 doesn't work for me. However, I changed my project to use external Tomcat 5.5.12 (not bundled) and standalone-tiles works fine. Dick P.S. I had a post earlier today about standalone-tiles. That error was caused because my 'tiles:insert ...' did not have 'flush=false'. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [shale] Tiles integration with RI
Dick, Sorry, I didn't see this earlier. For those looking through the archives, the answer is to include 'flush=false' in your tiles:insert tag. Hubert On 4/12/06, Dick Starr [EMAIL PROTECTED] wrote: Hubert, I see you got your answer, but I am curious about your f:verbatim comment. Could you please tell me where it is required in standalone-tiles. I am trying to get standalone-tiles working, but am getting a JspException error (Can't insert page 'Test' : Illegal to flush within a custom tag) on my layout.jsp when it reaches my tiles:insert attribute=title/, which in turn references my tiles def containing put name=title value=Test/. Perhaps the f:verbatim is the answer to my problem. Perhaps you could include your /baseTemplate.jsp in your response. Thanks for your help. Dick -Original Message- From: Hubert Rabago [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 11, 2006 5:28 PM To: Struts Users Mailing List Subject: [shale] Tiles integration with RI I'm trying to use Shale-Tiles with RI and I'm having trouble submitting forms. The page renders okay (once I start using f:verbatim all over the place), but the submit doesn't work. I stepped through the code and it looks like there's a viewid mismatch. Here's my tile definition: definition name=base.layout path=/baseTemplate.jsp put name=windowTitle value=My Page Title/ put name=pageHeader value=/pageHeader.jsp / put name=body value=/ /definition definition name=/testing extends=base.layout put name=windowTitle value=Testing Only/ put name=body value=/showSample.jsp/ /definition I request /myapp/testing.jsf which renders ok. I type in a value in a text field and submit the form. In the RI's ViewHandlerImpl.restoreView(), it's looking for viewid=/testing.jsp, but the viewid recorded in the sessionMap is /testing.jsf, so the submit request gets treated as a new one instead of a postback. What am I doing wrong? thanks, Hubert - 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: [shale] Tiles integration with RI
On 4/11/06, Gary VanMatre [EMAIL PROTECTED] wrote: From: Hubert Rabago [EMAIL PROTECTED] I request /myapp/testing.jsf which renders ok. I type in a value in a text field and submit the form. In the RI's ViewHandlerImpl.restoreView(), it's looking for viewid=/testing.jsp, but the viewid recorded in the sessionMap is /testing.jsf, so the submit request gets treated as a new one instead of a postback. What am I doing wrong? I've not made time to check out the shale tiles plugin but I know that the RI and Myfaces do handle the viewid differently. This is a bug in the RI. Myfaces will always try to replace to the default suffix of anything that makes it thru the faces servlet. The RI is pretty loose about this. So, if you are using the RI this might be the reason. In the clay view handler, I ended up overriding the view id in the restore view to force the behavior. Gary I found that RI really does save the view as /view.jsp instead of /view.jsf even in regular (non-Tiles) requests. The viewId is changed in ViewHandlerImpl.renderView(). The problem is that TilesViewHandler doesn't call this method if it identifies the view as a Tile. The view gets saved as /view.jsf because ViewHandlerImpl never got a chance to update the view id. On postback, it's like I described above. The view isn't restored because it's looking for the wrong view id. Unless someone tells me otherwise, I'll file this as a bug. Hubert - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[shale] Anyway to stop auto-load of META-INF/faces-config.xml?
I'm including shale-tiles.jar in my app, but overriding the TilesViewHandler with my own implementation. However, just including shale-tiles.jar in the app autoloads the META-INF/faces-config.xml, which loads Shale's TilesViewHandler. Is there a way I can include shale-tiles.jar but not autoload its faces-config.xml? thanks, Hubert - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: problem in tiles
I solved the problem I think you are right, I can not call any tiles definition directly without calling an action I made a generic action definition to view my pages check the solution in my blog http://www.egjug.org/struts_action_foward_to_Tiles Ahmed Hashim On 4/10/06, Dave Newton [EMAIL PROTECTED] wrote: Ahmed Hashim wrote: I tried to forward to loginPage.page from the action and it is working fine, but i remember that I can request the page directly... any suggestion? You can use tile definitions as input or forward attribute values in your Struts config file; is that what you mean? Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- In Life, it doesn't matter who you are, but whether someone appreciates you for what you are, accepts you and loves you unconditionally. A Real Friend ( Friendship ) is one who walks in when the rest of the world walks away.
Re: [shale] Anyway to stop auto-load of META-INF/faces-config.xml?
On 4/13/06, Hubert Rabago [EMAIL PROTECTED] wrote: I'm including shale-tiles.jar in my app, but overriding the TilesViewHandler with my own implementation. However, just including shale-tiles.jar in the app autoloads the META-INF/faces-config.xml, which loads Shale's TilesViewHandler. Is there a way I can include shale-tiles.jar but not autoload its faces-config.xml? Not without taking the JAR apart and removing the faces-config.xml that is there. Auto-loading such files is a feature required by the JSF spec. thanks, Hubert Craig - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [URGEN] Validation in Action and using redirection to view result page :(
oh, thank you for your help, I will try to use it, again, thank you :) - Original Message - From: Adam Hardy [EMAIL PROTECTED] To: Struts Users Mailing List user@struts.apache.org Sent: Wednesday, April 12, 2006 7:03 PM Subject: Re: [URGEN] Validation in Action and using redirection to view result page :( Hi bowlkhin, the approach that I used is this: I have a JSP tile which just contains the HTML for errors and messages display. I put a scriptlet in this tile after the errors and messages tags. The scriptlet removes the error or message from the session. Hope that helps. Adam Pham Anh Tuan on 12/04/06 07:42, wrote: Hi all, case: I use Tiles and Velocity for presentation layer com.project.GeneratedKeyAction: will generated and register information of code or capcha (or do something here - retrieve list of user type from DB, etc) to session scope. !-- go to Information Registration page - this page include registration information and registration form -- action path=/rw/gotoInfoPage type=com.project.GeneratedKeyAction scope=request validate=false forward name=success path=aInfoPage/ /action after user fullfill registration form, he/she submits this form with action /rw/processRegForm.do !-- process registration -- action name=regFormBean path=/rw/processRegForm type=com.project.ProcessRegistration scope=request validate=false forward name=success path=/rw/gotoInfoPage.do redirect=true / forward name=failure path=/rw/gotoInfoPage.do redirect=true / forward name=systemFailure path=aLoi/ /action as you saw, whether or not this registration process is successfull, I want the use back to the info page (/rw/gotoInfoPage.do), if there's any error messages /successful messages, this will be showed in the info page. I read Struts document, and it said that, when I use redirection in forward tag, it means all values which I saved in request scope will be empty, but ... If I don't use redirection in forward tag (to forward to the info page - /rw/gotoInfoPage), user will see url: /rw/processRegForm.do after the registration process, and if user refresh this page which has the url: /rw/processRegForm.do, errors will occur because there's no form bean or any data to process :( but... I couldn't save all my error message or any messages in session scope, because, where could I remove that messages from session scope after process was successful :( Again, plz help me to solve this problem! thanks in advance :( bowlkhin - 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]