how do I mix modules and tiles ?
I have made two test project's, one where I use modules and one where I use tiles. And they both work fin. Now for my prodution project I what to mix the two. But I dont what to use a tiles-def.xml for each modul. I what to make a head modul, that contains a header tile, a bottom tile, a center tile and a welcome page. The header tile will be made up of links to sub modules. The header and bottom tile is the same on all page in the project. The submodules, then have to fill in the center tile. Is there a way to control the rest of me sub modules in me head modul? This must be a classic way of doing things. But I cant seem to find a good how-to one mixing the two. Can anybody point me in the right direction? Best Regards /marc - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: ActionForm key in request/session
Frank W. Zammetti wrote: Alternatively, you could use the Commons Servlet packages' getRequestParameter(), getRequestHeaders() and getRequestAttributes() methods of the RequestUtils class, and if you need it there is also a getSessionAttributes() method in SessionUtils (I know because I added all four!) http://svn.apache.org/viewcvs.cgi/jakarta/commons/sandbox/servlet/ I think I'm probably missing something here, but it looks like this takes the parameters or attributes of the request and puts them into a hash. Is this just to decouple it from the ServletRequest? For parameters, at least, isn't there already a method that returns the map? Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Use of Javascript [was] Re: AJAX: Whoa, Nellie!
Jesse Alexander (KBSA 21) wrote the following on 4/19/2005 5:30 AM: I also think that a well-designed web-UI does not need JS at all... Sorry to jump on the train late, but the above is completely BS. If you want to use standard HTML, then there will be some things you will HAVE to do with Javascript or else without its use, just the opposite would be true, you'd have a totally CRAPPY-designed UI. I'll give you an example. In quick summary, this application has to have the user select various checkboxes in a tree-list structure and as they select various checkboxes different lines need to change color (turn to gray for example to show that inheritance is implied). Not only that, but based on whether a certain checkbox is selected in a row a date div box needs to become enabled and visible. The bottom line is if you do not use javascript you'd have to go to the server for everything creating a completely unsatisfactory user experience. The users should be able to click all over the place without having to wait for the server to respond each time. Even if you wanted to go to the server for every single possible checkbox click, how could you even do that without some javascript? Tell me how you can design a good UI that does not involve javascript for this application (other than saying use Flash or some other font end presentation). Bottom line is any somewhat complex UI for a company will have to involve the use of some javascript. If you disgree than I'll send screen shots of various internal applications I have to code and you tell me how you can get around not using Javascript? I could just look around on the web and give examples where you'd need javascript. Think of cases where on a form you select one option from a drop down and the other list needs to change. Even if you go to the server to repopulate the other list (which I like to do), it still requires and onChange event on the initial drop down list to fire off the submit. How do you do this without javascript? - create a walk-through UI design? That would be completely unacceptable under a lot of circumstances. -- Rick - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: ActionForm key in request/session
Fair point, at least as far as params go :) I never noticed the getParameterMap() method to be honest. The methods in RequestUtils (and the one in SessionUtils) came from the fact that during debugging I (and I think most of us) have a need to easily see what's coming in with a request. So, I wind up doing the following in Actions and/or JSPs with these methods: log.debug(RequestUtils.getAllRequestInfo(request)); (getAllRequestInfo calls the other three methods to get parameters, attributes and headers). It's certainly not rocket science or anything, I certainly never claimed these functions were the savior of the world or anything :) but it's a nice and easy way to see what's going on (I do my development in Tomcat, so I simply glance over to my second monitor in the console window to see the output in real-time). -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com On Mon, May 2, 2005 10:37 am, Dave Newton said: Frank W. Zammetti wrote: Alternatively, you could use the Commons Servlet packages' getRequestParameter(), getRequestHeaders() and getRequestAttributes() methods of the RequestUtils class, and if you need it there is also a getSessionAttributes() method in SessionUtils (I know because I added all four!) http://svn.apache.org/viewcvs.cgi/jakarta/commons/sandbox/servlet/ I think I'm probably missing something here, but it looks like this takes the parameters or attributes of the request and puts them into a hash. Is this just to decouple it from the ServletRequest? For parameters, at least, isn't there already a method that returns the map? Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: ActionForm key in request/session
Frank W. Zammetti wrote: Fair point, at least as far as params go :) I never noticed the getParameterMap() method to be honest. The wonders of an API larger than... well, something Really Big. I didn't know it was there either until today when I thought to myself nobody's ever written that before?! It's certainly not rocket science or anything, I certainly never claimed these functions were the savior of the world or anything :) But if it was... that'd be neat. Although I think the odds of anything world-saving being written in Java are minimal ;) but it's a nice and easy way to see what's going on (I do my development in Tomcat, so I simply glance over to my second monitor in the console window to see the output in real-time). Gotcha; that's handy. Being a tail -f kind of guy myself I enjoy console-related debugging :D Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Use of Javascript [was] Re: AJAX: Whoa, Nellie!
I liked the smartclient technology very much! It's great! Just wondering if there will be a similar possibility in Java Server Faces? Can I combine the capabilities of JSF and AJAX ? RR Jesse Alexander (KBSA 21) wrote the following on 4/19/2005 5:30 AM: I also think that a well-designed web-UI does not need JS at all... RR Sorry to jump on the train late, but the above is completely BS. If you RR want to use standard HTML, then there will be some things you will HAVE RR to do with Javascript or else without its use, just the opposite would RR be true, you'd have a totally CRAPPY-designed UI. RR I'll give you an example. In quick summary, this application has to have RR the user select various checkboxes in a tree-list structure and as they RR select various checkboxes different lines need to change color (turn to RR gray for example to show that inheritance is implied). Not only that, RR but based on whether a certain checkbox is selected in a row a date div RR box needs to become enabled and visible. The bottom line is if you do RR not use javascript you'd have to go to the server for everything RR creating a completely unsatisfactory user experience. The users should RR be able to click all over the place without having to wait for the RR server to respond each time. Even if you wanted to go to the server for RR every single possible checkbox click, how could you even do that without RR some javascript? Tell me how you can design a good UI that does not RR involve javascript for this application (other than saying use Flash or RR some other font end presentation). Bottom line is any somewhat complex RR UI for a company will have to involve the use of some javascript. RR If you disgree than I'll send screen shots of various internal RR applications I have to code and you tell me how you can get around not RR using Javascript? I could just look around on the web and give examples RR where you'd need javascript. Think of cases where on a form you select RR one option from a drop down and the other list needs to change. Even if RR you go to the server to repopulate the other list (which I like to do), RR it still requires and onChange event on the initial drop down list to RR fire off the submit. How do you do this without javascript? - create a RR walk-through UI design? That would be completely unacceptable under a RR lot of circumstances. -- regards, Sergey mailto:[EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [OT] Survey - Tell me what you think about Struts.
I addressed the stuffing up of any useful CVS functionality by using Jalopy source code formatter. http://jalopy.sourceforge.net. The key is for someone to specify the source code formatting rules, usually the defaults are close enough for most. Jalopy provides export functionality, so all you have to do is export the settings and distribute the export file to all of your developers. Run Jalopy on the files before you commit them to CVS and your problem is resolved. Brian Barnett -Original Message- From: Adam Hardy [mailto:[EMAIL PROTECTED] Sent: Sunday, May 01, 2005 2:28 PM To: Struts Users Mailing List Subject: Re: [OT] Survey - Tell me what you think about Struts. On 01/05/05 13:13nbsp;Simon Chappell wrote: What is it that bugs you the most about development with Struts? Trying to work with the struts-config.xml without a dedicated editor. I have a small, three actions, project that I'm tinkering with and I figured that it was small enough that I didn't need to worry and I could just edit struts-config.xml using a text editor. Ouch. Dedicated editors are a bane for me. The fact that they automatically format the whole file according to their xml whitespace, indenting and new line rules means that every line can change when a 2nd developer edits the file, which really stuffs up any useful CVS functionality. My biggest issue with struts is the large number of obtuse servlet exceptions or plain empty pages that newbies can cause by doing something wrong. Linked to that is the large amount of definitions in xml where the correctness is uncheckable until runtime. One silly typo and I have to compile, deploy, restart and navigate into the app to check it works. Perhaps there's some junit testing I should be doing to check it all in one click, but I haven't worked it out yet. Adam - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This email may contain confidential material. If you were not an intended recipient, Please notify the sender and delete all copies. We may monitor email to and from our network. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: ANOTHER IDE
This might not be in the free realm, but give JBuilder 2005 a try... On 5/2/05, Rafael Taboada [EMAIL PROTECTED] wrote: Hi folks... I'm using NetBeans as IDE. But i want to know if there is another powerful IDE that supports working with struts... Netbeans can do ant build for me. Is there another powerful IDE? or better?? thanks for ur cooperation -- Rafael Taboada - 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: ANOTHER IDE
I like Eclipse with MyEclipse. MyEclips is a $30 per year subscription, but well worth it. Lee On 5/2/05, Rafael Taboada [EMAIL PROTECTED] wrote: Hi folks... I'm using NetBeans as IDE. But i want to know if there is another powerful IDE that supports working with struts... Netbeans can do ant build for me. Is there another powerful IDE? or better?? thanks for ur cooperation -- Rafael Taboada - 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: ANOTHER IDE
Hi Any idea if I can download TOgetherJ for free? -Original Message- From: Folashade Adeyosoye [mailto:[EMAIL PROTECTED] Sent: Monday, May 02, 2005 10:29 AM To: Struts Users Mailing List; Rafael Taboada Subject: Re: ANOTHER IDE This might not be in the free realm, but give JBuilder 2005 a try... On 5/2/05, Rafael Taboada [EMAIL PROTECTED] wrote: Hi folks... I'm using NetBeans as IDE. But i want to know if there is another powerful IDE that supports working with struts... Netbeans can do ant build for me. Is there another powerful IDE? or better?? thanks for ur cooperation -- Rafael Taboada - 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 Disclaimer- This e-mail message is intended only for the use of the individual or entity to which it is addressed, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the intended recipient, any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately by reply email to [EMAIL PROTECTED] and delete or destroy all copies of the original message and attachments thereto. Email sent to or from the Principal Financial Group or any of its member companies may be retained as required by law or regulation. Nothing in this message is intended to constitute an Electronic signature for purposes of the Uniform Electronic Transactions Act (UETA) or the Electronic Signatures in Global and National Commerce Act (E-Sign) unless a specific statement to the contrary is included in this message. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Setting focus on invalid form submission
Relatively new to the list, so I apologize if this has already been submitted. I am wondering if there is a way to set the focus after a form has been validated through Struts and deemed invalid? Currently, focus always goes to the first form element. Is there not a way to make this go to the first INVALID form element? Thanks for any help. -- Randy Kennedy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts with PHP
hmm, good question, but i would not think so, one system developed in struts can call a PHP and vise-visa, but i dont think they can be intergrated. 1. PHP has a diff processor compared to java/jsp/struts On 5/2/05, Rafael Taboada [EMAIL PROTECTED] wrote: Hi folks... I'm working right now with PHP... Is it possible to combine PHP with struts? I mean, instead to JSP, use PHP. thanks -- Rafael Taboada - 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 with PHP
Actually, while I don't know much about PHP, I would say it *better* be possible :) Struts is, by and large, the C in MVC (some parts arguably cross boundaries, but as a generality...), so if I can't swap in a different M and V, there's probably something wrong. I think it's probably a given that you aren't going to be able to use the Struts taglibs on a PHP page, so some of the automatic functions of Struts won't be available, but at the end of the day I should be able to forward to a PHP page and have it work, even if I have to do more manual labor to get values into fields and such. At least, I would be expecting that to be possible. -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com On Mon, May 2, 2005 12:05 pm, Folashade Adeyosoye said: hmm, good question, but i would not think so, one system developed in struts can call a PHP and vise-visa, but i dont think they can be intergrated. 1. PHP has a diff processor compared to java/jsp/struts On 5/2/05, Rafael Taboada [EMAIL PROTECTED] wrote: Hi folks... I'm working right now with PHP... Is it possible to combine PHP with struts? I mean, instead to JSP, use PHP. thanks -- Rafael Taboada - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts with PHP
On 5/2/05, Rafael Taboada [EMAIL PROTECTED] wrote: Hi folks... I'm working right now with PHP... Is it possible to combine PHP with struts? I mean, instead to JSP, use PHP. Folashade Adeyosoye a écrit : hmm, good question, but i would not think so, one system developed in struts can call a PHP and vise-visa, but i dont think they can be intergrated. 1. PHP has a diff processor compared to java/jsp/struts thanks Well, I'm not saying this is possible either... But after all, people manage to do Struts + XML/XSLT without JSP. So why not with PHP ? -- Stéphane Zuckerman - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[OT] Sun RI JSF 1.1 VS myfaces 1.09
All, Just wondering if anyone has used both and prefer one over the other. If so, why? Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts with PHP
Well, I'm not saying this is possible either... But after all, people manage to do Struts + XML/XSLT without JSP. So why not with PHP ? Yes, by generating XML out of the action or jsp, and adding an XSLT transformer. How do you want to share any variables with a php script? And, after all, why should you want it at all? Leon. P.S. I think we should forget this thread asap :-) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Struts with PHP
I don't see how you would be able to forward to a PHP page and have all the fields work, one thing to consider is they do not share the same session. Struts is a java framework, that has jar files etc, a PHP server would not know what to do with them. -Original Message- From: Frank W. Zammetti [mailto:[EMAIL PROTECTED] Sent: Monday, May 02, 2005 12:10 PM To: Folashade Adeyosoye Cc: Struts Users Mailing List; Rafael Taboada Subject: Re: Struts with PHP Actually, while I don't know much about PHP, I would say it *better* be possible :) Struts is, by and large, the C in MVC (some parts arguably cross boundaries, but as a generality...), so if I can't swap in a different M and V, there's probably something wrong. I think it's probably a given that you aren't going to be able to use the Struts taglibs on a PHP page, so some of the automatic functions of Struts won't be available, but at the end of the day I should be able to forward to a PHP page and have it work, even if I have to do more manual labor to get values into fields and such. At least, I would be expecting that to be possible. -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com On Mon, May 2, 2005 12:05 pm, Folashade Adeyosoye said: hmm, good question, but i would not think so, one system developed in struts can call a PHP and vise-visa, but i dont think they can be intergrated. 1. PHP has a diff processor compared to java/jsp/struts On 5/2/05, Rafael Taboada [EMAIL PROTECTED] wrote: Hi folks... I'm working right now with PHP... Is it possible to combine PHP with struts? I mean, instead to JSP, use PHP. thanks -- Rafael Taboada - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Struts with PHP
http://www.phpmvc.net/ is a php port of struts just info. Not used or tested it. Kris. -Oorspronkelijk bericht- Van: Rafael Taboada [mailto:[EMAIL PROTECTED] Verzonden: maandag 2 mei 2005 17:59 Aan: Struts List Onderwerp: Struts with PHP Hi folks... I'm working right now with PHP... Is it possible to combine PHP with struts? I mean, instead to JSP, use PHP. thanks -- Rafael Taboada - 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 with PHP
Because they are Oranges and Apples... XML/XSLT are mainly file/processors that produces HTML that are universally recognized by almost all servers. -Original Message- From: Stéphane Zuckerman [mailto:[EMAIL PROTECTED] Sent: Monday, May 02, 2005 12:19 PM To: Struts Users Mailing List Subject: Re: Struts with PHP On 5/2/05, Rafael Taboada [EMAIL PROTECTED] wrote: Hi folks... I'm working right now with PHP... Is it possible to combine PHP with struts? I mean, instead to JSP, use PHP. Folashade Adeyosoye a écrit : hmm, good question, but i would not think so, one system developed in struts can call a PHP and vise-visa, but i dont think they can be intergrated. 1. PHP has a diff processor compared to java/jsp/struts thanks Well, I'm not saying this is possible either... But after all, people manage to do Struts + XML/XSLT without JSP. So why not with PHP ? -- Stéphane Zuckerman - 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 with PHP
I presume one can get at the parameters, attributes and headers of the request object in a PHP script, no? As long as you can do that, then you should be able to replace JSP pages with PHP pages, sans the taglibs of course, which, as some people seem to forget, are an OPTIONAL element of Struts :) because you can get at anything Struts sends to a JSP. Now, as for the *why* you'd want to use PHP instead of JSP, I think that's a fair question :) -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com On Mon, May 2, 2005 12:22 pm, Leon Rosenberg said: Well, I'm not saying this is possible either... But after all, people manage to do Struts + XML/XSLT without JSP. So why not with PHP ? Yes, by generating XML out of the action or jsp, and adding an XSLT transformer. How do you want to share any variables with a php script? And, after all, why should you want it at all? Leon. P.S. I think we should forget this thread asap :-) - 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 with PHP
Yeah, you raise a fair point, maybe I didn't think it through enough... I'm not sure how much session really matters, but I think request does... I mean, I have an HttpServletRequest object that I populate in an Action, and let's assume I can forward that to a PHP page, it's still a Java object. Yeah, I'm starting to scream D'oh! in my head right now... -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com On Mon, May 2, 2005 12:27 pm, Folashade Adeyosoye said: I don't see how you would be able to forward to a PHP page and have all the fields work, one thing to consider is they do not share the same session. Struts is a java framework, that has jar files etc, a PHP server would not know what to do with them. -Original Message- From: Frank W. Zammetti [mailto:[EMAIL PROTECTED] Sent: Monday, May 02, 2005 12:10 PM To: Folashade Adeyosoye Cc: Struts Users Mailing List; Rafael Taboada Subject: Re: Struts with PHP Actually, while I don't know much about PHP, I would say it *better* be possible :) Struts is, by and large, the C in MVC (some parts arguably cross boundaries, but as a generality...), so if I can't swap in a different M and V, there's probably something wrong. I think it's probably a given that you aren't going to be able to use the Struts taglibs on a PHP page, so some of the automatic functions of Struts won't be available, but at the end of the day I should be able to forward to a PHP page and have it work, even if I have to do more manual labor to get values into fields and such. At least, I would be expecting that to be possible. -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com On Mon, May 2, 2005 12:05 pm, Folashade Adeyosoye said: hmm, good question, but i would not think so, one system developed in struts can call a PHP and vise-visa, but i dont think they can be intergrated. 1. PHP has a diff processor compared to java/jsp/struts On 5/2/05, Rafael Taboada [EMAIL PROTECTED] wrote: Hi folks... I'm working right now with PHP... Is it possible to combine PHP with struts? I mean, instead to JSP, use PHP. thanks -- Rafael Taboada - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Struts with PHP
you can get parameters and headers (as they are part of http and included in the http request), but no chance to get attributes, they only exist in the virtual machine. -Original Message- From: Frank W. Zammetti [mailto:[EMAIL PROTECTED] Sent: Monday, May 02, 2005 6:30 PM To: Struts Users Mailing List Cc: Struts Users Mailing List Subject: Re: Struts with PHP I presume one can get at the parameters, attributes and headers of the request object in a PHP script, no? As long as you can do that, then you should be able to replace JSP pages with PHP pages, sans the taglibs of course, which, as some people seem to forget, are an OPTIONAL element of Struts :) because you can get at anything Struts sends to a JSP. Now, as for the *why* you'd want to use PHP instead of JSP, I think that's a fair question :) -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com On Mon, May 2, 2005 12:22 pm, Leon Rosenberg said: Well, I'm not saying this is possible either... But after all, people manage to do Struts + XML/XSLT without JSP. So why not with PHP ? Yes, by generating XML out of the action or jsp, and adding an XSLT transformer. How do you want to share any variables with a php script? And, after all, why should you want it at all? Leon. P.S. I think we should forget this thread asap :-) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Struts with PHP
Am assuming here that there is some sort of Servlets container or application server that runs Java/Struts and there is another PHP server all running on the same machine/box. Please explain how both containers would manage ONE session when a user logs in and pass/manage information between each other :) -Original Message- From: Frank W. Zammetti [mailto:[EMAIL PROTECTED] Sent: Monday, May 02, 2005 12:30 PM To: Struts Users Mailing List Cc: Struts Users Mailing List Subject: Re: Struts with PHP I presume one can get at the parameters, attributes and headers of the request object in a PHP script, no? As long as you can do that, then you should be able to replace JSP pages with PHP pages, sans the taglibs of course, which, as some people seem to forget, are an OPTIONAL element of Struts :) because you can get at anything Struts sends to a JSP. Now, as for the *why* you'd want to use PHP instead of JSP, I think that's a fair question :) -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com On Mon, May 2, 2005 12:22 pm, Leon Rosenberg said: Well, I'm not saying this is possible either... But after all, people manage to do Struts + XML/XSLT without JSP. So why not with PHP ? Yes, by generating XML out of the action or jsp, and adding an XSLT transformer. How do you want to share any variables with a php script? And, after all, why should you want it at all? Leon. P.S. I think we should forget this thread asap :-) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Struts with PHP
Completely not what is been discussed. Php.mvc is a framework on its own, doing what struts does, not interaction between PHP and Struts. -Original Message- From: Kris Barnhoorn [mailto:[EMAIL PROTECTED] Sent: Monday, May 02, 2005 12:28 PM To: 'Struts Users Mailing List'; 'Rafael Taboada' Subject: RE: Struts with PHP http://www.phpmvc.net/ is a php port of struts just info. Not used or tested it. Kris. -Oorspronkelijk bericht- Van: Rafael Taboada [mailto:[EMAIL PROTECTED] Verzonden: maandag 2 mei 2005 17:59 Aan: Struts List Onderwerp: Struts with PHP Hi folks... I'm working right now with PHP... Is it possible to combine PHP with struts? I mean, instead to JSP, use PHP. thanks -- Rafael Taboada - 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: Use of Javascript [was] Re: AJAX: Whoa, Nellie!
On 5/2/05, Sergey Livanov [EMAIL PROTECTED] wrote: I liked the smartclient technology very much! It's great! Just wondering if there will be a similar possibility in Java Server Faces? Can I combine the capabilities of JSF and AJAX ? Yes. The general idea is that you encapsulate the creation of your Javascript and template code (or links to corresponding resource files) into a JavaServer Faces component, which the developer can incorporate on their page just like any other component. On the client side, the rendered code would do XmlHttpRequest transactions with the host, using whatever your favorite binding technology is (dojo, dwr, ...). I know of several commercial libraries that already do this sort of thing (jsfcentral.com is a good starting place for pointers). Craig - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts with PHP
At 6:18 PM +0200 5/2/05, Stéphane Zuckerman wrote: On 5/2/05, Rafael Taboada [EMAIL PROTECTED] wrote: Hi folks... I'm working right now with PHP... Is it possible to combine PHP with struts? I mean, instead to JSP, use PHP. Folashade Adeyosoye a écrit : hmm, good question, but i would not think so, one system developed in struts can call a PHP and vise-visa, but i dont think they can be intergrated. 1. PHP has a diff processor compared to java/jsp/struts thanks Well, I'm not saying this is possible either... But after all, people manage to do Struts + XML/XSLT without JSP. So why not with PHP ? Is there a Java PHP interpreter yet? If not, how would the PHP environment have access to the request, session, and application context? I know there's a JSR for scripting in Java which has a strong PHP focus -- but I don't think it's done yet. Joe -- Joe Germuska [EMAIL PROTECTED] http://blog.germuska.com Narrow minds are weapons made for mass destruction -The Ex - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts with PHP
Leon Rosenberg wrote: Well, I'm not saying this is possible either... But after all, people manage to do Struts + XML/XSLT without JSP. So why not with PHP ? Yes, by generating XML out of the action or jsp, and adding an XSLT transformer. How do you want to share any variables with a php script? I'd stick 'em in the request or make a PHP add-on that could snarf 'em somehow. Or use SiteMesh. P.S. I think we should forget this thread asap :-) I've been working on a Struts/COBOL bridge for some time now due to the inherent clarity of COBOL code. It's much easier to write the logic in a pure Business Side langage. Dave I said 'Business Side' for a reason Newton
Re: Struts with PHP
Frank W. Zammetti wrote: Yeah, you raise a fair point, maybe I didn't think it through enough... I'm not sure how much session really matters, but I think request does... I mean, I have an HttpServletRequest object that I populate in an Action, and let's assume I can forward that to a PHP page, it's still a Java object. Yeah, I'm starting to scream D'oh! in my head right now... I don't think it's as bad as all that, unfortunately. Obviously the parameters/attributes/etc. in the session and request could be marshalled into an object/xml/blob that PHP could understand; there are some useful utilities in the sandbox made just for that purpose ;) Session tracking is trivial, just use the session ID from the java side and keep a hash on the PHP side that uses the same ID (I do something similar with Lisp using Lisplets). The easiest way, of course, would be to write jPHP and have phpServlet and phpTags so you could have both PHP-only presentation but still allow mixing of PHP code via phpScriptlets in your existing JSP/Velocity/FreeMarker pages. Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts with PHP
On 5/2/05, Rafael Taboada [EMAIL PROTECTED] wrote: Hi folks... I'm working right now with PHP... Is it possible to combine PHP with struts? I mean, instead to JSP, use PHP. For reasons discussed by several people in this thread, information sharing between the Java logic and the PHP logic can be a challenge. One technology to keep your eye on, however, is JSR 223: Scripting for the Java Platform, where the spec is currently in public review: http://jcp.org/en/jsr/detai?id=223 The objectives of this JSR include the ability to connect the object models of a scripting language (with PHP being an obvious target) and a Java virtual machine. Servlet containers make a natural place to integrate this sort of functinality. Craig - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts with PHP
Oh great, now all those out-of-work COBOL programmers are going to be useful again, making it even MORE difficult for us Java guys to find work! Thanks a lot Dave! LOL ;) -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com On Mon, May 2, 2005 12:48 pm, Dave Newton said: Leon Rosenberg wrote: Well, I'm not saying this is possible either... But after all, people manage to do Struts + XML/XSLT without JSP. So why not with PHP ? Yes, by generating XML out of the action or jsp, and adding an XSLT transformer. How do you want to share any variables with a php script? I'd stick 'em in the request or make a PHP add-on that could snarf 'em somehow. Or use SiteMesh. P.S. I think we should forget this thread asap :-) I've been working on a Struts/COBOL bridge for some time now due to the inherent clarity of COBOL code. It's much easier to write the logic in a pure Business Side langage. Dave I said 'Business Side' for a reason Newton - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Struts with PHP
You know boys and girls, this just goes to show... DO NOT stick your nose in a conversation that you don't have enough knowledge to contribute intelligently to :) As I said in my first post, I don't have much experience with PHP... I made some incorrect assumptions about it and how it works, and thus my reply was, as it turns out, pretty dumb, to be blunt. I now bow out as graciously as I can after making myself look like a fool :) -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com On Mon, May 2, 2005 12:35 pm, Folashade Adeyosoye said: Am assuming here that there is some sort of Servlets container or application server that runs Java/Struts and there is another PHP server all running on the same machine/box. Please explain how both containers would manage ONE session when a user logs in and pass/manage information between each other :) -Original Message- From: Frank W. Zammetti [mailto:[EMAIL PROTECTED] Sent: Monday, May 02, 2005 12:30 PM To: Struts Users Mailing List Cc: Struts Users Mailing List Subject: Re: Struts with PHP I presume one can get at the parameters, attributes and headers of the request object in a PHP script, no? As long as you can do that, then you should be able to replace JSP pages with PHP pages, sans the taglibs of course, which, as some people seem to forget, are an OPTIONAL element of Struts :) because you can get at anything Struts sends to a JSP. Now, as for the *why* you'd want to use PHP instead of JSP, I think that's a fair question :) -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com On Mon, May 2, 2005 12:22 pm, Leon Rosenberg said: Well, I'm not saying this is possible either... But after all, people manage to do Struts + XML/XSLT without JSP. So why not with PHP ? Yes, by generating XML out of the action or jsp, and adding an XSLT transformer. How do you want to share any variables with a php script? And, after all, why should you want it at all? Leon. P.S. I think we should forget this thread asap :-) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts with PHP
Craig McClanahan wrote: http://jcp.org/en/jsr/detai?id=223 The objectives of this JSR include the ability to connect the object models of a scripting language (with PHP being an obvious target) and a Java virtual machine. Servlet containers make a natural place to integrate this sort of functinality. It should be with Zend being in the Initial Export Group and MySQL in support. regards, Robin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts with PHP
There is also another project that can help: http://www.mojavelinux.com/projects/studs/ Be aware that this is a reimplementation of Struts in PHP. Also it is possible from PHP to invoke Java code, or even open a socket connection and do some kind of marshalling; but I think that is much more complicated than using existing presentation technologies as JSP or Tapestry. My two cents. _ Do You Yahoo!? La mejor conexión a internet y 25MB extra a tu correo por $100 al mes. http://net.yahoo.com.mx - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
ajax proj
Frank, Where can I find ajaxsample.war ? -- , Sergey mailto:[EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: ajax proj
Because of some technical difficulties that are being worked on (not with AjaxTags itself though), there is no official download available yet, of the updated taglib or the sample app. You would get it in exploded format as well, but that's probably not a big deal to anyone. If you want to play with it you will have to get it through CVS. All the code for both the sample app and the taglibs themselves are there, just grab the entire ajaxtags module. You will need to build it using the Ant script included (no options or anything, just run ant in web-inf/src and it should work). Just copy the whole ajaxtags directory to your app server of choice and it should (in theory) work. -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com On Mon, May 2, 2005 1:28 pm, Sergey Livanov said: Frank, Where can I find ajaxsample.war ? -- Ñ óâàæåíèåì, Sergey mailto:[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: ajax proj
Thanks for your Ajax/Struts PDF Frank. Reading it right now. Good stuff. Frank W. Zammetti wrote the following on 5/2/2005 1:40 PM: Because of some technical difficulties that are being worked on (not with AjaxTags itself though), there is no official download available yet, of the updated taglib or the sample app. You would get it in exploded format as well, but that's probably not a big deal to anyone. If you want to play with it you will have to get it through CVS. All the code for both the sample app and the taglibs themselves are there, just grab the entire ajaxtags module. You will need to build it using the Ant script included (no options or anything, just run ant in web-inf/src and it should work). Just copy the whole ajaxtags directory to your app server of choice and it should (in theory) work. -- Rick - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: ajax proj
Glad your enjoying it Rick! I hope you find something useful in it too. :) -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com On Mon, May 2, 2005 2:00 pm, Rick Reumann said: Thanks for your Ajax/Struts PDF Frank. Reading it right now. Good stuff. Frank W. Zammetti wrote the following on 5/2/2005 1:40 PM: Because of some technical difficulties that are being worked on (not with AjaxTags itself though), there is no official download available yet, of the updated taglib or the sample app. You would get it in exploded format as well, but that's probably not a big deal to anyone. If you want to play with it you will have to get it through CVS. All the code for both the sample app and the taglibs themselves are there, just grab the entire ajaxtags module. You will need to build it using the Ant script included (no options or anything, just run ant in web-inf/src and it should work). Just copy the whole ajaxtags directory to your app server of choice and it should (in theory) work. -- Rick - 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: Setting focus on invalid form submission
I think this would have to be done with Javascript. And it might be a bit tricky determining what the first invalid element was. I think it would involve setting javascript variables and then looping through the page looking for the first one with an error. Unless there's a way to do it with the new errorStyle properties. Brady Relatively new to the list, so I apologize if this has already been submitted. I am wondering if there is a way to set the focus after a form has been validated through Struts and deemed invalid? Currently, focus always goes to the first form element. Is there not a way to make this go to the first INVALID form element? Thanks for any help. -- Randy Kennedy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Brady Hegberg [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: ajax proj
Frank W. Zammetti wrote the following on 5/2/2005 2:18 PM: Glad your enjoying it Rick! I hope you find something useful in it too. :) I like learning from examples and your examples ARE AWESOME If you don't mind, I'm going to link your article from Struttin With Struts http://www.reumann.net/struts/main.do I'm so excited there is finally a clean way to populate drop down lists when an onChange is fired from the other list or a nice table sort. This stuff is just great. Wish I wasn't so late in getting into it. -- Rick - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: ajax proj
Frank W. Zammetti wrote the following on 5/2/2005 2:18 PM: Glad your enjoying it Rick! I hope you find something useful in it too. :) I see in your examples you make the note about writing the HTML in your Action is bad form, but I'm curious then how you handle this in real life. For example, looking at example 3 where the options list of characters changes based on your first selection, how/where do you write out the HTML that needs to be outputted to the response? Thanks again, -- Rick - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: ajax proj
Feel free, link away! If you like that, I suggest taking a peak at the ajaxtags... it's even better when you don't have to write the code yourself, just throw an entry in a config file :) -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com On Mon, May 2, 2005 2:27 pm, Rick Reumann said: Frank W. Zammetti wrote the following on 5/2/2005 2:18 PM: Glad your enjoying it Rick! I hope you find something useful in it too. :) I like learning from examples and your examples ARE AWESOME If you don't mind, I'm going to link your article from Struttin With Struts http://www.reumann.net/struts/main.do I'm so excited there is finally a clean way to populate drop down lists when an onChange is fired from the other list or a nice table sort. This stuff is just great. Wish I wasn't so late in getting into it. -- Rick - 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: ajax proj
Hmm... well, if I was doing something like that in real life I might well do it from the Action :) That doesn't make it the generally accepted right answer' thought. I think most people would tell you to forward to a JSP to generate what really amounts to just a snippet of HTML... IIRC, one of my examples does that. Keeps the view more properly separated and all that architectural jazz. Sometimes I think we all get so wrapped up in trying to achieve the perfect architecture that we overcomplicate things... if all I'm returning from the server is the HTML for a bunch of option elements, it doesn't really strike me as a bad idea to do that in an Action (or maybe from a delegate class that returns a string that the Action then returns). I'm not sure the developer community at large would agree with that though, they seem to be more concerned with perfect architecture, hence that note in the code :) -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com On Mon, May 2, 2005 2:37 pm, Rick Reumann said: Frank W. Zammetti wrote the following on 5/2/2005 2:18 PM: Glad your enjoying it Rick! I hope you find something useful in it too. :) I see in your examples you make the note about writing the HTML in your Action is bad form, but I'm curious then how you handle this in real life. For example, looking at example 3 where the options list of characters changes based on your first selection, how/where do you write out the HTML that needs to be outputted to the response? Thanks again, -- Rick - 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: ajax proj
Frank W. Zammetti wrote the following on 5/2/2005 2:53 PM: Sometimes I think we all get so wrapped up in trying to achieve the perfect architecture that we overcomplicate things... amen brotha' Preaching to the choir:) -- Rick - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: ajax proj
Frank W. Zammetti wrote the following on 5/2/2005 2:53 PM: I think most people would tell you to forward to a JSP to generate what really amounts to just a snippet of HTML... I'm confused though, you can do that? In other words you can make an XMLHttpRequest from one JSP that goes to an Action and in the Action you can forward to another JSP to write the response and the original JSP that called the XMLHttpRequest somehow pulls this into the innerHTML? Do you have an example of this? I'm looking at your table sort and I don't want all the complex display and write out of the table to take place in a Java class. I'd like to do this in the JSP but not sure how that fits into the Ajax cycle. -- Rick - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: Struts with PHP
Ok, Dave, I beg my pardon, but I think the initual intent of the thread originator was far beyond struts/cobol bridges and such. I don't want to start new senseless threads about using third generation languages, when there are fifth generation languages available and so on. So please forgive me, and forget my post :-) Regards Leon -Ursprüngliche Nachricht- Von: Dave Newton [mailto:[EMAIL PROTECTED] Gesendet: Montag, 2. Mai 2005 18:48 An: Struts Users Mailing List Betreff: Re: Struts with PHP Leon Rosenberg wrote: Well, I'm not saying this is possible either... But after all, people manage to do Struts + XML/XSLT without JSP. So why not with PHP ? Yes, by generating XML out of the action or jsp, and adding an XSLT transformer. How do you want to share any variables with a php script? I'd stick 'em in the request or make a PHP add-on that could snarf 'em somehow. Or use SiteMesh. P.S. I think we should forget this thread asap :-) I've been working on a Struts/COBOL bridge for some time now due to the inherent clarity of COBOL code. It's much easier to write the logic in a pure Business Side langage. Dave I said 'Business Side' for a reason Newton - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: Struts with PHP
Ok, Dave, I beg my pardon, but I think the initual intent of the thread originator was far beyond struts/cobol bridges and such. I don't want to start new senseless threads about using third generation languages, when there are fifth generation languages available and so on. So please forgive me, and forget my post :-) Regards Leon -Ursprüngliche Nachricht- Von: Dave Newton [mailto:[EMAIL PROTECTED] Gesendet: Montag, 2. Mai 2005 18:48 An: Struts Users Mailing List Betreff: Re: Struts with PHP Leon Rosenberg wrote: Well, I'm not saying this is possible either... But after all, people manage to do Struts + XML/XSLT without JSP. So why not with PHP ? Yes, by generating XML out of the action or jsp, and adding an XSLT transformer. How do you want to share any variables with a php script? I'd stick 'em in the request or make a PHP add-on that could snarf 'em somehow. Or use SiteMesh. P.S. I think we should forget this thread asap :-) I've been working on a Struts/COBOL bridge for some time now due to the inherent clarity of COBOL code. It's much easier to write the logic in a pure Business Side langage. Dave I said 'Business Side' for a reason Newton - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: ajax proj
Sure! :) Basically view the entire server portion as one piece... at the end of whatever it is that it does, it's returning HTML (whether it's a complete page, as usual, or just a snippet, like with Ajax techniques usually). Whether that HTML is written directly to response in an Action or a JSP processes (which is writing out to response essentially remember), it's the same thing. The fifth example in my webapp from the article shows this, albeit very simplistically... the Action just constructs a string from the parameters submitted, then shoves that string into a request attribute... the then forwards to a JSP, which basically does nothing but outputs the string and returns the resultant page (the page in this case being nothing but the string). Imagine what the table sorting example would look like with this approach... all the outputting of HTML would be removed, we would instead do: request.setAttribute(sortedPresidentsList, sortedPresidentsList); ...and we'd just do a normal forward to some JSP... in the JSP we might do: % ArrayListhm = (ArrayList)request.getAttribute(sortedPresidentsList); % table border=1 align=center cellpadding=2 cellspacing=0 tr th onClick=retrieveURL('example2RenderTable.do?sortField=firstName'); onMouseOver=style.background='#c0c0c0'; onMouseOut=style.background='';First Name/th th onClick=retrieveURL('example2RenderTable.do?sortField=middleName'); onMouseOver=style.background='#c0c0c0'; onMouseOut=style.background='';Middle Name/th th onClick=retrieveURL('example2RenderTable.do?sortField=lastName'); onMouseOver=style.background='#c0c0c0'; onMouseOut=style.background='';Last Name/th th onClick=retrieveURL('example2RenderTable.do?sortField=firstYearInOffice'); onMouseOver=style.background='#c0c0c0'; onMouseOut=style.background='';First Year In Office/th th onClick=retrieveURL('example2RenderTable.do?sortField=lastYearInOffice'); onMouseOver=style.background='#c0c0c0'; onMouseOut=style.background='';Last Year In Office/th /tr % for (Iterator it = sortedPresidentsList.iterator(); it.hasNext();) { HashMap hm = (HashMap)it.next(); % tr td%=(String)hm.get(firstName)%/td td%=(String)hm.get(middleName)%/td td%=(String)hm.get(lastName)%/td td%=(String)hm.get(firstYearInOffice)%/td td%=(String)hm.get(lastYearInOffice)%/td /tr % } % /table Most people would tend to do with with taglibs, but you get the picture :) -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com On Mon, May 2, 2005 3:20 pm, Rick Reumann said: Frank W. Zammetti wrote the following on 5/2/2005 2:53 PM: I think most people would tell you to forward to a JSP to generate what really amounts to just a snippet of HTML... I'm confused though, you can do that? In other words you can make an XMLHttpRequest from one JSP that goes to an Action and in the Action you can forward to another JSP to write the response and the original JSP that called the XMLHttpRequest somehow pulls this into the innerHTML? Do you have an example of this? I'm looking at your table sort and I don't want all the complex display and write out of the table to take place in a Java class. I'd like to do this in the JSP but not sure how that fits into the Ajax cycle. -- Rick - 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: ajax proj
Woops, a couple of typos in there... When I talked about ...all the outputting of HTML would be removed..., I was referring to removing what you see now in the Action. And the first line of that JSP code should read: % ArrayList sortedPresidentsList = (ArrayList)request.getAttribute(sortedPresidentsList); -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com On Mon, May 2, 2005 3:33 pm, Frank W. Zammetti said: Sure! :) Basically view the entire server portion as one piece... at the end of whatever it is that it does, it's returning HTML (whether it's a complete page, as usual, or just a snippet, like with Ajax techniques usually). Whether that HTML is written directly to response in an Action or a JSP processes (which is writing out to response essentially remember), it's the same thing. The fifth example in my webapp from the article shows this, albeit very simplistically... the Action just constructs a string from the parameters submitted, then shoves that string into a request attribute... the then forwards to a JSP, which basically does nothing but outputs the string and returns the resultant page (the page in this case being nothing but the string). Imagine what the table sorting example would look like with this approach... all the outputting of HTML would be removed, we would instead do: request.setAttribute(sortedPresidentsList, sortedPresidentsList); ...and we'd just do a normal forward to some JSP... in the JSP we might do: % ArrayListhm = (ArrayList)request.getAttribute(sortedPresidentsList); % table border=1 align=center cellpadding=2 cellspacing=0 tr th onClick=retrieveURL('example2RenderTable.do?sortField=firstName'); onMouseOver=style.background='#c0c0c0'; onMouseOut=style.background='';First Name/th th onClick=retrieveURL('example2RenderTable.do?sortField=middleName'); onMouseOver=style.background='#c0c0c0'; onMouseOut=style.background='';Middle Name/th th onClick=retrieveURL('example2RenderTable.do?sortField=lastName'); onMouseOver=style.background='#c0c0c0'; onMouseOut=style.background='';Last Name/th th onClick=retrieveURL('example2RenderTable.do?sortField=firstYearInOffice'); onMouseOver=style.background='#c0c0c0'; onMouseOut=style.background='';First Year In Office/th th onClick=retrieveURL('example2RenderTable.do?sortField=lastYearInOffice'); onMouseOver=style.background='#c0c0c0'; onMouseOut=style.background='';Last Year In Office/th /tr % for (Iterator it = sortedPresidentsList.iterator(); it.hasNext();) { HashMap hm = (HashMap)it.next(); % tr td%=(String)hm.get(firstName)%/td td%=(String)hm.get(middleName)%/td td%=(String)hm.get(lastName)%/td td%=(String)hm.get(firstYearInOffice)%/td td%=(String)hm.get(lastYearInOffice)%/td /tr % } % /table Most people would tend to do with with taglibs, but you get the picture :) -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com On Mon, May 2, 2005 3:20 pm, Rick Reumann said: Frank W. Zammetti wrote the following on 5/2/2005 2:53 PM: I think most people would tell you to forward to a JSP to generate what really amounts to just a snippet of HTML... I'm confused though, you can do that? In other words you can make an XMLHttpRequest from one JSP that goes to an Action and in the Action you can forward to another JSP to write the response and the original JSP that called the XMLHttpRequest somehow pulls this into the innerHTML? Do you have an example of this? I'm looking at your table sort and I don't want all the complex display and write out of the table to take place in a Java class. I'd like to do this in the JSP but not sure how that fits into the Ajax cycle. -- Rick - 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: AW: Struts with PHP
Leon Rosenberg wrote: Ok, Dave, I beg my pardon, but I think the initual intent of the thread originator was far beyond struts/cobol bridges and such. I don't want to start new senseless threads about using third generation languages, when there are fifth generation languages available and so on. I was kidding. Wait until you see my Struts/APL bridge code. Although with regards to the generation of languages: I can still do things in Lisp that I can't do in any reasonable way using almost any non-Lisp language, and Lisp was right up there with the original languages. Interesting. But more modern languages are catching up, which is fun to watch. I find a lot of similarities to modern language ideas in Lisp, SmallTalk, etc. Here's a joke: A friend recently stole the last 100 pages of a huge, proprietary Lisp program, but all he got was the closing parentheses. Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Setting focus on invalid form submission
From: Randy Kennedy [EMAIL PROTECTED] I am wondering if there is a way to set the focus after a form has been validated through Struts and deemed invalid? Currently, focus always goes to the first form element. Is there not a way to make this go to the first INVALID form element? I think you could do it fairly easily with Struts-EL... html-el:form action=/chooseProfile focus=${focusField} Now all you have to do is set a request Attribute named 'focusField' with the name of the appropriate form element. I'm thinking... override 'validate' in your Action, call super.validate(...) and you'll have the errors. Figuring out which one is first might be problematic though... -- Wendy Smoak - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: AW: Struts with PHP
Hehe, personally I still prefer LPC (mud languange - C clone) with closures which would remind you of Lisp!!! Regards Leon -Ursprüngliche Nachricht- Von: Dave Newton [mailto:[EMAIL PROTECTED] Gesendet: Montag, 2. Mai 2005 21:40 An: Struts Users Mailing List Betreff: Re: AW: Struts with PHP Leon Rosenberg wrote: Ok, Dave, I beg my pardon, but I think the initual intent of the thread originator was far beyond struts/cobol bridges and such. I don't want to start new senseless threads about using third generation languages, when there are fifth generation languages available and so on. I was kidding. Wait until you see my Struts/APL bridge code. Although with regards to the generation of languages: I can still do things in Lisp that I can't do in any reasonable way using almost any non-Lisp language, and Lisp was right up there with the original languages. Interesting. But more modern languages are catching up, which is fun to watch. I find a lot of similarities to modern language ideas in Lisp, SmallTalk, etc. Here's a joke: A friend recently stole the last 100 pages of a huge, proprietary Lisp program, but all he got was the closing parentheses. Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: ajax proj
Frank W. Zammetti wrote the following on 5/2/2005 3:33 PM: The fifth example in my webapp from the article shows this, Perfect thanks. I should have looked at all of these before posting:) -- Rick - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: ajax proj
I thought I would toss in a couple of philosophical points about the HTML being created in the action. As we know, the technologies of Servlets and Taglibs essentially mask the fact that HTML is created other than on the page. I won't complete all my thinking on that. Just tossing that into the mix. I do think that we should have an MVC-like architecture but that it really should be expanded to be clearly something that is compatible with a web structure. Ted has provided some good thinking on this, and his offhand remarks about a web-MVC in fact is the author of most of my thinking about web based architectrues . Essentially, the event' like contacts that you find in desktop MVC is not sensibly available in HTTP contexts. So, what you do is try to make sure that each layer is coupled ONLY to the prior layer and the next layer. These layers need not be piled but can have varying sorts of connections, figure eights, loop-a-loops, etc. How to do this with the given persistence scopes (request, session, etc) and the needs to both persist and to kill data carrying classes, is the trick for the VIEW layer, I think. The other aspect that is not discussed above is the removal of the complexity from the page. This is where JSP, Taglibs, etc., come into the picture. And, I suspect, you two are talking about a combination of this problem (keeping the page simple) and the previous problem (using a reasonable architecture). My thought, then, is this. The two distinct architectural differences are very different and should be treated separately.. The later issues are for efficiency of the human process. They are less critical, except for the money, of course. The prior issues are for efficience of the computer process, and they are absolutely critical. Complications in the former are a pain but in the latter are never bad, if effective. Make sense? On 5/2/05, Frank W. Zammetti [EMAIL PROTECTED] wrote: Sure! :) Basically view the entire server portion as one piece... at the end of whatever it is that it does, it's returning HTML (whether it's a complete page, as usual, or just a snippet, like with Ajax techniques usually). Whether that HTML is written directly to response in an Action or a JSP processes (which is writing out to response essentially remember), it's the same thing. The fifth example in my webapp from the article shows this, albeit very simplistically... the Action just constructs a string from the parameters submitted, then shoves that string into a request attribute... the then forwards to a JSP, which basically does nothing but outputs the string and returns the resultant page (the page in this case being nothing but the string). Imagine what the table sorting example would look like with this approach... all the outputting of HTML would be removed, we would instead do: request.setAttribute(sortedPresidentsList, sortedPresidentsList); ...and we'd just do a normal forward to some JSP... in the JSP we might do: % ArrayListhm = (ArrayList)request.getAttribute(sortedPresidentsList); % table border=1 align=center cellpadding=2 cellspacing=0 tr th onClick=retrieveURL('example2RenderTable.do?sortField=firstName'); onMouseOver=style.background='#c0c0c0'; onMouseOut=style.background='';First Name/th th onClick=retrieveURL('example2RenderTable.do?sortField=middleName'); onMouseOver=style.background='#c0c0c0'; onMouseOut=style.background='';Middle Name/th th onClick=retrieveURL('example2RenderTable.do?sortField=lastName'); onMouseOver=style.background='#c0c0c0'; onMouseOut=style.background='';Last Name/th th onClick=retrieveURL('example2RenderTable.do?sortField=firstYearInOffice'); onMouseOver=style.background='#c0c0c0'; onMouseOut=style.background='';First Year In Office/th th onClick=retrieveURL('example2RenderTable.do?sortField=lastYearInOffice'); onMouseOver=style.background='#c0c0c0'; onMouseOut=style.background='';Last Year In Office/th /tr % for (Iterator it = sortedPresidentsList.iterator(); it.hasNext();) { HashMap hm = (HashMap)it.next(); % tr td%=(String)hm.get(firstName)%/td td%=(String)hm.get(middleName)%/td td%=(String)hm.get(lastName)%/td td%=(String)hm.get(firstYearInOffice)%/td td%=(String)hm.get(lastYearInOffice)%/td /tr % } % /table Most people would tend to do with with taglibs, but you get the picture :) -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com On Mon, May 2, 2005 3:20 pm, Rick Reumann said: Frank W. Zammetti wrote the following on 5/2/2005 2:53 PM: I think most people would tell you to forward to a JSP to generate what really amounts to just a snippet of HTML... I'm confused though, you can do that? In other words you can make an XMLHttpRequest from one JSP that goes to an Action and in the Action you can forward to another JSP to write the response and the original JSP that called the XMLHttpRequest
Re: ajax proj
Dakota Jack wrote the following on 5/2/2005 4:01 PM: The other aspect that is not discussed above is the removal of the complexity from the page. This is where JSP, Taglibs, etc., come into the picture. And, I suspect, you two are talking about a combination of this problem (keeping the page simple) and the previous problem (using a reasonable architecture). yes. For example, take a table sort example. I like being able to use JSTL (or even a display tag if that suits you) to display the collection info into the display of the table. Doing something like this within a servlet (Action) wouldn't really be wrong, but just more difficult to maintain and more of pain to code (using StringBuffer and append bla bla). -- Rick - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: ajax proj
Yes, Rick, exactly! On 5/2/05, Rick Reumann [EMAIL PROTECTED] wrote: Dakota Jack wrote the following on 5/2/2005 4:01 PM: The other aspect that is not discussed above is the removal of the complexity from the page. This is where JSP, Taglibs, etc., come into the picture. And, I suspect, you two are talking about a combination of this problem (keeping the page simple) and the previous problem (using a reasonable architecture). yes. For example, take a table sort example. I like being able to use JSTL (or even a display tag if that suits you) to display the collection info into the display of the table. Doing something like this within a servlet (Action) wouldn't really be wrong, but just more difficult to maintain and more of pain to code (using StringBuffer and append bla bla). -- Rick - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- You can lead a horse to water but you cannot make it float on its back. ~Dakota Jack~ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[OT] Re: ajax proj
JSTL is da bomb! :) --- Rick Reumann [EMAIL PROTECTED] wrote: Dakota Jack wrote the following on 5/2/2005 4:01 PM: The other aspect that is not discussed above is the removal of the complexity from the page. This is where JSP, Taglibs, etc., come into the picture. And, I suspect, you two are talking about a combination of this problem (keeping the page simple) and the previous problem (using a reasonable architecture). yes. For example, take a table sort example. I like being able to use JSTL (or even a display tag if that suits you) to display the collection info into the display of the table. Doing something like this within a servlet (Action) wouldn't really be wrong, but just more difficult to maintain and more of pain to code (using StringBuffer and append bla bla). -- Rick - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] Re: ajax proj
On 5/2/05, Woodchuck [EMAIL PROTECTED] wrote: JSTL is da bomb! :) Indeed it is. If you actually need to create XML in a response to an XmlHttpRequest call from an Ajax client side gadget :-), here's an approach using a JSP 2.0 page (in xml syntax) that uses JSTL to iterate over a result set, and JSP expressions to pull out the data (copied from the Shale Use Cases example app): jsp:root version=2.0 xmlns:c=http://java.sun.com/jsp/jstl/core; xmlns:jsp=http://java.sun.com/JSP/Page; jsp:directive.page contentType=text/xml;charset=UTF-8/ categories c:forEachvar=category items=${lookup$listCategories.supportedCategories} category label${category.label}/label value${category.value}/value /category /c:forEach /categories /jsp:root The business logic that looks up the label/value pairs for the response doesn't have a clue how it will actually be rendered, and setting up a JSP page is much easier to author than building an XML DOM in Java code. Craig --- Rick Reumann [EMAIL PROTECTED] wrote: Dakota Jack wrote the following on 5/2/2005 4:01 PM: The other aspect that is not discussed above is the removal of the complexity from the page. This is where JSP, Taglibs, etc., come into the picture. And, I suspect, you two are talking about a combination of this problem (keeping the page simple) and the previous problem (using a reasonable architecture). yes. For example, take a table sort example. I like being able to use JSTL (or even a display tag if that suits you) to display the collection info into the display of the table. Doing something like this within a servlet (Action) wouldn't really be wrong, but just more difficult to maintain and more of pain to code (using StringBuffer and append bla bla). -- Rick - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.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: [OT] Re: ajax proj
Woodchuck wrote: JSTL is da bomb! :) Does this mean... we can drop it? Eh, it's Friday, whaddya want. Seriously, I hate all that typing-JSP 2.0 may save my wrists. Dave What do you mean, Monday? Newton - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] Re: ajax proj
Just a quick note/question about Craig's code below: This line label${category.label}/label will output the value with not xml filtering, so some values will cause incorrect xml to be generated. You should use c:out tag to filter the ,,',, and characters to output lt;, gt;, apos;, quot;, and amp; labelc:out value=${category.label}//label and the same for the value element Craig McClanahan wrote: On 5/2/05, Woodchuck [EMAIL PROTECTED] wrote: JSTL is da bomb! :) Indeed it is. If you actually need to create XML in a response to an XmlHttpRequest call from an Ajax client side gadget :-), here's an approach using a JSP 2.0 page (in xml syntax) that uses JSTL to iterate over a result set, and JSP expressions to pull out the data (copied from the Shale Use Cases example app): jsp:root version=2.0 xmlns:c=http://java.sun.com/jsp/jstl/core; xmlns:jsp=http://java.sun.com/JSP/Page; jsp:directive.page contentType=text/xml;charset=UTF-8/ categories c:forEachvar=category items=${lookup$listCategories.supportedCategories} category label${category.label}/label value${category.value}/value /category /c:forEach /categories /jsp:root The business logic that looks up the label/value pairs for the response doesn't have a clue how it will actually be rendered, and setting up a JSP page is much easier to author than building an XML DOM in Java code. Craig --- Rick Reumann [EMAIL PROTECTED] wrote: Dakota Jack wrote the following on 5/2/2005 4:01 PM: The other aspect that is not discussed above is the removal of the complexity from the page. This is where JSP, Taglibs, etc., come into the picture. And, I suspect, you two are talking about a combination of this problem (keeping the page simple) and the previous problem (using a reasonable architecture). yes. For example, take a table sort example. I like being able to use JSTL (or even a display tag if that suits you) to display the collection info into the display of the table. Doing something like this within a servlet (Action) wouldn't really be wrong, but just more difficult to maintain and more of pain to code (using StringBuffer and append bla bla). -- Rick -- Jason Lea
Re: [OT] Re: ajax proj
On 5/2/05, Jason Lea [EMAIL PROTECTED] wrote: Just a quick note/question about Craig's code below: This line label${category.label}/label will output the value with not xml filtering, so some values will cause incorrect xml to be generated. You should use c:out tag to filter the ,,',, and characters to output lt;, gt;, apos;, quot;, and amp; labelc:out value=${category.label}//label and the same for the value element Yep ... +1 on that suggestion. Craig - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: problem with checkbox values and map backed properties
You can try to set a unlicked value in the reset function in the form. When the click-box is clicked the unlicked value will be covered. Hope this is useful for you. =) Cliff - Original Message - From: Günther Wieser [EMAIL PROTECTED] To: 'Struts Users Mailing List' user@struts.apache.org Sent: Saturday, April 30, 2005 1:28 AM Subject: problem with checkbox values and map backed properties hi, i have the following problem with map backed properties: i created a form bean with a map called inCampaignMap, and the getter and setters being boolean getInCampaign(String key) and setInCampaign(String key, boolean value). internally, of course, the map value entries are of type Boolean. in my JSP i have the following code: html:checkbox property=inCampaign(${campaign.id}) / where ${campaign.id} indicates the key for the map. this works fine if the checkbox is checked. in this case i can see that the setInCampaign() method is being called and that i get true for the value. if the checkbox is unchecked, the value is NOT set. strange enough, i also can see from the html code that's generate that value=on is always set, no matter if the checkbox is checked or not. any ideas? thanks in advance, kr, guenther - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: modules
http://struts.apache.org/userGuide/configuration.html#dd_config_modules =) Cliff - Original Message - From: Lucas Bern [EMAIL PROTECTED] To: Struts Users Mailing List user@struts.apache.org Sent: Saturday, April 30, 2005 5:39 AM Subject: modules Any resource that explains how to configure modules in struts??? thanks Lucas - 250MB gratis, Antivirus y Antispam Correo Yahoo!, el mejor correo web del mundo Abrí tu cuenta aquí - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]