struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From victor sosa <victorns...@gmail.com>
Subject Re: Problem developing a tag using Struts 2 Arch for Tags
Date Mon, 10 Dec 2007 15:02:47 GMT

I solve Newton :)

The problem was that I need to overriding this to method:

public int doEndTag() throws JspException {
        component = null;
        return EVAL_PAGE;
    }

    public int doAfterBody() throws JspException {
        boolean again = component.end(pageContext.getOut(), getBody());

        if (again) {
            return EVAL_BODY_AGAIN;
        } else {
            if (bodyContent != null) {
                try {
                    bodyContent.writeOut(bodyContent.getEnclosingWriter());
                } catch (Exception e) {
                    throw new JspException(e.getMessage());
                }
            }
            return SKIP_BODY;
        }
    }

note: This in the sub class TAG



newton.dave wrote:
> 
> --- victor sosa <victornsosa@gmail.com> wrote:
>> Well, It doesn't iterate (end method), what means "When there aren't any
>> objects left to iterate over it does some cleanup and
>> goes away." ???????
> 
> See this code in end()?
> 
>> if (iterator!=null && iterator.hasNext()) {
>>     Object currentValue = iterator.next();
>>     stack.push(currentValue);
> 
> That's what puts the next object on the stack.
> 
> I'm still not sure why you're building JSON this way, though.
> 
> d.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Problem-developing-a-tag-using-Struts-2-Arch-for-Tags-tp14138771p14254523.html
Sent from the Struts - User mailing list archive at Nabble.com.


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


Mime
View raw message