cancel
Showing results for 
Search instead for 
Did you mean: 

HTMLB Controls don't show up in JSP Page

ashwani_tomar
Participant
0 Kudos

I was trying to create some HTMLB controls in my JSP page but they don't work but if i write just plain text using JSP expression it works fine.Do i need to change something in my Deployment descriptor file?Below is my deployment descriptor and JSP file

-


DEPLOYMENT DESCRIPTOR FILE----


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

<application>

<application-config>

<property name="SharingReference" value="htmlb"/>

</application-config>

<components>

<component name="JSPDynPage1">

<component-config>

<property name="ClassName" value="com.nextsap.jsp.JSPDynPage1"/>

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

</component-config>

<component-profile/>

</component>

</components>

<services/>

</application>

-


JSP FILE----


<jsp:useBean id="myBean" scope="request" class="com.nextsap.bean.Bean1" />

<hbj:content id="myContext" >

<hbj:page title="Ashwani First JSPDyn Application">

<hbj:form id="myFormId" >

<%= myBean.getMessage() %>

<hbj:textView

id="Welcome_Message"

text="You are UNKNOWN USER"

design="HEADER1"

/>

</hbj:form>

</hbj:page>

</hbj:content>

-Ashwani

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Dear Ashwin,

please find the added changes at portallapp.xml and jsp page.

your jsp code is correct but made some changes for my conevenience.

in portalapp.xml taglib was missing,so added neccessary taglib at component-profile,please check and confirm the belwo code.

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

<application>

<application-config>

<property name="SharingReference" value="htmlb"/>

</application-config>

<components>

<component name="JSPDynPage1">

<component-config>

<property name="ClassName" value="com.nextsap.jsp.JSPDynPage1"/>

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

</component-config>

<component-profile>

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

</component-profile>

</component>

</components>

<services/>

</application>

//----


JSP CODE -


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

<hbj:content id="myContext" >

<hbj:page title="Ashwani First JSPDyn Application">

<hbj:form id="myFormId" >

<jsp:useBean id="myBean" scope="request" class="com.nextsap.bean.Bean1" />

<hbj:textView

id="Welcome_Message"

design="HEADER1"><%= myBean.getMessage()%></hbj:textView>

</hbj:form>

</hbj:page>

</hbj:content>

Regards,

Rama Krishna

ashwani_tomar
Participant
0 Kudos

It didn't work either..

Thanks for your efforts though

-Ashwani

ashwani_tomar
Participant
0 Kudos

Rama,

Thanks a ton for your help.It worked finally

-Ashwani

Answers (1)

Answers (1)

Former Member
0 Kudos

Dear ashwani,

can you paste the HTMLB code i.e code writeen with HTMLB classes.

after creating HTMLB components.

are you creating the form.

map your HTMLB code with HTMLB taglib.

like <page><form></form></page> in HTMLB TAGLIB.

for your HTMLB class code you need to start with pagecontext.

then from pagecontext need to get FORM.

then creat componets.

for this you need to take two steps

1)creat defaultmodel.

2)bind the model to the component.

now component is done.

add this component to form.

FORM.addComponent(xyz);

and render the form(FORM.render())

if you are not able to see any components then there is some problem in rendering.

just comment form rendering.

and execute PageContext Rendeing.

Pagecontext.render();

see that your components are added to form

and u are executing form.render or pagecontext.render();

Thanks & Regards,

Rama Krishna

ashwani_tomar
Participant
0 Kudos

Hello Rama,

Thanks for your response.I am a newbie. I have pasted my code in my query if you could pl. take a look and let me know where i am going wrong and why the text is appearing in my form and why not the HTMLB control.

Thanks

-Ashwani