Re: Button Tag

2002-11-14 Thread David Graham
See the user's guide section on html tags.

David







From: "Savantraj, Chennamakal Subramanian" <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Subject: Button Tag
Date: Thu, 14 Nov 2002 16:57:06 +0800

Hi,
Which Tag should be used to create a  in STRUTS?
My requirement is I want to call different actions based on different 
Button
click.
Rgds

---
This email is confidential and intended only for the use of the individual
or entity named above and may contain information that is privileged. If 
you
are not the intended recipient, you are notified that any dissemination,
distribution or copying of this email is strictly prohibited. If you have
received this email in error, please notify us immediately by return email
or telephone and destroy the original message. Thank you. - This mail is
sent via Sony Asia Pacific Mail Gateway.
---


--
To unsubscribe, e-mail:   
<mailto:struts-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: 
<mailto:struts-user-help@;jakarta.apache.org>


_
The new MSN 8: smart spam protection and 2 months FREE*  
http://join.msn.com/?page=features/junkmail


--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@;jakarta.apache.org>



Re: Button Tag

2002-11-14 Thread Karim Saloojee
Oops

I meant the DispatchAction not the RequestDispatcher. Sorry - need more
sleep!

Take a look at Chapter 5 in Chucks book, the heading in ch 5 is "The
org.apache.struts.actions.DispatchAction"

Regards,
Karim

- Original Message -
From: "Karim Saloojee" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Thursday, November 14, 2002 11:10 AM
Subject: Re: Button Tag


> Take a look at the RequestDispatcher. A good example can be found in
Chucks
> book at theserverside.com
>
>
> - Original Message -
> From: "Savantraj, Chennamakal Subramanian" <[EMAIL PROTECTED]>
> To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
> Sent: Thursday, November 14, 2002 10:57 AM
> Subject: Button Tag
>
>
> > Hi,
> > Which Tag should be used to create a  in STRUTS?
> > My requirement is I want to call different actions based on different
> Button
> > click.
> > Rgds
> >
> > ---
> > This email is confidential and intended only for the use of the
individual
> > or entity named above and may contain information that is privileged. If
> you
> > are not the intended recipient, you are notified that any dissemination,
> > distribution or copying of this email is strictly prohibited. If you
have
> > received this email in error, please notify us immediately by return
email
> > or telephone and destroy the original message. Thank you. - This mail is
> > sent via Sony Asia Pacific Mail Gateway.
> > ---
> >
> >
> > --
> > To unsubscribe, e-mail:
> <mailto:struts-user-unsubscribe@;jakarta.apache.org>
> > For additional commands, e-mail:
> <mailto:struts-user-help@;jakarta.apache.org>
> >
>
>
>
> --
> To unsubscribe, e-mail:
<mailto:struts-user-unsubscribe@;jakarta.apache.org>
> For additional commands, e-mail:
<mailto:struts-user-help@;jakarta.apache.org>
>



--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@;jakarta.apache.org>




Re: Button Tag

2002-11-14 Thread Gemes Tibor
2002. november 14. 09:57 dátummal Savantraj, Chennamakal Subramanian ezt 
írtad:
> Hi,
> Which Tag should be used to create a  in STRUTS?
> My requirement is I want to call different actions based on different
> Button click.

Read this: 

http://husted.com/struts/tips/003.html

Hth,

Tib

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Button Tag

2002-11-14 Thread Karim Saloojee
Take a look at the RequestDispatcher. A good example can be found in Chucks
book at theserverside.com


- Original Message -
From: "Savantraj, Chennamakal Subramanian" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Thursday, November 14, 2002 10:57 AM
Subject: Button Tag


> Hi,
> Which Tag should be used to create a  in STRUTS?
> My requirement is I want to call different actions based on different
Button
> click.
> Rgds
>
> ---
> This email is confidential and intended only for the use of the individual
> or entity named above and may contain information that is privileged. If
you
> are not the intended recipient, you are notified that any dissemination,
> distribution or copying of this email is strictly prohibited. If you have
> received this email in error, please notify us immediately by return email
> or telephone and destroy the original message. Thank you. - This mail is
> sent via Sony Asia Pacific Mail Gateway.
> ---
>
>
> --
> To unsubscribe, e-mail:
<mailto:struts-user-unsubscribe@;jakarta.apache.org>
> For additional commands, e-mail:
<mailto:struts-user-help@;jakarta.apache.org>
>



