Skip to Content
Former Member
Feb 06, 2007 at 04:37 AM

JSPDynPage event not firing


Hi, <p>

I created a JSPDynPage and subsequently coded the corresponding jsp and java file(s).</p>


<%@ taglib uri = "tagLib" prefix = "hbj" %><br>

<hbj:content id = "myContext"><br>

<hbj:page title="Check LockOut Count"><br>

<hbj:form id="myForm"> <br>

<hbj:textView id="welcome_message" design="header1" text="Please enter the following information:"/><br>


<hbj:gridLayoutCell rowIndex="1" columnIndex="1"><br>

<hbj:label id="lblLoginID" required="true" text="Login ID:" design="Label" labelFor="txtLoginID"/><br>


<hbj:gridLayoutCell rowIndex="1" columnIndex="2"><br>

<hbj:inputField id="txtLoginID" type="string" maxlength="100"/><br>



<hbj:button id="btnSubmit" text="Check" onClick="btnSubmitClicked" width="100" design="emphasized" /><br>






<b>Java File</b>

<p>package com.WebService.ActiveDirectory;<br><br>

import com.WebService.CheckPasswordExpiryResponse;<br>

import com.sapportals.htmlb.InputField;<br>

import com.sapportals.htmlb.event.Event;<br>





import com.sapportals.portal.prt.component.IPortalComponentResponse;<br>

import com.sapportals.portal.prt.runtime.PortalRuntime;<br><br>

public class CheckLockOutCount extends PageProcessorComponent {<br><br>

public DynPage getPage(){<br>

return new CheckLockOutCountDynPage();<br>


public static class CheckLockOutCountDynPage extends JSPDynPage{<br>

private String loginID;<br>

private String results;<br>


public CheckLockOutCountDynPage() {<br>

this.setTitle("Check LockOut Count");<br>



public void doInitialization(){<br>

} <br><br>

public void doProcessAfterInput() throws PageException {<br>

InputField txtLoginID = (InputField)getComponentByName("txtLoginID");<br>

this.loginID = txtLoginID.getValue().toString(); <br>


public void doProcessBeforeOutput() throws PageException { <br>


public void onbtnSubmitClicked(Event event) throws PageException {<br>

IPortalComponentResponse response = (IPortalComponentResponse)this.getResponse();<br>

response.write("<script language='JavaScript'>");<br>

response.write("alert('Event fired');");<br>


} <br>




<b>Expected results</b>

<p>Once the user enters the login ID and click the "Check" button, the user should receive a Java Alert message, which says "Event fired". However, when the button is clicked, nothing happens. The page refreshes and the input field is reset.<br>

Can anyone point out what went wrong?</p>


Thank You.

Message was edited by:

Voon Siong Lum