cancel
Showing results for 
Search instead for 
Did you mean: 

HTMLB Code not working Please help.....

Former Member
0 Kudos

Hello All,

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

Struggling with this since y'day.

<b>CODE</b>:

<u><b>UserInfoDynPage.java</b></u>

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");

}

}

}

-


<u><b>UserInfo.jsp</b></u>

<%@ 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>

-


<u><b>Portalapp.xml</b></u>

<?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

Message was edited by: Uday Hardikar

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Uday,

If u tru once without using any methods in doInitialization().

I think then u will get output .

After u will try by using that method .

It might be problem in doInitialization() method only.

IPortalComponentRequest req = (IPortalComponentRequest) getRequest();

IPortalComponentSession componentSession = req.getComponentSession();

UserInfoBean = new UserInfoBean();

componentSession.putValue("UserInfoBean",UserInfoBean);

Try like this.

cheers

BHI

Former Member
0 Kudos

Hi BHI,

Thank you for your input.

Had made silly mistake and got solved.

And now, I have another problem which is related to this same program but the error seems to be a different one.

Have posted another query:

OR

Please help me as its kinda urgent.

Thanks in advance.

Uday