Skip to Content
0
Former Member
Nov 04, 2005 at 06:16 AM

HTMLB code not working...Please help.

20 Views

Hello All,

Ive new in HTMLB. Have written this code wherein a JSP page is called from a JSPDynPage file. But am not getting any output. Its all blank. Dunno if im going wrong .... Please help.

Struggling with this since y'day.

CODE:

UserInfoDynPage.java

package com.sap.sample;

import com.sapportals.htmlb.*;

import com.sapportals.htmlb.enum.*;

import com.sapportals.htmlb.event.*;

import com.sapportals.htmlb.page.*;

import com.sapportals.portal.htmlb.page.*;

import com.sapportals.portal.prt.component.*;

public class UserInfoDynPage extends PageProcessorComponent

{ public DynPage getPage()

{ return new UserInfoDynPageDynPage();

}

public static class UserInfoDynPageDynPage extends JSPDynPage

{ //private UserInfoBean UserInfoBean = null;

public void doInitialization()

{ IPortalComponentRequest request = (IPortalComponentRequest) this.getRequest();

IPortalComponentSession componentSession = ((IPortalComponentRequest)getRequest()).getComponentSession();

/*Object o = componentSession.getValue("UserInfoBean");

if(o==null || !(o instanceof UserInfoBean))

{ UserInfoBean = new UserInfoBean();

componentSession.putValue("UserInfoBean",UserInfoBean);

}

else

{ UserInfoBean = (UserInfoBean) o;

}*/

// fill your bean with data here...

}

public void doProcessAfterInput() throws PageException

{

}

public void doProcessBeforeOutput() throws PageException

{ this.setJspName("UserInfo.jsp");

}

}

}

-


UserInfo.jsp

<%@ taglib uri="tagLib" prefix="hjb" %>

<hbj:content id="myContext" >

<hbj:page title="UserInfo Page">

<hbj:form id="myFormId" >

<hbj:textView id="title" text="Search Screen" design="STANDARD" />

<table>

<tr>

<td>

<hbj:label id:"lb_Search" text"Search For" labelFor="search" />

</td>

<td>

<hbj:inputField id="search" type="string" maxlength="25" />

</td>

</tr>

<tr>

<td>

<hbj:label id="lb_SearchType" text="Search Type" labelFor="searchType" />

</td>

<td>

<hbj:dropdownListBox id="SearchType" tooltip="UME Object to search for" disabled="false">

<hbj:listBoxItem key="user" value="User" />

<hbj:listBoxItem key="group" value="Group" />

<hbj:listBoxItem key="role" value="Role" />

</hbj:dropdownListBox>

</td>

</tr>

</table>

<br>

<hbj:button id="submit" text"search!" tooltip="Click me to search" disabled="false" design="emphasized" />

<br>

<br>

</hbj:form>

</hbj:page>

</hbj:content>

-


Portalapp.xml

<?xml version="1.0" encoding="utf-8"?>

<application>

<application-config>

<property name="PrivateSharingReference" value="com.sap.portal.htmlb"/>

</application-config>

<components>

<component name="UserInfoDynPage">

<component-config>

<property name="ClassName" value="com.sap.sample.UserInfoDynPage"/>

<property name="ComponentType" value="jspnative"/>

<property name="JSP" value="pagelet/UserInfo.jsp"/>

</component-config>

<component-profile>

<property name="tagLib" value="/SERVICE/htmlb/taglib/htmlb.tld"/>

</component-profile>

</component>

</components>

<services/>

</application>

=============

Please help.

Awaiting Reply.

Thanks,

Uday