on 04-24-2007 7:47 AM
hi all
Does anyone know the codes to generate a text area with HTMLB codings??
thanks
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
User | Count |
---|---|
89 | |
10 | |
9 | |
9 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.