--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@;jakarta.apache.org>




Button Tag

2002-11-14 Thread Savantraj, Chennamakal Subramanian
Hi,
Which Tag should be used to create a  in STRUTS?
My requirement is I want to call different actions based on different Button
click.
Rgds

---
This email is confidential and intended only for the use of the individual
or entity named above and may contain information that is privileged. If you
are not the intended recipient, you are notified that any dissemination,
distribution or copying of this email is strictly prohibited. If you have
received this email in error, please notify us immediately by return email
or telephone and destroy the original message. Thank you. - This mail is
sent via Sony Asia Pacific Mail Gateway. 
---


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Mark's Custom Button Tag

2002-04-19 Thread Galbreath, Mark

Here ya go! My Friday gift to the list.  Just modify were obvious (like
package name, class name, etc.) to suit your environment.

I hope this posts without getting too mangled by the mail server.

--
Usage:



--
TLD:


http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd";>

  1.0
  1.1
  maintenance
  maintenance.tld
  Marko Sharko's JSP Button Tag
  
Button
com.tessco.web.taglib.Button
JSP

label
true
true


width
true
  true


style
true
true


href
false
true


onClick
false
true

  


--
web.xml:


  maintenance.tld
  /WEB-INF/maintenance.tld


-
The code:

package com.tessco.partner.web.maintenance.taglib;

import javax.servlet.jsp.tagext.TagSupport;
import javax.servlet.jsp.tagext.BodyTagSupport;
import javax.servlet.jsp.tagext.BodyContent;
import javax.servlet.jsp.JspException;
import javax.servlet.jsp.JspTagException;
import javax.servlet.jsp.JspWriter;
import javax.servlet.jsp.PageContext;
import javax.servlet.ServletRequest;
import java.io.PrintWriter;
import java.io.IOException;

/**
 * The button is an html table with the following layout:
 * 
 * 
 * 
 * 
 * 
 * 
 * 
 * 
 * 
 * 
 * Button Text
 *  
 * 
 * 
 * 
 * 
 * 
 * 
 */

public class Button extends TagSupport {
 // This is required so there's no default.
 String label = "";
 String width = "";
 String href = "";
 String onClick = "";
 String anchor = "";
 String endAnchor = "";
 String style = "";

/**
 * The label (text) to appear on the button
 * @param label   The text to appear on the button.  This becomes the
hyperlink
 *
 */
public void setLabel(String label) {
 this.label = label;
}

/**
 * The width of the button
 * @param width   The width of the button text area in pixels.  This value
is
 * used to adjust the width of the image that occurrs below and above the
text.
 * Setting this two small will result in a malformed button image.
 */
public void setWidth(String width) {
 this.width = width;
}

/**
 * The style of the button
 * @param style   This attribute determines how the button will look.
 * The "style" is concated with other information to determine reference
 * stylesheet attributes and the location of the button images.
 * The following stylesheet attributes are used.
 * buttonXBG - the background color of the button
 * buttonXText - the style of the text on the button
 * The images for the 3d look are obtained from:
 * /images/buttonX
 *
 * where X is the name of the style
 */
public void setStyle(String style) {
 this.style = style;
}

/**
 * The href for the hyperlink
 * @param href   Optional value for the href attribute for the hyperlink.
This
 * defaults to #top for Navigator compatability.
 */
public void setHref(String href) {
 this.href = " href='" + href + "' ";
 this.anchor = "");
  pageContext.getOut().println("");
  pageContext.getOut().println("");
  pageContext.getOut().println("");
  pageContext.getOut().println("");
 pageContext.getOut().println("");
  pageContext.getOut().println("");
  pageContext.getOut().println("");
  pageContext.getOut().println("");
  pageContext.getOut().println("");
  pageContext.getOut().println("");
  pageContext.getOut().println(this.anchor + this.href + this.onClick);   
  pageContext.getOut().println(""
+ this.label + "");
  pageContext.getOut().println(this.endAnchor);
  pageContext.getOut().println ("");
  pageContext.getOut().println("");
  pageContext.getOut().println("");
  pageContext.getOut().println("");
  pageContext.getOut().println("");
  pageContext.getOut().println("");
  pageContext.getOut().println("");
  // Continue evaluating the page.
  return EVAL_PAGE;
  } catch(IOException ioe) {
throw new JspException(ioe.getMessage());
  }
 }
}

