Hi
I am trying to capture form data on a controller on the submit of the form.But my controller is not getting called when I click the submit button. Below is Appearance XSL and content XML ,I am using for the component. Can anyone let me know where I am going wrong.
Code:
<br>Appearance XSL<br>--------------------------------------------------------------------<br><!DOCTYPE html-entities SYSTEM "<a href="http://www.interwoven.com/livesite/xsl/xsl-html.dtd"><br><xsl:stylesheet" target="_blank">http://www.interwoven.com/livesite/xsl/xsl-html.dtd"><br><xsl:stylesheet</a> version="1.0" xmlns:xsl="<a href="http://www.w3.org/1999/XSL/Transform"><br>" target="_blank">http://www.w3.org/1999/XSL/Transform"><br></a> <!-- Skin: Default (Default Browser Type) --><br><br> <xsl:include href="<a href="http://www.interwoven.com/livesite/xsl/HTMLTemplates.xsl"/><br>" target="_blank">http://www.interwoven.com/livesite/xsl/HTMLTemplates.xsl"/><br></a> <xsl:include href="<a href="http://www.interwoven.com/livesite/xsl/StringTemplates.xsl"/><br>" target="_blank">http://www.interwoven.com/livesite/xsl/StringTemplates.xsl"/><br></a> <xsl:template match="/"><br> <xsl:variable name="cID" select="/Properties/@ComponentID"/><br> <xsl:variable name="redirecturl"<br> select="/Properties/Data/Datum[@ID='D01']"/><br> <div><br><form method="GET" name="RegistrationForm"><br><input type="hidden" name="ComponentID" value="{$cID}"/><br> <input type="hidden" name="iwPreActions" value="mycontroller;"/><br> <input type="hidden" name="redirecturl" value="{$redirecturl}"/><br> Name:<br> <input name="username" type="text" /><br/><br> password:<br> <input name="password" type="password" /> <br> <input type="submit" name="submit"/><br> </form><br> </div><br> </xsl:template><br></xsl:stylesheet><br><br>Appearance XML<br>-----------------------------<br><br><Properties ComponentID="1217931052359"><br></Properties><br><br><br>Content XML<br>-------------------------------------------------------------------<br><br><Data><br><Datum ID="D01" Name="My PageLink" Type="PageLink">$PAGE_LINK[My Page]</Datum><br><Controllers><br> <Controller Name="mycontroller"><br> <Object>com.himansu.controller.MyController</Object><br> <Method>myForwardMethod</Method><br> <Param Name="redirecturl"/><br></Controller><br></Controllers><br> </Data><br><br><br>MyController.java<br>-------------------------<br>package com.himansu.controller;<br><br>import org.apache.commons.logging.Log;<br>import org.apache.commons.logging.LogFactory;<br><br>import com.interwoven.livesite.common.web.ForwardAction;<br>import com.interwoven.livesite.common.web.URLRedirectForwardAction;<br>import com.interwoven.livesite.runtime.RequestContext;<br><br>public class MyController {<br> private static final Log mLogger = LogFactory.getLog(MyController.class);<br> <br> public ForwardAction myForwardMethod(RequestContext context){<br> String username = context.getParameterString("username");<br> String password = context.getParameterString("password");<br> mLogger.debug("username :: password "+username +" :: "+ password + ":: redirect URL :: "+context.getParameterString("redirecturl"));<br> return new URLRedirectForwardAction(context,context.getParameterString("redirecturl"));<br> }<br><br>}<br>