Hi,
I have created an action which returns parameters to a pipeline based on a users login details. I want these details to persist for the du ration of a user session and wanted to know how to store the values passed into the pipeline into a JavaBean instead. At the moment I have the parameters coming into my action as so:
1. pipeline
<map:match pattern="user-details">
<map:act type="get-detail2">
<map:parameter name="user" value="{request-param:user}" />
<map:parameter name="pass" value="{request-param:pass}" />
<map:generate type="file" src="content/main.xml" />
<map:transform src="style/main.xsl">
<map:transform src="style/main.xsl">
<map:parameter name="first_name" value="{first_name}" />
<map:parameter name="last_name" value="{last_name}" />
<map:parameter name="address1" value="{address1}" />
<map:parameter name="address2" value="{address2}" />
<map:parameter name="address3" value="{address3}" />
<map:parameter name="postcode" value="{postcode}" />
<map:parameter name="country" value="{country}" />
<map:parameter name="email" value="{email}" />
<map:parameter name="home_telephone" value="{home_telephone}" />
<map:parameter name="mobile_telephone" value="{mobile_telephone}" />
<map:parameter name="date_joined" value="{data_joined}" />
</map:transform>
<map:serialize type="html" />
</map:act>
and are passed into the pipeline from the Action as so:
2. Action
map.put("user_id", rs.getString(1));
map.put("first_name", rs.getString(2));
map.put("last_name", rs.getString(3));
map.put("address1", rs.getString(4));
map.put("address2", rs.getString(5));
map.put("address3", rs.getString(6));
map.put("postcode", rs.getString(7));
map.put("country", rs.getString(8));
map.put("email", rs.getString(9));
map.put("home_telephone", rs.getString(10));
map.put("mobile_telephone", rs.getString(11));
map.put("date_joined", rs.getString(12));
and then into my xsl page as so
3. xsl
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:param name="user_id"/>
<xsl:param name="first_name"/>
<xsl:param name="last_name"/>
<xsl:param name="address1"/>
<xsl:param name="address2"/>
<xsl:param name="address3"/>
<xsl:param name="postcode"/>
<xsl:param name="country"/>
<xsl:param name="email"/>
<xsl:param name="home_telephone"/>
<xsl:param name="mobile_telephone"/>
<xsl:param name="date_joined"/>
Could I call and update the javabean from the within the transform:
<map:transform src="style/main.xsl">
instatiate javabean
javabean.user_id = <map:transform src="style/main.xsl">
</map:transform>
Or would it be better to do it from within the Action and then just call the call javabean from within the xsl page itself? ultimately I want to be able to call the javebean parameters into my xsl or xsp pages. What is the best way to go about doing this? Is there any example code out there I can have a look at?
Andrew
- RE: Actions, pipelines, javabeans... beyaNet Consultancy
- RE: Actions, pipelines, javabeans... Morley Howell
- RE: Actions, pipelines, javabeans... Ralph Goers
- Re: Actions, pipelines, javabeans... beyaNet Consultancy
- Re: Actions, pipelines, javabeans... beyaNet Consultancy
- Re: Actions, pipelines, javabeans... beyaNet Consultancy
- RE: Actions, pipelines, javabeans... Ralph Goers
- Re: Actions, pipelines, javabeans... beyaNet Consultancy
- RE: Actions, pipelines, javabeans... Morley Howell
- Re: Actions, pipelines, javabeans... beyaNet Consultancy
- RE: Actions, pipelines, javabean... Morley Howell
