"Henning P. Schmiedehausen" wrote:

> Robert Burrell Donkin <[EMAIL PROTECTED]> writes:
>
> >i would strongly seek to persuade you not to go down this route.
> >you can almost certainly achieve the result you want in your templates just
> >by altering the design a little so that it plays with ecs rather than against
> >it.
>
> They're not my templates. They're the designers' templates. That's the
> problem. ;-)

(BTW i have read the other post but replying to this one saves editing.)

OK. you've totally persuaded me :-)


you'll need to build a version from the repository source to get the changes that
stephen checked in.

this will give you the start and end tags (including the attributes, of course).

IMHO it's a bit more natural to use org.apache.ecs.ElementContainer rather than a
StringElement in order to hold the elements inside the form.
however, if you want to avoid having to store this element at the top, you can
get hold of the elements from the Form by using the methods inherited from
ConcreteElement.
when you're getting your starttag, you might add then to an element container
(which you could then toString). for example

public org.apache.ecs.ElementContainer
getContainedElements(org.apache.ecs.ConcreteElement e)
{
    org.apache.ecs.ElementContainer ec=new org.apache.ecs.ElementContainer();
    for (Enumeration en=e.elements();en.hasMoreElements();)
    {
        ec.addElement((org.apache.ecs.Element)en.nextElement());
    }
    return ec;
}


i could probably create an additional constructor for
org.apache.ecs.ElementContainer along these lines if people think that this is a
good idea.

- robert



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

Reply via email to