Re: Submit Button

2004-09-07 Thread Michael G. McGrady
Ross, Douglas wrote: Sorry, I thought my shorthand was obvious. The 1 line short hand was intended to represent any kind of String compare: String action = request.getParameter("action"); if("new".equalsIgnoreCase(action)){ // action is new }else if("edit".equalsIgnoreCase(action)){

RE: Submit Button

2004-09-07 Thread Ross, Douglas
Sorry, I thought my shorthand was obvious. The 1 line short hand was intended to represent any kind of String compare: String action = request.getParameter("action"); if("new".equalsIgnoreCase(action)){ // action is new }else if("edit".equalsIgnoreCase(action)){ // or action is ed

Re: Submit Button

2004-09-07 Thread Michael G. McGrady
David Schwartz wrote: Looking for JSTL - not Struts. I cannot see what difference this makes. Michael - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Submit Button

2004-09-07 Thread Michael G. McGrady
Ross, Douglas wrote: David, I believe the browser only sends the clicked submit button value. So the trick (if you would call it that) is to name all your submit buttons the same: Whichever one the user clicks is the one sent to the server: request.getParameter("action")=="New" | "Edit" | "Delet

splitting a variable into array

2004-09-07 Thread Kralidis,Tom [Burlington]
Hi, When working with tomcat 5.0.27, I am trying to parse an XML document and split the value of an XPath statement into an array for further usage throughout the document: <% // this works %> <% // this doesn't work %> Any idea what I may be missing here? Thanks

RE: Submit Button

2004-09-07 Thread Helios Alonso
Ok. Actually I wrote this when you sent the same-name solution. It's a pity the input doesn't have two attributes, one for sending, one for caption. With hidden buttons which map to images, are the ? At 10:59 07/09/2004 -0400, you wrote: Oh, I see your point now. We actually use hidden buttons w

RE: Submit Button - Solved

2004-09-07 Thread David Schwartz
Thanks Ross. That worked. Then on action page... displays "Next" or "Save" Quoting "Ross, Douglas" <[EMAIL PROTECTED]>: >> David, >> >> I believe the browser only sends the clicked submit button value. So the >> trick (if you would call it that) is to name all your submit buttons the >> sam

RE: Submit Button

2004-09-07 Thread Ross, Douglas
Oh, I see your point now. We actually use hidden buttons which map to images in the page that way we get the bennefit of both, with less logic. I really dislike the long nested if blocks (it must be the oo in me!). -Original Message- From: Helios Alonso [mailto:[EMAIL PROTECTED] Sent: Tue

RE: Submit Button

2004-09-07 Thread Ross, Douglas
Helios, You can also do something like this to eliminate the if tests: Add the value attribute to your input tags and set the name the same: The button pressed was: -Original Message- From: Helios Alonso [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 07, 2004 10:52 AM To:

Re: Submit Button

2004-09-07 Thread Helios Alonso
Using the same name for all the submit buttons is cool for evaluating which one was pressed. But if you don't want to use the buttons' text into the logic, different names would be nicer. At 11:52 07/09/2004 -0300, you wrote: It seems that only one submit parameter is sent. I tried this html in

Re: Submit Button

2004-09-07 Thread Helios Alonso
It seems that only one submit parameter is sent. I tried this html in Mozilla And when I press the first button only the a parameter is sent (it has no value cause the input element doesn't have it). When I press the second button only the b parameter is sent. So, I would do something like

RE: Submit Button

2004-09-07 Thread paul.matte
Using struts here, but I didn't think it would make a difference... Here's our jsp: Here's the action class that is forwarded upon submit: public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest reques

RE: Submit Button

2004-09-07 Thread Ross, Douglas
David, I believe the browser only sends the clicked submit button value. So the trick (if you would call it that) is to name all your submit buttons the same: Whichever one the user clicks is the one sent to the server: request.getParameter("action")=="New" | "Edit" | "Delete"; Hope this he

Re: Submit Button

2004-09-07 Thread David Schwartz
Looking for JSTL - not Struts. Quoting "Michael G. McGrady" <[EMAIL PROTECTED]>: >> Karl Coleman wrote: >> >> >I believe the name of the button is passed in the request under the name >> Submit. >> > >> >page.jsp?Submit= >> > >> >Karl >> > >> >> Oh, if this is all you wanted to know, and not how

Re: Submit Button

2004-09-07 Thread Michael G. McGrady
Karl Coleman wrote: I believe the name of the button is passed in the request under the name Submit. page.jsp?Submit= Karl Oh, if this is all you wanted to know, and not how to use images, blah, blah, then you can use and the property attribute will pass along the value to the ActionForm. I ass

RE: Submit Button

2004-09-07 Thread Karl Coleman
I believe the name of the button is passed in the request under the name Submit. page.jsp?Submit= Karl -Original Message- From: David Schwartz [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 07, 2004 9:54 AM To: [EMAIL PROTECTED] Subject: Submit Button Is it possible to determine th

Re: Submit Button

2004-09-07 Thread Michael G. McGrady
David Schwartz wrote: Is it possible to determine the name or value of the submit button that user clicked? For example, I have a form with 4 submit buttons - each with a dif name & value. Need to know which was clicked so user can be routed. David Schwartz http://wiki.apache.org/struts/StrutsCatal

Submit Button

2004-09-07 Thread David Schwartz
Is it possible to determine the name or value of the submit button that user clicked? For example, I have a form with 4 submit buttons - each with a dif name & value. Need to know which was clicked so user can be routed. David Schwartz -

RE: How do I pass a variable into an x select?

2004-09-07 Thread Johnson, Chris
Instead of: Parent: Try: Parent: -Original Message- From: news [mailto:[EMAIL PROTECTED] On Behalf Of Digby Sent: Saturday, September 04, 2004 12:48 PM To: [EMAIL PROTECTED] Subject: How do I pass a variable into an x select? I've just noticed that the select attribute of all the x t

Use multiple message resources !!!???

2004-09-07 Thread Eric Chow
Hello, How can I use more than one multiple resources with ??? Eric - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]