Templates

10 views
Skip to first unread message

Pierre Lavignotte

unread,
Nov 20, 2009, 8:46:41 AM11/20/09
to Induction Framework
Hi,

I discovered Induction yesterday and after reading the documentation I
have to say that I like the approach of the framework and most of all
it simplicity.

Anyway, I have some questions about functionalities that are not
covered by the documentation or maybe by the framework.

- Does the framework allow to include a header and/or footer in all
views, or a range of views ?
- Is there an "include" template directive that could be processed by
FreeMarker, or pre-processed by Induction ?

Is there a road map for future functionnalities you talk about here
http://groups.google.com/group/induction-framework/browse_thread/thread/85256b27eb5e8a2b
?
By the way, what is "Tiles like fragment support" ?

Thanks,
Pierre
Message has been deleted

Adinath

unread,
Nov 23, 2009, 1:03:55 AM11/23/09
to induction...@googlegroups.com
On Fri, Nov 20, 2009 at 6:46 AM, Pierre Lavignotte <pierre.l...@gmail.com> wrote:
Hi,

I discovered Induction yesterday and after reading the documentation I
have to say that I like the approach of the framework and most of all
it simplicity.

Thanks, appreciate the feedback.
 
Anyway, I have some questions about functionalities that are not
covered by the documentation or maybe by the framework.

- Does the framework allow to include a header and/or footer in all
views, or a range of views ?

Yes, you can simply use Freemarker's <#include..> statement (http://freemarker.org/docs/ref_directive_include.html). Let me know if I misunderstood the question.
 
- Is there an "include" template directive that could be processed by
FreeMarker, or pre-processed by Induction ?

Yes, see above.
 

Is there a road map for future functionnalities you talk about here
http://groups.google.com/group/induction-framework/browse_thread/thread/85256b27eb5e8a2b ?

On more built-in AJAX support I want to think about it really carefully, I strive to keep the framework expressive yet simple...since I have no design in mind yet...I do not have a timeline at this time.

Right now I am working on 2 new features:

- a new <exception-to-class> directive in <controller-mapping> to be provide global error handlers to exceptions thrown by a controller/views.

- template buffering capability to be able to specify in the config if the out of the templating engine should be buffered. The purpose of this is to prevent an exception when processing  a template error to get written to the response.

I am expecting to complete these 2 features before the end of this month.
 
By the way, what is "Tiles like fragment support" ?

Basically I want to provide a way to compose more complex views using simpler views...the simpler views can be thought of as "tiles". This is also on of the goals of the Tiles framework as I understand it.

One idea I have in mind is to support a special include statement (for Freemarker at this time) where you can specify a view class class name instead of a template name. It would look something like this: <@include_view "myapp.view.MyViewName">

The advantage of this would be that the this view would get instantiated and processed by Induction relative to an instance of the myapp.view.MyViewName instead of the data of the calling template.

Regards,
Adi

Pierre Lavignotte

unread,
Nov 23, 2009, 2:42:03 AM11/23/09
to induction...@googlegroups.com
Adi,

thank you for the answer.

About FreeMarker : my mistake, I found the include directive in the FreeMarker documentation. That's exactly what I needed.
About the "Tiles like support", I gave a quick read at the Wicket documentation and as I understand it, you could use the same approch.
public class MyCompositeView extends CompositeView {
// Compose your view in a dedicated method, or maybe in the constructor so you can easilly use the injected params.
public void buildView() {
add(new MyFirstSimpleView());
add(new WhyNotATemplateView());
}
}

This would leave FreeMarker unmodified and you stay in full Java.

Pierre



--

You received this message because you are subscribed to the Google Groups "Induction Framework" group.
To post to this group, send email to induction...@googlegroups.com.
To unsubscribe from this group, send email to induction-frame...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/induction-framework?hl=.

Reply all
Reply to author
Forward
0 new messages