hi
collin,
with
XSPs an easier alternative would be to pass your 'parameter' as a request
parameter.
then
you would:
<map:match pattern="edit.xml">
<map:generate type="serverpages"
src=""/>
<map:serialize type="xml"/>
</map:match>
<map:match pattern="edit/*">
<map:generate
src=""/>
...
</map:match>
then
you can get the request parameter from within your XSP via the request
logicsheet (<xsp-request:get-parameter>) or via embedded logic
(request.getParameter ()).
the
other alternative; passing the parameter as a sitemap
parameter:
<map:match pattern="edit/*">
<map:generate type="serverpages"
src="">
<map:parameter name="entityType"
value="{1}"/>
</map:generate>
...
</map:match>
for
this to work you have to embed the appropriate logic into your XSP for
retrieving that parameter; as your compiled XSP is a generator in the end you
accomplish this by overriding its setup() method and process the parameter(s)
there.
just
as a hint (take a look at the respective sources/docs):
<xsp:page language="java" ...>
<xsp:logic> <!-- must occur before content so
that it doesn't become part of content/generate() method
-->
public void setup (SourceResolver resolver, Map
objectModel, String src, Parameters params) throws ...
{
// process parameter(s)
here
...
super.setup (resolver, objectModel, src,
params);
}
</xsp:logic>
<!-- content here -->
</xsp:page>
HTH
|
- Pass custom parameters into an XSP Collin VanDyck
- Re: Pass custom parameters into an XSP Marco Rolappe
- Re: Pass custom parameters into an XSP Collin VanDyck
- RE: Pass custom parameters into an XSP Nathaniel Alfred
- AW: Pass custom parameters into an XSP Marco Rolappe
- Re: Pass custom parameters into an XSP Collin VanDyck
- RE: Pass custom parameters into an XSP Geoff Howard