You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Br...@wellsfargo.com on 2003/07/30 21:04:58 UTC

[OT] RE: Prob:Calling a bean:write inside html:text - Nesting is nice

The JSTL authors decided that the value might need calculation to work it
out,
but that a pattern would not require other tags to determine.

Were they right?
Maybe, maybe not.

If they adopted the approach I suggested,
they would just have some extra busy work supporting nesting for everything,
but they would not have to think about it, and would be 'right' everytime.

The conceptual size of the tag would be smaller than the approach they took,
because I would not need to look up the documentation to see which
attributes could be tags.

If the authors of XML took this approach,
not only would the authors of JSTL not think have about it,
but parsers would be simpler,
and whole paragraphs wasted on what should be an attribute
and what should be tag would be gone from the world.

So my solution is simple, pretend that the authors of XML did take this
approach.

Brendan



-----Original Message-----
From: Steve Raeburn [mailto:sraeburn@apache.org]
Sent: Wednesday, July 30, 2003 11:28 AM
To: Struts Users Mailing List
Subject: RE: Prob:Calling a bean:write inside html:text - Nesting is
nice


Try JSTL. For example: 

  <fmt:parseDate var="aDate"  pattern="dd/MM/yyyy" value="26/12/1968" />

is equivalent to:

  <fmt:parseDate  var="aDate" pattern="dd/MM/yyyy">
    26/12/1968
  </fmt:parseDate>

The content of the second example can even be generated by nested tags.

Steve

> -----Original Message-----
> From: Brendan.Johnston@wellsfargo.com
> [mailto:Brendan.Johnston@wellsfargo.com]
> Sent: July 30, 2003 11:10 AM
> To: struts-user@jakarta.apache.org
> Subject: RE: Prob:Calling a bean:write inside html:text - Nesting is
> nice
> 
> 
> It would be nice if this:
> 
> <aTag anAtribute="aValue" />
> 
> Parsed the same as:
> 
> <aTag>
>    <anAtribute>aValue</anAttribute>
> </aTag>
> 
> 
> Failing that it would be nice if any tags with attribute
> also accepted nested tags with the same name and meaning as an 
> alternative.
> 
> Brendan
> 
> 
> 
> 
> -----Original Message-----
> From: Craig R. McClanahan [mailto:craigmcc@apache.org]
> Sent: Wednesday, July 30, 2003 10:23 AM
> To: Struts Users Mailing List
> Cc: guruprasad_jg@ureach.com
> Subject: RE: Prob:Calling a bean:write inside html:text
> 
> 
> 
> 
> On Wed, 30 Jul 2003, James Childers wrote:
> 
> > Date: Wed, 30 Jul 2003 11:35:53 -0500
> > From: James Childers <jc...@hotels.com>
> > Reply-To: Struts Users Mailing List <st...@jakarta.apache.org>
> > To: Struts Users Mailing List <st...@jakarta.apache.org>,
> >      guruprasad_jg@ureach.com
> > Subject: RE: Prob:Calling a bean:write inside html:text
> >
> >
> > YOU CAN'T NEST TAGS.
> >
> > YOU CAN'T NEST TAGS.
> >
> > You, or anyone else, cannot nest tags. Tags cannot be nested. 
> Nesting tags
> is prohibited. If you nest a tag inside another tag, the page 
> won't compile.
> Nesting tags ist verbotten. Do not nest tags if you want your 
> page to work.
> >
> > The following won't work:
> >
> > <html:test property="<bean:write property="something" />" />
> 
> It is true that this won't work, but I would caution you that "nesting
> tags" actually means something different:
> 
>   <html:form ...>
>     <html:text .../>
>     <html:text .../>
>   </html:form>
> 
> which is perfectly legitimate.  A correct sentence describing what you
> cannot do is "You cannot use one tag to create all or part of the
> attribute value of another tag."
> 
> Craig
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
> 
> 
> 


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

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