cancel
Showing results for 
Search instead for 
Did you mean: 

text area in HTMLB

Former Member
0 Kudos

hi all

Does anyone know the codes to generate a text area with HTMLB codings??

thanks

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

you can use com.sapportals.htmlb.HtmlEdit API which extends com.sapportals.htmlb.Component to generate Text Area Control.

or

com.sapportals.htmlb.TextEdit an editable text area.

code snippet:

import com.sapportals.htmlb.HtmlEdit;

...

public void doProcessAfterInput() throws PageException {

InputField myInputField =(InputField) getComponentByName("group_name_input");

if (myInputField != null) {

this.groupName = myInputField.getValueAsDataType().toString();

}

InputField id_input = (InputField) getComponentByName("group_name_input");

if (myInputField != null) {

this.emailId = id_input.getValueAsDataType().toString();

}

InputField id_subject =

(InputField) getComponentByName("subject_input");

if (id_subject != null) {

this.subject = id_subject.getValueAsDataType().toString();

}

<b>HtmlEdit htmlEdit = (HtmlEdit) getComponentByName("htmlEdit");

if (null != htmlEdit) {

this.mailBody = htmlEdit.getText().toString();</b>

}

}

Hope this helps

Former Member
0 Kudos

hi there

Sorry Divya, i got the question wrong. But thanks

My question is how to code a text area out using the JSP DynPage...

Sorry for not being clear, i am not really sure about the htmlb and all the Servlet thingy... Sorry ....

Former Member
0 Kudos

do you want to code for a text area in JSP dynpage.

do you need a code snippet.

Former Member
0 Kudos

hi there

huh wad is a codesnippet? i do not knoe can give me the codes like

<hjb:textArea codes .......>

i only need this part...can u pass me through here ?? Or any other way e-mail me ??

thanks loads!

Former Member
0 Kudos

oh ok got it. will send you in some time

Former Member
0 Kudos

You can use Text Edit.

using taglib

<hbj:textEdit

id="Edit_Text

text="Text to change - or just add text"

wrapping="SOFT"

tooltip="Edit and/or add text"

rows="10"

cols="30"

/>

using the classlib

Form form = (Form) this.getForm();

TextEdit te = new TextEdit("Edit_Text");

te.setText("Text to change - or just add text");

te.setWrapping(TextWrapping.SOFT);

te.setTooltip("Edit and/or add text");

te.setRows(10);

te.setCols(30);

form.addComponent(te);

Add a directive to any JSP file that references the tag lib. Directives for the HTMLB and Layout tag libs:

<%@ taglib uri="/SERVICE/com.sap.portal.htmlb/taglib/htmlb.tld" prefix="hbj" %>

<%@ taglib uri="/SERVICE/com.sap.portal.pagebuilder/taglib/layout.tld" prefix="lyt" %>

Add a ServicesReference reference to the tag lib service. The following shows the reference for the HTMLB and Layout tag libs

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

<property name="ServicesReference" value="com.sap.portal.pagebuilder"/>

Hope this helps.

Regards

Divya

Former Member
0 Kudos

thanks alot

Answers (0)