When using AJAX to dynamically request small pieces of a page, there is
a need for a number of small components that would handle those
requests. Since components are small it would be preferable to pack
them as sub-components of a single component instead of creating a file
per a component:
lib.ecpp:
-------------------------------------------------------------
<%def comp1> ... <%/def>
<%def comp2> ... <%/def>
<%def comp3> ... <%/def>
...
-------------------------------------------------------------
At the moment the only way to call sub-components directly from a page
that I am aware of is to pass the name of a sub-component as a parameter
of a request:
/lib?sub=comp2
My lib.ecpp, ignoring error handling, would look like this:
-------------------------------------------------------------
<%args>
sub;
</%args>
% std::string lib("lib");
<& (lib + "." + sub) >
<%def comp1> ... <%/def>
<%def comp2> ... <%/def>
<%def comp3> ... <%/def>
...
-------------------------------------------------------------
Does anyone else use similar technique? Are there other ways to call
sub-components from a browser?
Thanks in advance,
Yuri
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Tntnet-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tntnet-general