Now that all the default things are working I'm trying to extend things to
suit my needs.
I'm trying to link a number of templates to components I have for accessing
data. As a starter I copied the selectUser file and changed it accordingly,
(see below, copyright omitted for clarity). I expected to access this
variable by using the following code in a template but all I get is the
warning that myName is undefined. I expect I'm overlooking something simple
and apologise in advance.
$page.setTitle("showname")
<center>
<table cellpadding="2" cellspacing="0" width="100%">
<tr>
<td>My</td><td>Name</td><td>$myName</td>
</tr>
</table>
</center>
package org.apache.turbine.admin.screens.admin.user;
// JDK Imports
import java.util.Vector;
// Turbine/Village/ECS Imports
import org.apache.turbine.modules.*;
import org.apache.turbine.modules.screens.*;
import org.apache.turbine.util.*;
import org.apache.turbine.util.db.*;
import org.apache.turbine.om.security.*;
import org.apache.turbine.om.security.peer.*;
import org.apache.ecs.*;
import org.apache.ecs.html.*;
import org.apache.ecs.filter.*;
// Webmacro Stuff
import org.apache.turbine.services.webmacro.*;
import org.webmacro.servlet.*;
/**
* This screen lists all users in the system in a Select box.
*
* @author <a href="mailto:[EMAIL PROTECTED]">Dave Bryson</a>
*/
public class showName extends UserScreen
{
/**
* Build the screen context.
*
* @param data Turbine information.
* @param context Context for web pages.
* @exception Exception, a generic exception.
*/
public void doBuildTemplate( RunData data,
WebContext context )
throws Exception
{
context.put("myName","colin");
}
}
------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
Problems?: [EMAIL PROTECTED]