>Should the doBuildTemplate return a ConcreteElement to follow the
>doBuildScreen() ?

Read my other message titled 'Re: [PATCH] Changes Screen building to 
use Template pattern' that I sent tonight. I have some general 
questions about the purpose of 'build' and the renamed version 
'doBuildScreen'. I think those questions need to be answered before I 
go whole-hog and rewrite a bunch of stuff...

[By the way, my initial thought is that its better to return 
ConcreteElements rather than add them into 'data' as it gives more 
control to the caller of the method and makes the 'build' methods 
assume less about 'data'...]

Chris
[EMAIL PROTECTED]

>Also, just to make sure I understand, the doBuildTemplate() will be
>overidden by subclasses and the buildTemplate() will contain the base
>implementation. So there should be a call to doBuildTemplate() in
>buildTemplate() right? like this -
>
>  protected ConcreteElement doBuildTemplate( RunData data )
>     throws Exception
>   {
>       //Add to context here   
>       return null;      
>   }
>
>   protected ConcreteElement buildTemplate( RunData data )
>   throws  Exception
>   {
>        WebContext context = getContext(data);
>
>        doBuildTemplate( data, context );
>
>        String templateName = data.getParameters().getString("template");
>        return buildWMTemplate( context, "screens" + templateName);
>    }
>
>  --
>dave
>[EMAIL PROTECTED]


------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Problems?:           [EMAIL PROTECTED]

Reply via email to