Re: possible bug in html-el
This was a bug in RC1. It's fixed in the nightly build. Turns out, amoungst other things, I was missing the error resource key member.email.missing vs member.errors.email.missing in my application.resources file. I really wish that missing keys would just skip over instead of killign the whole page (much harder to debug). I tried the null setting in web.xml but it didn't seem to change life. Dan -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Daniel Allen, [EMAIL PROTECTED] http://www.mojavelinux.com/ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - I am the GOD.the GOD...of house! -- Leeloo - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
request.getRemoteUser
Is there any way to show the remote user that sounds like (this doesnt work): bean:write name=request property=remoteUser / I actually use %= request.getRemoteUser() %, and works fine, but i am a curious kid Thank you, Guido. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Opinions on Struts code generator - A zipped version
Hi James, I take a look to your paper and i found it very interesting. But I am wondering if every code generator are not taking the problem by a wrong way, because I saw some of them (your, one on Ted Husted's site, one made in my office, and few others which wasn't mature) and every code generator are html based. They parse the html pages and find the information needed, so they generate the action needed to populate theses data into jsp. But when you start an application you first think to business logic, so you know which information will be on the pages. So why not do generation of code (action, actionform, jsp and struts-config.xml) from business logic API and the navigation state diagram ? I like your paper because it introduced a state diagram, and i only ever saw it in our internal codegenerator. I am working on a struts application to dynamically build a web application. Presentation part should be logic less, so it logically could be automatically build. In an hour, the core application should be available and it should not required lot of tools : only a browser to connect to a developpement server. An Ant could be packaged into the codegenerator to deploy for testing into build process. Once the navigation is ok and it work as you like, you may download the sources and only at this point do the html presentation. This is more natural when you are working on a module for a big application. Here you can use tiles and all the productivity features proposed into struts. I am at your disposition if you want more information. ;) Regards, Emmanuel Feller Senior Developper Cap Gemini Ernst Young +33 2 51 17 35 00 phone 3716 +33 6 23 34 63 39 - Message d'origine - De : james logsdon [EMAIL PROTECTED] À : [EMAIL PROTECTED] Envoyé : mercredi 12 mars 2003 15:54 Objet : Re: Opinions on Struts code generator - A zipped version Hopefully this works... - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Opinions on Struts code generator - A zipped version
Emmanuel Feller wrote: Hi James, I take a look to your paper and i found it very interesting. But I am wondering if every code generator are not taking the problem by a wrong way, because I saw some of them (your, one on Ted Husted's site, one made in my office, and few others which wasn't mature) and every code generator are html based. They parse the html pages and find the information needed, so they generate the action needed to populate theses data into jsp. But when you start an application you first think to business logic, so you know which information will be on the pages. Most applications are based on requirements, and easy to define those as HTML. To go backwards from here is what we have see if anyone want's it is not as good aproach. .V So why not do generation of code (action, actionform, jsp and struts-config.xml) from business logic API and the navigation state diagram ? I like your paper because it introduced a state diagram, and i only ever saw it in our internal codegenerator. I am working on a struts application to dynamically build a web application. Presentation part should be logic less, so it logically could be automatically build. In an hour, the core application should be available and it should not required lot of tools : only a browser to connect to a developpement server. An Ant could be packaged into the codegenerator to deploy for testing into build process. Once the navigation is ok and it work as you like, you may download the sources and only at this point do the html presentation. This is more natural when you are working on a module for a big application. Here you can use tiles and all the productivity features proposed into struts. I am at your disposition if you want more information. ;) Regards, Emmanuel Feller Senior Developper Cap Gemini Ernst Young +33 2 51 17 35 00 phone 3716 +33 6 23 34 63 39 - Message d'origine - De : james logsdon [EMAIL PROTECTED] À : [EMAIL PROTECTED] Envoyé : mercredi 12 mars 2003 15:54 Objet : Re: Opinions on Struts code generator - A zipped version Hopefully this works... - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Opinions on Struts code generator - A zipped version
Most applications are based on requirements, and easy to define those as HTML. To go backwards from here is what we have see if anyone want's it is not as good aproach. I understand your point of view. We started to make requirements in html form, but our customers didn't take care of the real informations in the screen, and they looked to the colors or the place of field. So the process of requirements expression wasn't stable until lots of iteration. We use powerpoint to do the requirements now. The colors and design and the last things we are taking care about. Since i only work on big projects (more than 10k human days), we save lots of time when we stop using html prototype. I though we are not the only ones to do the same, that's why i am wondering for code generator from business logic. Emmanuel - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Opinions on Struts code generator - A zipped version
Interesting.. How about taking this to the next level, which all struts generators have failed to do (except a BEA tool that requires you to buy into them): 1) Offer the ability to define the concept of a page, which has associated to it the action and an JSP page 2) Define the fields that will be managed within the JSP page, including the types of fields (text, textarea, drop down), datasources for drop downs, and validation rules 3) Allow the user to define events that occur when the user submits the page. This would include things like Save, Update, Delete, Create, Cancel, Next, Previous, etc. 4) Allow the user to select a custom event handler or a default one such as Cancel, which would have a wizard to allow the user to select the page it flows to and do any logic like strip out session beans if the action's form is session scoped 5) Optionally, you could extend the concept of the fields to allow them to be mapped to datasources, by which I mean an EJB, JDBC Datasource, etc. So, your tools allows for the definition of dataobjects, pages, and fields that are all tied together using some configuration file and optionally generated source. Note that some of this could be done with a state diagramming tool within the app, and some of it would be more event driven. What I'm proposing is something that operates like VB or Visual Interdev, and allows either rapid prototyping, rapid web tier integration, and rapid business tier integration. Add in a little NetDynamics for spice, and you have a really interesting tool that is beyond just code generation. I've been wanting to do this for several years but I've had 0 time to put into it. I've been hoping that someone else catches the vision and can help me run with it, as I firmly believe this is what is missing from J2EE and has rarely been filled in by code generators. My guess is that Eclipse or some other IDE would allow for the GUI of this tool to be built and integrated quickly, benefiting from the IDE's class parsing rules, Add new source capabilities, and other Java semantics that tend to slow tools down when they reach this point. Thoughts? James -Original Message- From: james logsdon [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 12, 2003 8:54 AM To: [EMAIL PROTECTED] Subject: Re: Opinions on Struts code generator - A zipped version Hopefully this works... From: Robert McIntosh [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Re: Opinions on Struts code generator Date: Tue, 11 Mar 2003 17:25:06 -0600 how about zipping it up? james logsdon wrote: I was not able to attach my pdf file. The mail server either said that it was too big or it just did not attach it. I created a group on yahoo and added the file there. It can be retrieved by following the link: http://groups.yahoo.com/group/quickStartCodeGenerator/files/ QuickStart .doc but if you do not have a yahoo id you will have to create one. Sorry for any inconvenience. James From: james logsdon [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Re: Opinions on Struts code generator Date: Tue, 11 Mar 2003 16:51:58 -0600 From: james logsdon [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Re: Opinions on Struts code generator Date: Tue, 11 Mar 2003 16:47:47 -0600 Let me try one more time... From: james logsdon [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Opinions on Struts code generator Date: Tue, 11 Mar 2003 15:06:16 -0600 Hello, I have built a Struts code generator that converts HTML pages and a state diagram into a Struts application. The HTML files are input into JTidy to create XHTML (as done in cocoon) and then several XSL transformations are done to create the various Struts files. All of the code generation is done with an Ant script which creates war file from the input files. If enough people think this is useful I will donate to open source... Would appreciate feedback on the utility of the approach take, and if their are ways to improve the generated code. James PS - Had to break document into two as there is a 100k document size limit. _ MSN 8 with e-mail virus protection service: 2 months FREE* http://join.msn.com/?page=features/virus - -- -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. http://join.msn.com/?page=features/virus
Re: Opinions on Struts code generator - A zipped version
Like this (but it's read only): http://ireport.sourceforge.net/images/screenshot6.gif It even has a wizzard from SQL. .V James Higginbotham wrote: Interesting.. How about taking this to the next level, which all struts generators have failed to do (except a BEA tool that requires you to buy into them): 1) Offer the ability to define the concept of a page, which has associated to it the action and an JSP page 2) Define the fields that will be managed within the JSP page, including the types of fields (text, textarea, drop down), datasources for drop downs, and validation rules 3) Allow the user to define events that occur when the user submits the page. This would include things like Save, Update, Delete, Create, Cancel, Next, Previous, etc. 4) Allow the user to select a custom event handler or a default one such as Cancel, which would have a wizard to allow the user to select the page it flows to and do any logic like strip out session beans if the action's form is session scoped 5) Optionally, you could extend the concept of the fields to allow them to be mapped to datasources, by which I mean an EJB, JDBC Datasource, etc. So, your tools allows for the definition of dataobjects, pages, and fields that are all tied together using some configuration file and optionally generated source. Note that some of this could be done with a state diagramming tool within the app, and some of it would be more event driven. What I'm proposing is something that operates like VB or Visual Interdev, and allows either rapid prototyping, rapid web tier integration, and rapid business tier integration. Add in a little NetDynamics for spice, and you have a really interesting tool that is beyond just code generation. I've been wanting to do this for several years but I've had 0 time to put into it. I've been hoping that someone else catches the vision and can help me run with it, as I firmly believe this is what is missing from J2EE and has rarely been filled in by code generators. My guess is that Eclipse or some other IDE would allow for the GUI of this tool to be built and integrated quickly, benefiting from the IDE's class parsing rules, Add new source capabilities, and other Java semantics that tend to slow tools down when they reach this point. Thoughts? James -Original Message- From: james logsdon [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 12, 2003 8:54 AM To: [EMAIL PROTECTED] Subject: Re: Opinions on Struts code generator - A zipped version Hopefully this works... From: Robert McIntosh [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Re: Opinions on Struts code generator Date: Tue, 11 Mar 2003 17:25:06 -0600 how about zipping it up? james logsdon wrote: I was not able to attach my pdf file. The mail server either said that it was too big or it just did not attach it. I created a group on yahoo and added the file there. It can be retrieved by following the link: http://groups.yahoo.com/group/quickStartCodeGenerator/files/ QuickStart .doc but if you do not have a yahoo id you will have to create one. Sorry for any inconvenience. James From: james logsdon [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Re: Opinions on Struts code generator Date: Tue, 11 Mar 2003 16:51:58 -0600 From: james logsdon [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Re: Opinions on Struts code generator Date: Tue, 11 Mar 2003 16:47:47 -0600 Let me try one more time... From: james logsdon [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Opinions on Struts code generator Date: Tue, 11 Mar 2003 15:06:16 -0600 Hello, I have built a Struts code generator that converts HTML pages and a state diagram into a Struts application. The HTML files are input into JTidy to create XHTML (as done in cocoon) and then several XSL transformations are done to create the various Struts files. All of the code generation is done with an Ant script which creates war file from the input files. If enough people think this is useful I will donate to open source... Would appreciate feedback on the utility of the approach take, and if their are ways to improve the generated code. James PS - Had to break document into two as there is a 100k document size limit. _ MSN 8 with e-mail virus protection service: 2 months FREE* http://join.msn.com/?page=features/virus - -- -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*.
Re: request.getRemoteUser
Guido wrote: Is there any way to show the remote user that sounds like (this doesnt work): bean:write name=request property=remoteUser / I actually use %= request.getRemoteUser() %, and works fine, but i am a curious kid I think the request taglib may help you out: http://jakarta.apache.org/taglibs/doc/request-doc/intro.html %@ taglib uri=http://jakarta.apache.org/taglibs/request-1.0; prefix=req % req:request id=httpRequest/ The remote user is: bean:write name=httpRequest property=remoteUser/ Thank you, Guido. - 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]Best JSP plugin for eclipse..
[EMAIL PROTECTED] wrote: Hello, I use the STRECL JSP editor plugin whith eclipse for personal use. According to the detail page, the following features are available : JSP editor * tree structure visualization + filtering o HTML tags o JavaScript tags o Tags Libraries * property view / editor * syntax highlight * code assist * automatic source code validation and view refresh Need registration for download : http://www.strecl.com/ Pascal I do not want to start yet another IDE debate but.. I currently enjoy the JSP editing support in Netbeans 3.4.1 ie: full code completion for custom tags ect. But I am slowly moving to Eclipse for other reasons. Is there a plugin that matches the JSP editor support found in Netbeans? - 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: Opinions on Struts code generator - A zipped version
Nice! Wow, hadn't seen that before, only knew of JasperReports.. Thanks for link Vic! Here are some screenshots (thanks Google) of NetDynamics, which will give you a feel for how it allowed a project to define datasources and pages: http://www.exa-corp.co.jp/aps/websolution/images/nd5Studio.gif http://developer.netscape.com/software/tools/listing/application/databas e/NetDynamics/nd_scr_1_small.gif (will need a magnifier for that one!) And, here are some visual interdev shots: http://msdn.microsoft.com/library/en-us/vidref98/html/vi54xk1.gif http://www.microsoft.com/mspress/books/sampchap/1607/vi52fd7x.gif And the VB-style of event navigation: http://msdn.microsoft.com/library/en-us/dncomg/html/vbscriptcom01.gif Put it all together and use J2EE and Struts as the foundation, and you have a worthy .Net adversary with excellence in engineering! James -Original Message- From: Vic Cekvenich [mailto:[EMAIL PROTECTED] Sent: Sunday, March 16, 2003 8:53 AM To: [EMAIL PROTECTED] Subject: Re: Opinions on Struts code generator - A zipped version Like this (but it's read only): http://ireport.sourceforge.net/images/screenshot6.gif It even has a wizzard from SQL. .V James Higginbotham wrote: Interesting.. How about taking this to the next level, which all struts generators have failed to do (except a BEA tool that requires you to buy into them): 1) Offer the ability to define the concept of a page, which has associated to it the action and an JSP page 2) Define the fields that will be managed within the JSP page, including the types of fields (text, textarea, drop down), datasources for drop downs, and validation rules 3) Allow the user to define events that occur when the user submits the page. This would include things like Save, Update, Delete, Create, Cancel, Next, Previous, etc. 4) Allow the user to select a custom event handler or a default one such as Cancel, which would have a wizard to allow the user to select the page it flows to and do any logic like strip out session beans if the action's form is session scoped 5) Optionally, you could extend the concept of the fields to allow them to be mapped to datasources, by which I mean an EJB, JDBC Datasource, etc. So, your tools allows for the definition of dataobjects, pages, and fields that are all tied together using some configuration file and optionally generated source. Note that some of this could be done with a state diagramming tool within the app, and some of it would be more event driven. What I'm proposing is something that operates like VB or Visual Interdev, and allows either rapid prototyping, rapid web tier integration, and rapid business tier integration. Add in a little NetDynamics for spice, and you have a really interesting tool that is beyond just code generation. I've been wanting to do this for several years but I've had 0 time to put into it. I've been hoping that someone else catches the vision and can help me run with it, as I firmly believe this is what is missing from J2EE and has rarely been filled in by code generators. My guess is that Eclipse or some other IDE would allow for the GUI of this tool to be built and integrated quickly, benefiting from the IDE's class parsing rules, Add new source capabilities, and other Java semantics that tend to slow tools down when they reach this point. Thoughts? James -Original Message- From: james logsdon [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 12, 2003 8:54 AM To: [EMAIL PROTECTED] Subject: Re: Opinions on Struts code generator - A zipped version Hopefully this works... From: Robert McIntosh [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Re: Opinions on Struts code generator Date: Tue, 11 Mar 2003 17:25:06 -0600 how about zipping it up? james logsdon wrote: I was not able to attach my pdf file. The mail server either said that it was too big or it just did not attach it. I created a group on yahoo and added the file there. It can be retrieved by following the link: http://groups.yahoo.com/group/quickStartCodeGenerator/files/ QuickStart .doc but if you do not have a yahoo id you will have to create one. Sorry for any inconvenience. James From: james logsdon [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Re: Opinions on Struts code generator Date: Tue, 11 Mar 2003 16:51:58 -0600 From: james logsdon [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Re: Opinions on Struts code generator Date: Tue, 11 Mar 2003 16:47:47 -0600 Let me try one more time... From: james logsdon [EMAIL
[OT]: Best Web designing Tool which supports HTML4.01
Hi everybody, Which tool is good for developing web pages. I am using struts architecture but I will be the on who will also doing web designing work and also programming. I have Dreamweaver , but it doesn't support many features like fieldset and legend Is there a very user friendly Tool which can help build web user interfaces. Help appreciated Thank you very much Vinay
RE: [Q] Accessing struts-tiles attribute in a bean?
Not sure of 'best' way to this but I think this may work: tiles:useAttribute name=booboo classname=java.lang.String / ... bean:message key=%=booboo% / Yes, I agree tiles is great - been looking at Velocity again just recently but I just don't think I could live without tiles now. There always seems to be more to discover with tiles and so many ways it can be extended to suit new requirements. H. -Original Message- From: Jeff Smith [mailto:[EMAIL PROTECTED] Sent: 16 March 2003 00:48 To: Struts Users Mailing List Subject: [Q] Accessing struts-tiles attribute in a bean? James and Dan turned me on to tiles. I love them - as I love any tool that simplifies what I was already doing via brute force. :-) I feel I'm on the verge of a new level of understanding, but sadly, haven't quite crossed over. In my tiles structure, I want to have my pages get their titles from the application resource. So I dutifully created a titleKey attribute in my tile-description.xml, like so: definition name=StandardLayout path=/Jsps/Templates/TemplateMain.jsp put name=titleKey value=some.resource.key/ put name=header value=/Jsps/Tiles/TileHeader.jsp/ put name=content value=/Jsps/Tiles/TileWelcome.jsp/ put name=menu value=/Jsps/Tiles/TileMenu.jsp/ /definition In my TemplateMain.jsp, I want to take that titleKey and look up the proper title string from my application resource file. But I can't figure out how to access the value of the titleKey attribute into the key field of the bean:message tag. Is this possible? One day a light will go on in my head, and I won't feel so confused by all this. :-) Jefficus - 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: design concern
I did *not* ask this question; you have misquoted me. David From: Dan Allen [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Re: design concern Date: Sat, 15 Mar 2003 19:51:50 -0600 David Graham ([EMAIL PROTECTED]) wrote: I have one design concern. In our project we have ejb's. Now in some modules i have only the some sql quries to be executed based on the user search condition. here where should i prepare the sql queries. should i create in Action class or session bean. You should create a search interface on your business layer that can take generic filters and will interpret them into actual business queries, whether they be XPath, SQL or some other data service. You can really do it however you like, either the simple route of creating overloaded methods called search() or a series of methods that talk about the filters you want to setup. Dan -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Daniel Allen, [EMAIL PROTECTED] http://www.mojavelinux.com/ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Real programmers don't change their wardrobe too often: there are no clothes stores that are open at two o'clock in the morning. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ The new MSN 8: smart spam protection and 2 months FREE* http://join.msn.com/?page=features/junkmail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: design concern
David Graham ([EMAIL PROTECTED]) wrote: I did *not* ask this question; you have misquoted me. Yikes! Sorry 'bout that, Dan's a bit tired this weekend. Dan -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Daniel Allen, [EMAIL PROTECTED] http://www.mojavelinux.com/ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Real programmers just hate to get up in the morning, and contrary to Ordinary People, they're in better shape as it gets closer to nighttime. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[NEWBIE]A very stupid question
I have my application under the context /xml-op/ In my struts-config.xml file, I define an action with the path=/Login Anyway, when I want to invoke the Login action as a forward, let's say by means of a ForwardAction action mapping, in my jsp page, as href I have to indicate the following: /xml-op/Login.do If I want to invoke the same action from within a form, then I have to omit the /xml-op/ prefix. Anyone of you does know why? TIA, Marco
RE: [NEWBIE]A very stupid question
How are you creating your link? Are you using the struts-html taglib or are you just using html? -Original Message- From: Marco Tedone [mailto:[EMAIL PROTECTED] Sent: Sunday, March 16, 2003 2:07 PM To: Struts-user-list Subject: [NEWBIE]A very stupid question I have my application under the context /xml-op/ In my struts-config.xml file, I define an action with the path=/Login Anyway, when I want to invoke the Login action as a forward, let's say by means of a ForwardAction action mapping, in my jsp page, as href I have to indicate the following: /xml-op/Login.do If I want to invoke the same action from within a form, then I have to omit the /xml-op/ prefix. Anyone of you does know why? TIA, Marco - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Validator Localization
I'm trying to localize validations where I have some fields that only appear in certain locales, and therefore only need to be validated under those locales. In Struts in Action, Ted talks about adding attributes to the form tag. But it looks like under the newer Commons Validator, the localization happens at the formset tag. Given the following validation.xml (abbreviated a bit - it's actually a lot larger than this): form-validation formset form name=infoContactForm field property=contactFName depends=required arg0 key=formFieldLabel.contactFName / /field /form /formset formset language=en country=UK form name=infoMailingListForm field property=mailingListPostcode depends=required, mask arg0 key=formFieldLabel.mailingListPostcode/ /field /form /formset formset language=en country=US form name=infoMailingListForm field property=mailingListZip depends=required, mask arg0 key=formFieldLabel.mailingListZip/ /field /form /formset /form-validation When I set the locale to en_UK or en_US, the Postcode or Zip fields do not get validated. The FName field always gets validated under any locale. What do I need to do to set up for and trigger the locale-specific validation to happen? Thanks much, Paul - Paul Hodgetts -- Principal Consultant Agile Logic -- www.agilelogic.com Consulting, Coaching, Training -- On-Site Out-Sourced Development Java, J2EE, C++, OOA/D -- Agile Methods/XP/Scrum, Use Cases, UI/IA - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: BeanUtils.copyProperties between from and DAO issues
On Sat, 15 Mar 2003, Khalid K. wrote: Date: Sat, 15 Mar 2003 13:21:01 -0800 From: Khalid K. [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Subject: RE: BeanUtils.copyProperties between from and DAO issues If this is the case, I would think that org.apache.commons.beanutils.BeanUtils should be modified to do String[] to int[] conversion ??? Thati s my 2 cents :) Khalid The set of supported conversions is extensible -- simply create your own String[] to int[] Converter and register it with ConvertUtils.register(). See the BeanUtils javadocs for more info: http://jakarta.apache.org/commons/beanutils/api/ Then, you can vastly increase the chance of this getting included in BeanUtils (and therefore in Struts) by submitting an enhancement request (against Commons Beanutils) and including your coinverter class as an attachment. Craig McClanahan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: BeanUtils.copyProperties between from and DAO issues
Hmmm ... looking in the BeanUtils javadocs, I see there's already an IntegerArrayConverter which turns a String[] into an int[]. Oh look! The author's name seems oddly familiar; anybody know some guy named Craig R. McClanahan? just-need-to-register-it-then-I-suppose-ly y'rs, +Mitchell -Original Message- From: Craig R. McClanahan [mailto:[EMAIL PROTECTED] Sent: Sunday, March 16, 2003 9:21 PM To: Struts Users Mailing List Subject: RE: BeanUtils.copyProperties between from and DAO issues On Sat, 15 Mar 2003, Khalid K. wrote: Date: Sat, 15 Mar 2003 13:21:01 -0800 From: Khalid K. [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Subject: RE: BeanUtils.copyProperties between from and DAO issues If this is the case, I would think that org.apache.commons.beanutils.BeanUtils should be modified to do String[] to int[] conversion ??? Thati s my 2 cents :) Khalid The set of supported conversions is extensible -- simply create your own String[] to int[] Converter and register it with ConvertUtils.register(). See the BeanUtils javadocs for more info: http://jakarta.apache.org/commons/beanutils/api/ Then, you can vastly increase the chance of this getting included in BeanUtils (and therefore in Struts) by submitting an enhancement request (against Commons Beanutils) and including your coinverter class as an attachment. Craig McClanahan - 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: [NEWBIE]A very stupid question
If you are creating a forward in struts config files or actions, you should ignore the context name completely and write url as /myAction.do. Struts takes care of the context path itself. If you are creating links simply in HTML then do something like: request.getContextPath() + /myAction.do Look at the link Tags examples in the example apps that come with struts. HTH. Affan - Original Message - From: Tony Tahbaz [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Monday, March 17, 2003 2:16 AM Subject: RE: [NEWBIE]A very stupid question How are you creating your link? Are you using the struts-html taglib or are you just using html? -Original Message- From: Marco Tedone [mailto:[EMAIL PROTECTED] Sent: Sunday, March 16, 2003 2:07 PM To: Struts-user-list Subject: [NEWBIE]A very stupid question I have my application under the context /xml-op/ In my struts-config.xml file, I define an action with the path=/Login Anyway, when I want to invoke the Login action as a forward, let's say by means of a ForwardAction action mapping, in my jsp page, as href I have to indicate the following: /xml-op/Login.do If I want to invoke the same action from within a form, then I have to omit the /xml-op/ prefix. Anyone of you does know why? TIA, Marco - 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: [NEWBIE]A very stupid question
Marco, You should use the html:link tag. Use the page instead of href. Page will prepend the correct context path for you. Html:rewrite does this as well so you can use that for linking to images and what not. Here is an example: html:link page=/Login.doLogin/html:link So what Struts will actually output would be: a href=/xml-op/Login.doLogin/a Given that xml-op is your context. Hth, Carl -Original Message- From: Tony Tahbaz [mailto:[EMAIL PROTECTED] Sent: Sunday, March 16, 2003 4:16 PM To: Struts Users Mailing List Subject: RE: [NEWBIE]A very stupid question How are you creating your link? Are you using the struts-html taglib or are you just using html? -Original Message- From: Marco Tedone [mailto:[EMAIL PROTECTED] Sent: Sunday, March 16, 2003 2:07 PM To: Struts-user-list Subject: [NEWBIE]A very stupid question I have my application under the context /xml-op/ In my struts-config.xml file, I define an action with the path=/Login Anyway, when I want to invoke the Login action as a forward, let's say by means of a ForwardAction action mapping, in my jsp page, as href I have to indicate the following: /xml-op/Login.do If I want to invoke the same action from within a form, then I have to omit the /xml-op/ prefix. Anyone of you does know why? TIA, Marco - 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: Validator Localization
In my original example, the form name should be the same in all the formsets. That was just a copy/paste error in the email, but thanks to the couple of folks that pointed that out to me by email. I still can't figure out how to get the validations for the locales to fire. I wrote: I'm trying to localize validations where I have some fields that only appear in certain locales, and therefore only need to be validated under those locales. In Struts in Action, Ted talks about adding attributes to the form tag. But it looks like under the newer Commons Validator, the localization happens at the formset tag. Given the following validation.xml (abbreviated a bit - it's actually a lot larger than this): form-validation formset form name=infoContactForm *** should be: infoMailingListForm *** field property=contactFName depends=required arg0 key=formFieldLabel.contactFName / /field /form /formset formset language=en country=UK form name=infoMailingListForm field property=mailingListPostcode depends=required, mask arg0 key=formFieldLabel.mailingListPostcode/ /field /form /formset formset language=en country=US form name=infoMailingListForm field property=mailingListZip depends=required, mask arg0 key=formFieldLabel.mailingListZip/ /field /form /formset /form-validation When I set the locale to en_UK or en_US, the Postcode or Zip fields do not get validated. The FName field always gets validated under any locale. What do I need to do to set up for and trigger the locale-specific validation to happen? Thanks much, Paul - Paul Hodgetts -- Principal Consultant Agile Logic -- www.agilelogic.com Consulting, Coaching, Training -- On-Site Out-Sourced Development Java, J2EE, C++, OOA/D -- Agile Methods/XP/Scrum, Use Cases, UI/IA - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: module name problem?
yes eddie, I tried it the same day and itr works to my happiness ;-) solved most of my problems. regards navjot singh - Original Message - From: Eddie Bush [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Sunday, March 16, 2003 7:16 AM Subject: Re: module name problem? | Have you tried it? It should work fine, AFAIK. I patched things some | time ago now to properly process which module is being requested. The | change was such that it would allow module names along the lines of what | you're asking about. | | If in doubt; try it. If it doesn't work (and I really think it should) | post again and ask for help. ... and remember: If you experience | problems with the tag libraries (or some other part of Struts) not | knowing which module you're in MAKE SURE YOU ARE CALLING YOUR PAGES WITH | AN ACTION. This is a very, very common problem for most folks. When | working with modules, it is imperative that you involve the controller | in the request (since it puts the configuration data for the requested | module in the request) -- failure to do so will make you feel like you | are stuck in the default module. | | Good Luck! | | Navjot Singh wrote: | | hi list, | | Is it necessary to have module name as config/mod1 | Can it be config/pre/mod1 ? | | Has anybody tried something like this before? | | Any answer is appreciated. | -Navjot Singh | | | -- | Eddie Bush | | | | | | - | 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: [Q] Accessing struts-tiles attribute in a bean?
Yeah, I'm exacly the same with Velocity. It is clean as a whistle, but I've gotta have my Tiles :) Scott Barr www.exergonic.com.au On Mon, 2003-03-17 at 04:49, Hue Holleran wrote: Not sure of 'best' way to this but I think this may work: tiles:useAttribute name=booboo classname=java.lang.String / ... bean:message key=%=booboo% / Yes, I agree tiles is great - been looking at Velocity again just recently but I just don't think I could live without tiles now. There always seems to be more to discover with tiles and so many ways it can be extended to suit new requirements. H. -Original Message- From: Jeff Smith [mailto:[EMAIL PROTECTED] Sent: 16 March 2003 00:48 To: Struts Users Mailing List Subject: [Q] Accessing struts-tiles attribute in a bean? James and Dan turned me on to tiles. I love them - as I love any tool that simplifies what I was already doing via brute force. :-) I feel I'm on the verge of a new level of understanding, but sadly, haven't quite crossed over. In my tiles structure, I want to have my pages get their titles from the application resource. So I dutifully created a titleKey attribute in my tile-description.xml, like so: definition name=StandardLayout path=/Jsps/Templates/TemplateMain.jsp put name=titleKey value=some.resource.key/ put name=header value=/Jsps/Tiles/TileHeader.jsp/ put name=content value=/Jsps/Tiles/TileWelcome.jsp/ put name=menu value=/Jsps/Tiles/TileMenu.jsp/ /definition In my TemplateMain.jsp, I want to take that titleKey and look up the proper title string from my application resource file. But I can't figure out how to access the value of the titleKey attribute into the key field of the bean:message tag. Is this possible? One day a light will go on in my head, and I won't feel so confused by all this. :-) Jefficus - 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] suggestion for getting properties
I have a model class for my company which has numbers. I would like to create a method like getNumbers() which returns all of the different phone numbers that are in the database as a collection. However, when I get them, I need to know which ones they are for display purposes (just a list of numbers won't do much good or else you end up calling a fax machine). I thought of using a HashMap like HashMap numbers = new HashMap(); numbers.put(phone, getPhone()); numbers.put(fax, getPhone()); etc. but then I realized that HashMaps screw up the order. I need to keep the order that I place them in the Hash so I can do c:forEach items=${company.numbers} var=number bean:message key=${number.key}/: c:out value=${number.value}/ /c:forEach I tried to implement a FifoMap but failed because I didn't know how to subclass Map.Entry POSSIBLE SOLUTION: I guess the solution would be to create a Bean for a Phone Number and then have getNumbers() return a Collection of phone number beans. Is that the best way or is a map still possible? Dan -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Daniel Allen, [EMAIL PROTECTED] http://www.mojavelinux.com/ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - I'm old enough to know better, but still too young to care. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Q] Accessing struts-tiles attribute in a bean?
Not sure of 'best' way to this but I think this may work: tiles:useAttribute name=booboo classname=java.lang.String / ... bean:message key=%=booboo% / ...or with bean-el you can do bean:message key=${booboo}/ I do this as well as tiles does not support localization just yet. However, it looks like it will be implemented in the future as there are several bugzilla reports on it. Conception would of course be to set key attribute in tiles. Dan -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Daniel Allen, [EMAIL PROTECTED] http://www.mojavelinux.com/ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - [Frodo]: I wish it need not have happened in my time. [Gandalf]: So do I, and so do all who live to see such times. But that is not for them to decide. All we have to decide is what we do with the time that is given to us.' - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
test
ff - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Loading complex forms with Struts.
Thanks for that Kevin. That's pretty much what I came up with as well. The only addition I am making is that, to make sure all of the additional selection information is grouped correctly, and to keep away from multiple forms is to use the x.y.z naming method to reference every thing, so: A subsystem check box will just have the name of the subsystem (They ar all unique), the timestamp selection for each subsytem will have the name subsytem.timestamp, and then the siganls will be subsystem.signalname, as all signal names within a sub system will be unique as well. With this aproach, I can have just one VO helper, and then this can load a selection of subsytem VOs prior to passing them deeper into the business logic or out to the view. Cheers, and thanks again for the comment, Simon - Original Message - From: Kevin Williams [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Friday, March 14, 2003 5:56 PM Subject: Re: Loading complex forms with Struts. Simon, What I've done (and I haven't tested it yet since I'm still coding supporting stuff so I'm not sure if it works) is to have an array property within my form bean. This would hold the id's for the selected subsystem. Within your jsp page, make sure all the checkboxes have the same name, and it should populate that array with the same name as the checkboxes in your form bean. I'm hoping this works for me! Kevin On Thu, 2003-03-13 at 23:39, Simon Kelly wrote: Hi all, I have a form within a page that I need struts to populate in a specific manner. The data selection within the page is as follows: A variable number of subsystems, that can be independently selected. Each subsystem has a time selection (single) and signal selection (one to many). I need the data loaded into two beans, one for the Subsystem: String name; String time; List signals; And then one to hold all the subsystems: List subsystems; 1) I need to know if [OT] this can be written in html? 2) Can struts handle loading form beans in this manner? Any help will, as always, be met with glowing praise and no money :-) Cheers Simon Institut fuer Prozessdatenverarbeitung und Elektronik, Forschungszentrum Karlsruhe GmbH, Postfach 3640, D-76021 Karlsruhe, Germany. Tel: (+49)/7247 82-4042 E-mail : [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
ServletException: Cannot find bean element in scope null
I'm getting an exception [ServletException: Cannot find bean element in scope null] when I try to access form data from a jsp page. I've got the following code in my action class: public final class ContractsSearchAction extends ContractBaseAction { public ActionForward perform( ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) { ContractForm workForm = (ContractForm)form; ContractsSearchCommand cmd = new ContractsSearchCommand(); // Would do some setting here for criteria from workForm cmd.execute(); ContractListForm outForm = new ContractListForm(); outForm.setContracts(cmd.getContracts()); request.setAttribute(contractListForm, outForm); return (mapping.findForward(results)); } } The JSP page it goes to has the following: logic:iterate id=element name=contractListForm property=contracts type=data.ContractBDO tr td bean:write name=element property=fullName/ /td td class=button html:form action=contract_select.do name=contractForm type=view.ContractForm html:hidden name=element property=id/ html:submit value=Edit/ /html:form /td /tr /logic:iterate The exception is: javax.servlet.ServletException: Cannot find bean element in scope null at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:530) at org.apache.jsp.contracts_list_jsp._jspService(contracts_list_jsp.java:71) ... and so on What am I doing wrong here? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: test
ffu2 -Original Message- From: Niket Anand [mailto:[EMAIL PROTECTED] Sent: Monday, 17 March 2003 15:40 To: Struts Users Mailing List Subject: test ff - 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]