You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Louis Moore <lr...@yahoo.com> on 2003/06/01 21:31:25 UTC

RE: TDK Sample Application: Flux

> 1) why are commas used? Why not slashes?

The commas are used because in Turbine a "/" can be
used to separate path info as in username/turbine.  If
you prefer the ?username=turbine format you can use 

$link.setPage("path,to,Template.vm").addQueryData("username",turbine)


as opposed to 

$link.setPage("path,to,Template.vm").addPathInfo("username",turbine)

The reasoning behind allowing both formats was
explained a while back on the mailing list:
Turbine treats the 2 urls exactly the same. The main
reason for this was that search engines (at least at
some time in the past, do not know if this is still
accurate for the various indexers) do not index urls
with query data.  If your site includes a catalog of
items possibly for sale, it is possible that you might
want the site indexed.  If you are not concerned with
this or you are specifically trying to avoid the
search engines from various pages using query data is
fine.

> 
> 2) There is no FluxUserList.class in the
> WEB-INF/classes hierarchy, nor
> in the flux-X.X.jar file in WEB-INF/lib. It must be
> somewhere, unless
> mapped to another class. Can you map templates to
> classes?
> 

Actually there is no FluxUserList.java file in this
case.  When using the Pull Model (see
http://jakarta.apache.org/turbine/turbine-2.2.1/howto/pullmodel-howto.html
and
http://jakarta.apache.org/turbine/turbine-2.2.1/pullmodel.html)
there is no need to have a Java screen class for each
template.  Instead of having a FluxUserList.java class
to push data into the template, the FluxUserList.vm
template uses the Flux pull tool to pull data into the
template.  For example, the line #foreach ($user in
$flux.Users) makes a call to the Flux pull tool
getUsers() function to pull a collection of all the
Users in the system. And in FluxUserForm.vm, the line
#if ($flux.Mode == "modify") makes a call to the Flux
tool's getMode() function, that simply returns the
value of the "mode" parameter.

Hope that helps,
Lou

__________________________________
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com

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