Skip to Content
0
Former Member
May 16, 2005 at 07:23 PM

Pls help! question on sample jsp...

14 Views

Hi, I would like to understand this sample JSP better (yetanother.jsp from the TemplateJSPDynPage.par file downloaded from "Getting Started Section" of PDK inside my EP6.0). I have inserted 4 questions and statements(that I hope you can verify as correct or not) inside the code that I hope you can answer, they are marked by <b>"*** ***"</b>. Thank you so much for your help !

Thanks again,

Baggett.

<b><!-- #1 *** *** 'tagLib' is the folder containing tag(hbj) that I will use, am I right? Also, where is this tag(hbj) located? I went to my taglib folder(<ProjectName>/dist/PORTAL-INF/taglib), but nothing is there. Is 'hbj' just a name I can create for the tag?--> </b>

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

<b><!-- #2 *** *** 'myBean' is the name I create for the bean or class(bean.TemplateJSPDynPageBean) that I will use, am I right? What is scope? A bean is just a java class. Do you know where the bean.TemplateJSPDynPageBean is located on my machine? --></b><jsp:useBean id="myBean" scope="application" class="bean.TemplateJSPDynPageBean" />

<hbj:content id="myContext" >

<hbj:page title="Yet Another Page">

<hbj:form>

<hbj:gridLayout>

<b><!-- #3 *** *** Can you please provide info on each of these elements below: hbj, gridLayoutCell, rowIndex, columnIndex, what they are or do, how are they related? --></b> <hbj:gridLayoutCell rowIndex="1" columnIndex="1">

<b><!-- #4 *** *** myTextView is an instance of textView, setText is a method inside textView java class, and getText is a method inside myBean(TemplateJSPDynPageBean class), am I right?--></b>

<hbj:textView id="myTextView">

<% myTextView.setText(myBean.getText()); %>

</hbj:textView>

</hbj:gridLayoutCell>

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

<hbj:button id="button"

text="Yet Another Button"

onClick="onYetAnotherStateButtonClicked"/>

</hbj:gridLayoutCell>

</hbj:gridLayout>

</hbj:form>

</hbj:page>

</hbj:content>