on 09-01-2007 5:32 PM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
25 | |
12 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.