Thanks Daryl. Yes, I'd looked at the Button tag code and notice the use of
the value attribute and the support for the content. I like your suggestion
that when both the value attribute and content are present we use the
<button> markup "with the content output as is". This body content will have
been processed/evaluated so "as is" really means that we get the markup from
any contained NetUI tags within the content. So the JSP could have a
<netui:image> with the desired attributes along with text, and some other
elements like <span>. And as you said this is legal HTML. Do we currently do
any checking for illegal content such as an anchor, <input> or other
elements that make up the %formctrl entity in the HTML DTD? I don't think so
but just wanted to check.

Thanks,
Carlin

On 10/18/05, Daryl Olander <[EMAIL PROTECTED]> wrote:
>
> This is an interesting problem. The original design of the HTML tags was
> to
> name the form controls instead of using <input type="submit"> we used
> button, <input type="text"> became TextBox, etc. So the issue is that
> there
> are really two buttons in HTML <button> and <input
> type="{submit,reset,button}">.
>
> The current button works like this, you can specify the JSP attribute
> value,
> enter content or both. If you specify JSP attribute value, that becomes
> the
> HTML value attribute. If you specify content only, then that becomes the
> HTML value attribute value. If you specify both, the content overrides the
> value specified by the JSP tag value attribute.
>
> I think one way we can proceed is to change how the tag works (with the
> usual config switch on the behavior). If you simply specify either the JSP
> value attribute or content, then we generate the <input
> type="{submit,reset,button}"> form of the the tag. If you specify both
> then
> we using the <button> form with the content output as is. Obviously we
> then
> allow images, text (const/spans,etc). In looking at the HTML spec, this
> seems like it would be legal.
>
> At the moment, I don't think we should modify the <imageButton> this
> generates the <input type="image"> which is yet another form of a button
> in
> HTML (but can be used with image maps because the coordinates of of where
> the image was clicked is passed back to the server), but is pretty
> limitted
> in it's features. This is there to match the HTML spec. The real source of
> the confusion is that button doesn't match the HTML button.
>
> On 10/18/05, Carlin Rogers < [EMAIL PROTECTED]> wrote:
> >
> > Daryl, others,...
> >
> > I was looking at BEEHIVE-970 in JIRA and wondering about the best way to
> > solve this request. My plan was to add a new attribute for defining an
> > image
> > source. If set, then we just change the markup that this tag renders,
> from
> > <input type=...> to <button><img>text</button>. We'd maintain the
> original
> > markup, and just generate the new markup when there's an image src set
> via
> > the new attribute on the <netui:button>. Sound OK?
> >
> > I was looking at the <netui:imageButton> tag as well, wondering if we
> > needed
> > to modify it so that if content exists between the begin and end tag,
> then
> > we write out the <button><img>text</button> markup rather than the input
> > element and include the body as the text. However, I think that would
> just
> > cause some confusion as to the why we have two different tags if both
> tags
> > can do render the same elements. I think we just leave
> <netui:imageButton>
> > to generate <input type="image"> markup. Also, I think for this request,
> > the
> > users really want the flexibility to have this on the <netui:button> so
> > that
> > they can use the popup features, etc.
> >
> > Carlin
> >
> >
>
>

Reply via email to