struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adam Hardy <ahardy.str...@cyberspaceroad.com>
Subject Re: Submit buttons getting their value
Date Sun, 16 Oct 2005 20:53:45 GMT
The reason why I mentioned Firefox is that it generally tends to be more 
standards-compliant than IE (W3C standards, that is).

It probably works with your tag perfectly, if the HTML doesn't contain a 
'label' attribute.

I asked for the HTML produced so that I could see if it was 
W3C-compliant HTML or not. Can't you just cut and paste the HTML by 
doing a 'view-source' on one of your webpages where you have implemented it?

I am only familiar with the 'label' html tags that can be used to link 
up text and key combinations with form fields (accessibility stuff).


Adam

Martin Gainty on 16/10/05 21:40, wrote:
> Good Evening from across the pond-
> 
> An attempt to answer your queries..
> Yes the SubmitTag label is a protected String attribute whose value is 
> written as html inside the start of Tag method doStartTag()
> The source code for SubmitTag.java is located at
> http://www.docjar.com/html/api/com/RuntimeCollective/webapps/tag/SubmitTag.java.html

> 
> 
> the base class BaseHandlerTag doc located at
> http://www.docjar.com/docs/api/org/apache/struts/taglib/html/BaseHandlerTag.html 
> 
> the BaseHandlerTag contains a protected method isXhtml() which 
> interrogates the Tag object to determine if the tag object is nested 
> within <html:html> tag that has xhtml = true
> harkening back to the Struts 1.1 doc stating..
> "If you use an <html:html xhtml="true> or <html:xhtml/> element on your 
> page, the tags will render as XHTML (since Struts 1.1). "
> so since this statement is met in the case that Xhtml() renders true is 
> this condition is met then I would say yes these Tag classes are 'XHTML' 
> compliant
> 
> With regards to working in firefox I would need to have more specifics 
> on the firefox specific functionality you are speaking of
> in order to answer the question in any comprehensively intelligent fashion
> Does this answer your question(s)?
> Cheers,
> 
> Martin-
> ----- Original Message ----- From: "Adam Hardy" 
> <ahardy.struts@cyberspaceroad.com>
> To: "Struts Users Mailing List" <user@struts.apache.org>
> Sent: Sunday, October 16, 2005 2:26 PM
> Subject: Re: Submit buttons getting their value
> 
> 
>> Martin,
>>
>> what HTML does this taglib produce? Seems as if it would be so:
>>
>> <input type="submit" label="some text" value="delete" />
>>
>> A cursory check on the W3C website confirmed my suspicions - I don't 
>> believe that the label attribute is valid HTML4 and if so is unlikely 
>> to be supported by browsers like Firefox.
>>
>> Is it XHTML? Is it IE only?
>>
>>
>>
>> Adam
>>
>> Martin Gainty on 16/10/05 02:55, wrote:
>>
>>> All
>>> Whatever solution is proposed is proferred based on the predilections 
>>> and perhaps even the emotions of the author
>>> at the time of their proposal
>>> Accordingly I *believe* I have found an incredibly simple 
>>> implementation of SubmitTag for use in your app
>>> which extends org.apache.struts.taglib.html.BaseHandlerTag the 
>>> location is
>>> http://www.docjar.com/docs/api/com/RuntimeCollective/webapps/tag/SubmitTag.html

>>> Note that once you have constructed the Tag in your jsp there are 2 
>>> methods that will be of immediate use to you
>>> getValue which acquires the value of the property to submit (this 
>>> presupposes you have indeed set a property attribute first!..)
>>> getLabel which acquires the actual label which is the unique text 
>>> string which is a mandatory string which must be supplied
>>> to properly construct the tag
>>> name is the other attribute which is required to properly contruct 
>>> the SubmitTag
>>> I hope this works for you,
>>>
>>> Martin-
>>> I will now wait for Dakota Jack to explain why this is an *(!&^%ic 
>>> solution ..
>>>
>>> ----- Original Message ----- From: "Dakota Jack" <dakota.jack@gmail.com>
>>> To: "Struts Users Mailing List" <user@struts.apache.org>
>>> Sent: Monday, October 10, 2005 5:59 PM
>>> Subject: Re: Submit buttons getting their value
>>>
>>>
>>> Actually this won't work either.  The problem is that the request
>>> object has been purloined and given another wrapper name.  You might
>>> want to look at the code before giving these ideas.
>>>
>>> On 10/10/05, Richard Yee <ryee@cruzio.com> wrote:
>>>
>>>> Try getParameter() instead of getAttribute().
>>>>
>>>> -Richard
>>>>
>>>>
>>>> C.F. Scheidecker Antunes wrote:
>>>> > Hello all,
>>>> >
>>>> > I have two submit buttons, one with a value of Continue and the other
>>>> > Back.
>>>> >
>>>> > How do I check their values?
>>>> >
>>>> > I've tried request.getAttribute("submit").toString() but I do not get
>>>> > anything.
>>>> >
>>>> > My buttons are like this:
>>>> >
>>>> > <html:submit value="back">back</html:submit>
>>>> > <html:submit value="continue">continue</html:submit>
>>>> >
>>>> > They are within the same form structure.
>>>> >
>>>> > My action has already a Session Bean scope to save the form contents.
>>>> > But the submit is not
>>>> > in that DynaBean.
>>>> >
>>>> > I will decide on what to do within the action based on what button is
>>>> > pressed.
>>>> >
>>>> > Thanks,



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message