You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Benedict, Paul C" <pa...@merck.com> on 2005/05/09 20:02:52 UTC

RE: Feature wanted: autocomplete attribute for html:text/form tag s

Tomasz,

If you need to output additional attributes, you don't use Struts to write
that particular tag. You are not forced to use Strut's <html:*> tags.
Consider vanilla HTML -- the good ol' days -- and use EL to get what you
want from Struts.

-----Original Message-----
From: Tomasz Nazar [mailto:Tomasz.Nazar@ii.uni.wroc.pl] 
Sent: Monday, May 09, 2005 1:55 PM
To: Struts Users Mailing List
Subject: Re: Feature wanted: autocomplete attribute for html:text/form tags


On Mon, May 09, 2005 at 01:39:04PM -0400, Dave Newton wrote:
> Tomasz Nazar wrote:
> 
> >Problem when using Struts comes: <html:text> doesn't have 'autocomplete'
> >attribute. (this is not in HTML spec, but IE, Firefox, Mozilla
> >implements it).
> >  
> >
> That doesn't have anything to do with Google Suggest; the "autocomplete" 
> you're talking about deals with the browser caching form values by input 
> tag name/id. IOW, the 'autocomplete' property doesn't magickally 
> implement "Suggest"-like features.
> 
> Dave

Hmm ;), really?

Of course I've implemented sth like Google Suggest, and I need to turn
the autocomplete feature of the browser off... like the GoogleSuggest does.

Otherwise you'll end with two combos going down, and this is ugly and
distracting having to things that "complete" words.

Problem is I don't know (can't) how to achieve:
<input type="text" autocomplete="off"...

using Struts' <html:text ..

Is it clear now?

Regards,
Tomasz Nazar


-- 
  _i______'simplicity_is_the_key'__________tomasz_nazar
  _ii____'i_am_concern_oriented'__________________iiuwr
  _iii__'patsystem.sf.net'___________________linux_user
  _Heaven_&_Fellows,_PPP______________________prevayler

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





------------------------------------------------------------------------------
Notice:  This e-mail message, together with any attachments, contains information of Merck & Co., Inc. (One Merck Drive, Whitehouse Station, New Jersey, USA 08889), and/or its affiliates (which may be known outside the United States as Merck Frosst, Merck Sharp & Dohme or MSD and in Japan, as Banyu) that may be confidential, proprietary copyrighted and/or legally privileged. It is intended solely for the use of the individual or entity named on this message.  If you are not the intended recipient, and have received this message in error, please notify us immediately by reply e-mail and then delete it from your system.
------------------------------------------------------------------------------

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


Re: Feature wanted: autocomplete attribute for html:text/form tag s

Posted by Tomasz Nazar <To...@ii.uni.wroc.pl>.
On Tue, May 10, 2005 at 05:12:40PM +0100, Niall Pemberton wrote:
> Since Struts 1.2.5 the html tags have had some re-factoring that makes it
> easier to create your own custom version. All you need to do is extend the
> TextTag, add appropriate getter/setter methods for a new "autocomplete"
> property and override the prepareOtherAttributes() method to output your
> additional attribute:
> 
>     protected void prepareOtherAttributes(StringBuffer handlers) {
>         prepareAttribute(handlers, "autocomplete", getAutocomplete());
>     }
> 
> You will also either need to modify the struts tld to point to your custom
> tag and add your additional attribute - or create your own tld for the
> custom tag.
> 
> Bug 1598 talked about adding the kind of facility you mention, but no-ones
> done anything about it and there are other bug tickets which are related:
> 
> http://issues.apache.org/bugzilla/show_bug.cgi?id=1598
> http://issues.apache.org/bugzilla/show_bug.cgi?id=29379
> http://issues.apache.org/bugzilla/show_bug.cgi?id=32215
> 
> Niall

Thanks for info..
t.

-- 
  _i______'simplicity_is_the_key'__________tomasz_nazar
  _ii____'i_am_concern_oriented'__________________iiuwr
  _iii__'patsystem.sf.net'___________________linux_user
  _Heaven_&_Fellows,_PPP______________________prevayler

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


Re: Feature wanted: autocomplete attribute for html:text/form tag s

Posted by Niall Pemberton <ni...@blueyonder.co.uk>.
Since Struts 1.2.5 the html tags have had some re-factoring that makes it
easier to create your own custom version. All you need to do is extend the
TextTag, add appropriate getter/setter methods for a new "autocomplete"
property and override the prepareOtherAttributes() method to output your
additional attribute:

    protected void prepareOtherAttributes(StringBuffer handlers) {
        prepareAttribute(handlers, "autocomplete", getAutocomplete());
    }

You will also either need to modify the struts tld to point to your custom
tag and add your additional attribute - or create your own tld for the
custom tag.

Bug 1598 talked about adding the kind of facility you mention, but no-ones
done anything about it and there are other bug tickets which are related:

http://issues.apache.org/bugzilla/show_bug.cgi?id=1598
http://issues.apache.org/bugzilla/show_bug.cgi?id=29379
http://issues.apache.org/bugzilla/show_bug.cgi?id=32215

Niall

----- Original Message ----- 
From: "Tomasz Nazar" <To...@ii.uni.wroc.pl>
Sent: Monday, May 09, 2005 7:15 PM


> On Mon, May 09, 2005 at 02:02:52PM -0400, Benedict, Paul C wrote:
> > Tomasz,
> >
> > If you need to output additional attributes, you don't use Struts to
write
> > that particular tag. You are not forced to use Strut's <html:*> tags.
> > Consider vanilla HTML -- the good ol' days -- and use EL to get what you
> > want from Struts.
>
> That's the way it works now. But, you know I like my work to be
> "consistent".
> I even don't like to use <%= .. %>. I treat Struts as a high level web
> framework and every exception (like "autocomplete") just isn't right..
>
> Anyway.. are there any efforts to introduce "options" or
> "autocomplete" attributes to those tags like T. Husted suggested?



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


Re: Feature wanted: autocomplete attribute for html:text/form tag s

Posted by Tomasz Nazar <To...@ii.uni.wroc.pl>.
On Mon, May 09, 2005 at 02:02:52PM -0400, Benedict, Paul C wrote:
> Tomasz,
> 
> If you need to output additional attributes, you don't use Struts to write
> that particular tag. You are not forced to use Strut's <html:*> tags.
> Consider vanilla HTML -- the good ol' days -- and use EL to get what you
> want from Struts.

That's the way it works now. But, you know I like my work to be 
"consistent".
I even don't like to use <%= .. %>. I treat Struts as a high level web
framework and every exception (like "autocomplete") just isn't right..

Anyway.. are there any efforts to introduce "options" or
"autocomplete" attributes to those tags like T. Husted suggested?

Tomasz Nazar

-- 
  _i______'simplicity_is_the_key'__________tomasz_nazar
  _ii____'i_am_concern_oriented'__________________iiuwr
  _iii__'patsystem.sf.net'___________________linux_user
  _Heaven_&_Fellows,_PPP______________________prevayler

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