--
The CSS:

.buttonAccBG {BACKGROUND-COLOR: #26367A;}
.buttonAccText {FONT-FAMILY: Arial; FONT-SIZE: 9pt; FONT-WEIGHT: bold;
TEXT-DECORATION: none; BACKGROUND-COLOR: #26367A; COLOR: #FF; }
.buttonDecBG {BACKGROUND-COLOR: #F8D253;}
.buttonDecText {FONT-FAMILY: Arial; FONT-SIZE: 9pt; FONT-WEIGHT: bold;
TEXT-DECORATION: none; BACKGROUND-COLOR: #F8D253; COLOR: #00; }

Cheers!
Mark

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




Re: button tag

2002-01-05 Thread Ted Husted

It should work the way you describe. 

You might try changing the method to get, and see what shows up in the
query string. 

-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Building Java web applications with Struts.
-- Tel +1 585 737-3463.
-- Web http://www.husted.com/struts/


"Kuntz Peter, NY" wrote:
> 
> Hi,
> 
> I have a question about the  tag. The discription about the
> "property" attribute of that tag is the following: "Name of the request
> parameter that will be included with this submission, set to the specified
> value.". And additionally the "value" attribute has the following
> description: "Value of the label to be placed on this button. This value
> will also be submitted as the value of the specified request parameter."
> 
> As far as I understand these descriptions I would expect the value of the
> specified parameter in the HttpServletRequest object. That means when I call
> the getParameter(String) method with the specified name of that button tag I
> would expect to retrieve the value specified in the tag.
> I tried to do this but it didn't work. Am I wrong with my assumption.
> 
> Peter
> DISCLAIMER: The information in this message is confidential and may be
> legally privileged. It is intended solely for the addressee.  Access to this
> message by anyone else is unauthorised.  If you are not the intended
> recipient, any disclosure, copying, or distribution of the message, or any
> action or omission taken by you in reliance on it, is prohibited and may be
> unlawful.  Please immediately contact the sender if you have received this
> message in error. Thank you
> 
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




button tag

2002-01-03 Thread Kuntz Peter, NY

Hi,

I have a question about the  tag. The discription about the
"property" attribute of that tag is the following: "Name of the request
parameter that will be included with this submission, set to the specified
value.". And additionally the "value" attribute has the following
description: "Value of the label to be placed on this button. This value
will also be submitted as the value of the specified request parameter." 

As far as I understand these descriptions I would expect the value of the
specified parameter in the HttpServletRequest object. That means when I call
the getParameter(String) method with the specified name of that button tag I
would expect to retrieve the value specified in the tag.
I tried to do this but it didn't work. Am I wrong with my assumption.

Peter
DISCLAIMER: The information in this message is confidential and may be
legally privileged. It is intended solely for the addressee.  Access to this
message by anyone else is unauthorised.  If you are not the intended
recipient, any disclosure, copying, or distribution of the message, or any
action or omission taken by you in reliance on it, is prohibited and may be
unlawful.  Please immediately contact the sender if you have received this
message in error. Thank you

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




Radio-Button Tag

2001-08-09 Thread Metehan Selvi



Hi,
one question about Radio-Input Fields, which are 
implemented by the RadioTag-class:
How to set an 'element' as checked e.g. as a 
default value?
I haven't found a hint or an property for the 
radio-field, where i can set the property checked=true or something like 
that.
 
cheers
mete