HTMLB

Hello</b>,
I want to create a JSP using HTMLB tag. My problem is that i'dont how to do this well ? I created some JSP exactly as in the samples I found but it doesn't work when I ran them on my EP6. The view stay empty ?!
By default, NWDS don't put the line <%@ taglib uri="htmlb.tld" prefix="hbj" %>. If I deployed without, it work well. But if I put this line to my JSP, I've got the error :
Erreur d'exécution portail
Une erreur est survenue lors du traitement d'une requête pour :
iView : N/A
Nom du composant : N/A
Error in parsing taglib 'htmlb.tld' tag in web.xml or .tld file of the taglib library..
Exception id: 03:01_06/04/05_0013_7226250
See the details for the exception ID in the log file
Could anyone help me ? I'm using the NWSD to create and deploy my JSPDynPage.
Best regards</b>.

You are missing the following lines from portalapp.xml.
<component-profile>
        <property name="tagLib" value="/SERVICE/htmlb/taglib/htmlb.tld"/>
</component-profile>
and also replace the top line in your JSP to following.
<%@ taglib uri="tagLib" prefix="hbj" %>

Similar Messages

  • Unable to capture onClick event of htmlb:image in a controller

    Hi,
    I am trying to capture onClick event of an htmlb:image (which is present in my view) in DO_HANDLE_EVENT method of my controller.
    Surprisingly, when I click the image, page does refreshes. But the event in not captured in do_handle_event method. Control never reaches that method. Whereas if I put onClick event of a button, it is easily captured in do_handle_event method.
    Ex. code in my view is:
    <%@page language="abap"%>
    <%@extension name="bsp" prefix="bsp" %>
    <%@extension name="htmlb" prefix="htmlb"%>
        <htmlb:image id      = "searchimg"
                     src     = "consvalue.jpg"
                     onClick = "search"  />
        <htmlb:button id="searchbutton" onClick="search"
                                     text="Event Test"/>
    Now, the button event is captured, but not the image event.
    Any idea why this might be happening?
    Regards,
    Kaushal

    Hi Kaushal,
    are image and button enclosed by <htmlb:form> ?
    Please post your of do_handle_event, where you look for the event.
    Regards,
    Sebastian

  • Htmlb:get the values from bean n display it in textView

    Hi,
    I am doing one PDK application using jspdyn page. In jsp page I am using htmlb to display the table. In that I am using one text view element. There I need to get the values from bean class.And display it in a table.
    Can anyone help me how can use the textView inside htmlb to retrieve the values from bean.
    Thanks & Regards
    Vineela

    hi vineela,
    For the textView, in the text value write the code  <%=myBean.getStr()%>
    where myBean will be your bean class and getStr() is the method in the bean class whcih returns value which needs to be displayed on the screen.
    Thanks
    Harsimran

  • Htmlb:Retrive values from bean n display it in textView

    Hi,
    I am doing one PDK application using jspdyn page. In jsp page I am using htmlb to display the table. In that I am using one text view element. There I need to get the values from bean class.And display it in a table.
    Can anyone help me how can use the textView inside htmlb to retrieve the values from bean.
    Thanks & Regards
    Vineela

    hi vineela,
    check this
    https://www.avispublics.com/irj/portalapps/com.sap.portal.pdk.htmlb.htmlbmanuals/docs/dynpage-01.html
    https://ww2.avispublicsduparisien.com/irj/portalapps/com.sap.portal.pdk.htmlb.htmlbmanuals/docs/tableview-01.html
    bvr
    Edited by: bvr on Mar 4, 2009 12:06 PM

  • Error in the standard htmlb.jar from EP6 SP9 (HTMLx)

    I've successfully migrated my custom developed applications from EP5 SP5 to EP6 SP9. I've used the well known 3rd party
    HTMLxframework for the DatePicker and Locale corrections only (I am a brazilian developer). 
    In the org.sapportals.htmlb.rendering there is a class named RenderUtil.
    This class has two places with this specific code:
    ResourceBundle r = ResourceBundle.getBundle("java.text.resources.LocaleElements", locale);
    Which is very wrong as the "java.text.resources.LocaleElements" is available only until j2sdk 1.3. In the EP5 that runs under 1.3 there's no problem but EP6 uses j2sdk 1.4 and this packages has been relocated from the standard package to a "ext" (extension) package and been renamed as "sun.text.resources.LocaleElements".
    So, as HTMLx uses this RenderUtil class, I had to decompile the original from the htmlb.jar using JAD and corrected the above line with the following new line or code:
    ResourceBundle r = ResourceBundle.getBundle("sun.text.resources.LocaleElements", locale);
    More than that, I had to change several places of the HTMLx's HxInputFieldRenderer to reflect the class name changes made to the CSSs of the EP6. In the new version SAP does not open a pop-up window for the DatePicker. Instead they chose to rewrite it as a dynamic layer. So the HTMLx code has to change to reflect that.
    Here follows the workaround version of HxInputFieldRenderer.java (notice that some strings are not internationalized, I just copied and pasted the parts I needed, so it's not a definitive version, but will help you get a clue of what to do):
    * HxInputFieldRenderer.java
    * Copyright (C) 2003  Alan Hobbs
    * This library is free software; you can redistribute it and/or
    * modify it under the terms of the GNU Lesser General Public
    * License as published by the Free Software Foundation; either
    * version 2.1 of the License, or (at your option) any later version.
    * This library is distributed in the hope that it will be useful,
    * but WITHOUT ANY WARRANTY; without even the implied warranty of
    * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    * Lesser General Public License for more details.
    * You should have received a copy of the GNU Lesser General Public
    * License along with this library; if not, write to the Free Software
    * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    package org.open.sapportals.htmlx.rendering;
    import javax.servlet.jsp.PageContext;
    import org.open.sapportals.htmlx.HxField;
    import org.open.sapportals.htmlx.HxInputField;
    import org.open.sapportals.htmlx.HxLocaleUtil;
    import com.sapportals.htmlb.Component;
    import com.sapportals.htmlb.Form;
    import com.sapportals.htmlb.InputField;
    import com.sapportals.htmlb.enum.DataType;
    import com.sapportals.htmlb.enum.InputFieldDesign;
    import com.sapportals.htmlb.enum.ResourceType;
    import com.sapportals.htmlb.rendering.DefaultInputFieldRenderer;
    import com.sapportals.htmlb.rendering.IPageContext;
    import com.sapportals.htmlb.type.AbstractDataType;
    import com.sapportals.htmlb.type.DataDate;
    import com.sapportals.htmlb.type.DataString;
    import com.sapportals.htmlb.type.Date;
    import com.sapportals.portal.prt.component.IPortalComponentRequest;
    import com.sapportals.portal.prt.component.IPortalComponentResponse;
    import com.sapportals.portal.prt.logger.ILogger;
    import com.sapportals.portal.prt.runtime.PortalRuntime;
    import com.sapportals.portal.prt.service.urlgenerator.IUrlGeneratorService;
    import com.sapportals.portal.prt.service.urlgenerator.specialized.IPortalUrlGenerator;
    import com.sapportals.portal.prt.service.urlgenerator.specialized.ISpecializedUrlGenerator;
    * @author Alan.Hobbs
    * To change the template for this generated type comment go to
    * Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
    * Render the HxInputField.
    * Version   Date         Author     Description
    * 0.1.0     1-Aug-2003   AHobbs     Origional
    * 0.1.0     4-Aug-2003   AHobbs     Added resource bundle
    * 0.1.1     6-Aug-2003   AHobbs     Write hidden fields to store the locale
    * 0.1.1     8-Aug-2003   AHobbs     Don't show the date picker button if the field is disabled
    * 0.1.2    10-Aug-2003   AHobbs     Only generate the month and day name javascript once per form
    * 1.1.0     1-Apr-2004   AHobbs     Added render methods to allow a HTMLB InputField
    *                                   to be used instead of a HxInputField
    * 1.1.0     6-Apr-2004   AHobbs     Changed the names for the hidden fields to "_HTMLX_xxxxx"
    * 1.1.0    20-Apr-2004   AHobbs     Allow debug code to be written to the console with System.out.println()
    * 1.3.0      4-May-2004  AHobbs     Added PopUp rendering
    public class HxInputFieldRenderer extends DefaultInputFieldRenderer {
        protected ILogger m_logger = PortalRuntime.getLogger("htmlx");
        private static boolean writingDebugToConsole;
        public HxInputFieldRenderer() {
            super();
        public void render(Component component, IPageContext pc)
            m_logger.info("Entry: HxInputFieldRenderer.render()");
            if (!(component instanceof HxInputField)) {
                m_logger.warning(
                    "HxInputFieldRenderer.render() component is not instanceof HxInputField " +
                    "(component.getClass().getName()='" + component.getClass().getName() + "')");
                return;       
            HxInputField inf = (HxInputField)component;
            DataType type = inf.getType();
            if (writingDebugToConsole) {
                System.out.println("Start    rendering HxInputField (id='" + inf.getId() + "') ...");
            m_logger.info("  id='" + inf.getId() + "'");
            m_logger.info(inf.toString());
    /*  Only include for PDK version 5.0.5.0 and above - may not be required ???
    //        m_logger.info("  VersionInfo.getVersion()='" + VersionInfo.getVersion() + "'");
    //      if (VersionInfo.?????) {
    //            if (pc.isUsingSession() && !inf.isVisible() && inf.getParkInSession()) {
    //                String uniqueName = pc.getParamIdForComponent(inf);
    //                Object value = inf.getValue();
    //                String valueString = null;
    //                if (value != null) {
    //                    if (value instanceof AbstractDataType) {
    //                        AbstractDataType dataValue = (AbstractDataType)value;
    //                        if (dataValue != null)
    //                            if (dataValue.isValid())
    //                                valueString = dataValue.toString(pc);
    //                            else
    //                            if (dataValue instanceof DataString)
    //                                valueString = dataValue.toString(pc);
    //                            else
    //                                valueString = dataValue.getValueAsString();
    //                    else {
    //                        valueString = value.toString();
    //                else {
    //                    valueString = "";
    //                pc.getParamList().put(uniqueName, valueString);
    //                return;
            boolean showDateHelp = false;
            if (DataType.DATE.equals(type)
            && inf.isShowHelp()
            && !inf.isDisabled()) {
                showDateHelp = true;
            boolean showPatternHint = false;
            if (inf.isShowPatternHint()
            && (DataType.DATE.equals(type)
            ||  DataType.TIME.equals(type))
            ||  ((inf.getPatternHint() != null) && (inf.getPatternHint().length() > 0))) {
                showPatternHint = true;
            boolean showStatusMsg = false;
            if (inf.isShowStatusMsg() && (inf.getStatusMsg() != null) && (inf.getStatusMsg().length() > 0)) {
                showStatusMsg = true;
            if (showDateHelp || showPatternHint || showStatusMsg) {
                pc.write("<table cellspacing="0" cellpadding="0" border="0" id="");
                pc.write(""><tr><td>");
              String uniqueName = pc.getParamIdForComponent(inf);
            if (inf.isVisible()) {
                 pc.write("<span id="");
                   pc.write(uniqueName);
                 pc.write("-r" class="urEdfHelpWhl">");
                if (inf.isPassword())
                    pc.write("<input type="password" class="sapEdf");
                else
                    pc.write("<input type="text" class="sapEdf");
                if (inf.isInvalid())
                    pc.write("i");
                if (inf.isRequired())
                    pc.write("Req");
                else
                    pc.write("Txt");
                if (inf.isDisabled())
                    pc.write("Dsbl");
                else
                    pc.write("Enbl");
                if (inf.getDesign() == InputFieldDesign.SMALL)
                    pc.write("Sml");
                pc.write("" autocomplete="off");
                int mySize = inf.getSize();
                if (mySize > 0) {
                    pc.write("" size="");
                    pc.write(mySize);
                int maxlength = inf.getMaxlength();
                if (maxlength > 0) {
                    pc.write("" maxlength ="");
                    pc.write(maxlength);
                java.lang.String value = inf.getWidth();
                if (value != null && !"".equals(value)) {
                    pc.write("" style="width:");
                    pc.write(value);
                    pc.write(";");
                java.lang.String tooltip = inf.getTooltip();
                if (tooltip != null) {
                    pc.write("" title="");
                    pc.writeEncoded(tooltip);
                   pc.write(" onchange="return htmlbDoEvent(this,'TV','onchange','0','");
                   pc.write(uniqueName);
                   pc.write("',1,1,'',0);" "); 
                   pc.write(" onblur="return htmlbDoEvent(this,'TV','onblur','0','");
                   pc.write(uniqueName);
                   pc.write("',1,1,'',0);" ");
                if(inf.isDisabled())
                    pc.write("" readonly="");
            else {
                pc.write("<input type="hidden");
            pc.write("" name="");
            pc.write(uniqueName);
            if (inf.isLabeled()) {
                pc.write("" id="");
                pc.write(uniqueName);
            Object value = inf.getValue();
            pc.write("" value="");
            if (value != null) {
                String valueString = null;
                if (value instanceof AbstractDataType) {
                    m_logger.info("-- Abstract Data Type");
                    AbstractDataType dataValue = (AbstractDataType)value;
                    if (dataValue != null) {
                        m_logger.info("-- dataValue != null");
                        if (dataValue.isValid()) {
                            m_logger.info("-- dataValue.isValid()");
                            if (dataValue instanceof DataDate) {
                                m_logger.info("-- dataValue instanceof DataDate");
                                Date date = ((DataDate)dataValue).getValue();
                                valueString = HxLocaleUtil.formatDate(date, pc.getLocale());
                            else {                       
                                m_logger.info("-- NOT dataValue instanceof DataDate");
                                valueString = dataValue.toString(pc);
                        else if (dataValue instanceof DataString) {
                            m_logger.info("-- dataValue instanceof DataString");
                            valueString = dataValue.toString(pc);
                        else {
                            m_logger.info("-- dataValue.getValueAsString()");
                            valueString = dataValue.getValueAsString();
                else {
                    // Not Abstract Data Type
                    m_logger.info("-- Not Abstract Data Type");
                    valueString = value.toString();
                pc.writeEncoded(valueString);
            pc.write(""/>");
            if (showDateHelp) {
                String dateFormat  = HxLocaleUtil.getSapDatePatternNumber(pc.getLocale());       
                   pc.write("</td><td align='left'><button id='");
                   pc.write(uniqueName);
                   pc.write("-btn' type="button" tabindex="-1" ti="-1" class="urEdfHlpDate" onclick="htmlb_showDateHelp(event,'");
                   pc.write(uniqueName);
                   pc.write("','");
                   pc.write(dateFormat);
                   pc.write("','1')"></button>");
                   pc.write("<script>htmlb_addTexts('pt_BR',{SAPUR_OCTOBER:"Outubro",SAPUR_MSG_LOADING:"Processo de carga em andamento"," +
                        "SAPUR_SUNDAY_ABBREV:"Do",SAPUR_F4FIELD_TUTOR:"Pressionar F4 para exibir as entradas possíveis"," +
                        "SAPUR_INVALID:"Não válido",SAPUR_FEBRUARY:"Fevereiro",SAPUR_F4FIELD:"F4- campo de entrada"," +
                        "SAPUR_FRIDAY_ABBREV:"6ª",SAPUR_WEDNESDAY_ABBREV:"4ª",SAPUR_MAY:"Maio",SAPUR_MSG_WARNING:"Advertência"," +
                        "SAPUR_DECEMBER:"Dezembro",SAPUR_SEPARATOR:"-",SAPUR_MSG_SUCCESS:"Com êxito",SAPUR_SATURDAY_ABBREV:"Sa"," +
                        "SAPUR_THURSDAY_ABBREV:"5ª",SAPUR_MSG:"{0} {1} {2}",SAPUR_BUTTON_WHL:"{0} - {1} - {2} - {3}",SAPUR_JULY:"Julho"," +
                        "SAPUR_APRIL:"Abril",SAPUR_FIELD_TIME:"Hora",SAPUR_MSG_ERROR:"Erro",SAPUR_REQUIRED:"Necessário"," +
                        "SAPUR_BUTTON_WHL3:"{0} - {1} - {2}",SAPUR_SEPTEMBER:"Setembro",SAPUR_NOVEMBER:"Novembro",SAPUR_AUGUST:"Agosto"," +
                        "SAPUR_JANUARY:"Janeiro",SAPUR_BUTTON:"Botão",SAPUR_FIELD_PW:"Senha",SAPUR_FIELD:"Texto editável"," +
                        "SAPUR_DISABLED:"Não disponível",SAPUR_FIELD_DATE:"Data",SAPUR_MARCH:"Março",SAPUR_FIELD_NUMBER:"N°"," +
                        "SAPUR_MSG_STOP:"Stop",SAPUR_BUTTON_WHL4:"{0} - {1} - {2} - {3}"," +
                        "SAPUR_BUTTON_ENABLED:"Para ativar, utilizar a barra de espaço",SAPUR_TUESDAY_ABBREV:"3ª",SAPUR_READOLNY:""," +
                        "SAPUR_MSG_JUMPKEY:"Pressionar a barra de espaço para navegar para o campo correspondente",SAPUR_JUNE:"Junho"," +
                        "SAPUR_MONDAY_ABBREV:"2ª"});</script>");
            if (showPatternHint) {
                String pattern        = "";       
                String patternTooltip = "";
                if (DataType.DATE.equals(type)) {
                    pattern        = HxLocaleUtil.getDatePatternInLocaleLanguage(pc.getLocale());       
                    patternTooltip = HxLocaleUtil.formatHxMsg(pc.getLocale(), "HxInputField.DatePatternTooltip", pattern);
                else if (DataType.TIME.equals(type)) {
                    pattern        = HxLocaleUtil.getTimePatternInLocaleLanguage(pc.getLocale());       
                    patternTooltip = HxLocaleUtil.formatHxMsg(pc.getLocale(), "HxInputField.TimePatternTooltip", pattern);
                    pattern = " " + pattern;
                else if ((inf.getPatternHint() != null) && (inf.getPatternHint().length() > 0)) {
                    pattern = " " + inf.getPatternHint();
                    patternTooltip = HxLocaleUtil.formatHxMsg(pc.getLocale(), "HxInputField.PatternTooltip", pattern);
                pc.write("</td><td align='left'>");
                pc.write("<span class='sapTxtLeg' title='" + patternTooltip + "'><nobr>");
                pc.write("<font color='666666' face='Microsoft Sans Serif' style='vertical-align:super' size='1'><b>" + pattern + "</b></font>");
                pc.write("</nobr></span>");
            if (showStatusMsg) {
                if (inf.getStatusMsgPosition().equalsIgnoreCase("RIGHT")) {
                    pc.write("</td><td align='left'>");
                    pc.write("<font color='990000' face='Microsoft Sans Serif' size='1'>");
                else if (inf.getStatusMsgPosition().equalsIgnoreCase("BELOW")) {
                    pc.write("</td></tr><tr>");
                    if (showDateHelp && showPatternHint) {
                        pc.write("<td align='left' colspan='3'>");
                    else if (showDateHelp ^ showPatternHint) {      // '^' is Exclusive OR (XOR)
                        pc.write("<td align='left' colspan='2'>");
                    else {
                        pc.write("<td align='left'>");
                    pc.write("<font color='990000' face='Microsoft Sans Serif' style='verticle-align:super' size='1'>");
                pc.write("<nobr>" + inf.getStatusMsg() + "</nobr>");
                pc.write("</font>");
            if (showDateHelp || showPatternHint || showStatusMsg) {
                pc.write("</td></tr></table>");
            // Generate code to store the current Locale in the HTML form,
            // and make the month and day names available in javascript arrays.
            // The form's Language attribute is used as a flag so that this is only
            // done once for each form.
            Form form = pc.getCurrentForm();
            if ((form.getLanguage() == null)
            || (!form.getLanguage().equals(pc.getLocale().toString()))) {
                // Save the locale in the html form as hidden fields so that the
                // same locale can be used to parse returned data.
                pc.write("<input type="hidden" name="_HTMLX_LANGUAGE_" value="" + pc.getLocale().getLanguage() + "">");
                pc.write("<input type="hidden" name="_HTMLX_COUNTRY_"  value="" + pc.getLocale().getCountry()  + "">");
                pc.write("<input type="hidden" name="_HTMLX_VARIANT_"  value="" + pc.getLocale().getVariant()  + "">");
                // Write javascript arrays of month and day names in the locale language
                StringBuffer sb = new StringBuffer(250);
                String javaScriptPath = pc.getJavascriptPath();
                sb.append("var javaScriptPath='");
                sb.append(javaScriptPath);
                sb.append("';");
                java.lang.String dayNames[] = RenderUtil.getDayAbbreviations(pc.getLocale());
                if (dayNames.length != 7) {
                    throw new IllegalStateException("Only locales with 7 days are supported!");
                sb.append("var htmlbDayNames = new Array('");
                for (int i = 0; i < 6; i++) {
                    sb.append(dayNames<i>);
                    sb.append("','");
                sb.append(dayNames[6]);
                sb.append("');n");
                sb.append("var htmlbMonthNames = new Array('");
                java.lang.String monthNames[] = RenderUtil.getMonthNames(pc.getLocale());
                for (int i = 0; i < 11; i++) {
                    sb.append(monthNames<i>);
                    sb.append("','");
                sb.append(monthNames[11]);
                sb.append("');n");
                java.lang.String jscript = sb.toString();
                pc.getDocument().getIncludes().addBodyEndResource(ResourceType.DIRECTJSCRIPT, "HTMLB_INPUTFIELD_DATEHELP", jscript);
                // Set the language in the form so we don't do this again       
                form.setLanguage(pc.getLocale().toString());
            if (writingDebugToConsole) {
                System.out.println("Finished rendering HxInputField (id='" + inf.getId() + "')");
            m_logger.info("Exit:  HxInputFieldRenderer.render()");
        //  Methods to allow the Standard HTMLB InputField to Mimic HxInputField
        //  The key idea here is to use the standard InputField ONLY as a String
        //  field (never Date) so that we have total control over the display format
        //  and then HTMLX looks after ofrmating the string, abd displaying the
        //  help icons, status messages etc.  
         * Render the HTML placed before a HTMLB InputField, an InputField,
         * and the code placed after the InputFIeld, so that it behaves like a
         * HTMLX HxInputField
         * @param field
         * @param pc
        public static InputField mimicRender(HxField hxField, IPageContext pc) {
            HxInputField hxInputField = new HxInputField(hxField, pc.getLocale());
            return mimicRender(hxInputField, pc);
         * Render the HTML placed before a HTMLB InputField, an InputField,
         * and the code placed after the InputFIeld, so that it behaves like a
         * HTMLX HxInputField
         * @param field
         * @param pc
        public static InputField mimicRender(HxInputField hxInputField, IPageContext pc) {
            // Render stuff before InputField
            renderBeforeInputTag(hxInputField, pc);
            // Render InputField
            InputField inputField = new InputField(hxInputField.getId());  
            setUpInputField(hxInputField, inputField, pc);
            // This is a kludge to make a field read only.  It is achieved by
            // adding the flag to the 'width' attribute.  HTMLB then unknowingly
            // adds the flag when it renders the 'width' attribute.
            if (hxInputField.isReadOnly()) {
                inputField.setWidth( inputField.getWidth() + ";" readonly="");
            inputField.render(pc);
            String uniqueName = pc.getParamIdForComponent(inputField);
            String popUpKeyUniqueName = "";
            // If the field has a Pop Up add a hidden field for the Key populated by the Pop Up
            if (hxInputField.isShowPopUp()) {
                InputField keyInputField = new InputField(hxInputField.getId() + "PopUpKey");  
                keyInputField.setVisible(false);
                keyInputField.setValue(hxInputField.getPopUpKeyValue());
                keyInputField.render(pc);
                popUpKeyUniqueName = pc.getParamIdForComponent(keyInputField);
            // Render stuff after InputField
            renderAfterInputTag(hxInputField, pc, uniqueName, popUpKeyUniqueName);
            return inputField;      
         * Render the HTML to be placed before a HTMLB InputField so that it
         * behaves like a HTMLX HxInputField
         * @param field
         * @param pc
        public static void renderBeforeInputTag(HxField field, IPageContext pc) {
            renderBeforeInputTag(new HxInputField(field), pc);
         * Render the HTML to be placed before a HTMLB InputField so that it
         * behaves like a HTMLX HxInputField
         * @param inf
         * @param pc
        public static void renderBeforeInputTag(HxInputField inf, IPageContext pc)
            if (writingDebugToConsole) {
                System.out.println("Start    rendering mimic HxInputField (id='" + inf.getId() + "') ...");
            if (showDateHelp(inf) || showPopUp(inf) || showPatternHint(inf) || showStatusMsg(inf)) {
                pc.write("<table cellspacing="0" cellpadding="0" border="0" id="");
                pc.write(""><tr><td>");
         * Set a HMTLB InputField with the values stored in the HxField.
         * This makes for less code in the JSP, and some versions of the PDK/EP
         * do not support some paramters in the TAG (e.g. Tooltip)
         * @param hxField
         * @param myContext
         * @param pageContext
        public static InputField setUpInputField(HxField hxField, IPageContext pc, PageContext pageContext) {
            Component component = (Component)pageContext.getAttribute(hxField.getId());
            if (!(component instanceof InputField)) {
                String msg =
                    "HxInputFieldRenderer.setUpInputTag() component is not instanceof InputField " +
                    "(hxField.getId()='" + hxField.getId() + "' " +
                    " component.getClass().getName()='" + component.getClass().getName() + "')";
                PortalRuntime.getLogger("htmlx").severe(msg);
                throw new IllegalArgumentException(msg);
            InputField inf = (InputField)pageContext.getAttribute(hxField.getId());
            setUpInputField(hxField, inf, pc);
            return inf;
         * Set a HMTLB InputField with the values in the HxField.
         * This makes for less code in the JSP, and some versions of the PDK/EP
         * do not allow you to set some paramters in the TAG (e.g. Tooltip)
         * @param hxField
         * @param myContext
         * @param pageContext
        public static void setUpInputField(HxField hxField, InputField inf, IPageContext pc) {
            inf.setDisabled(hxField.isDisabled());
            inf.setInvalid(hxField.isInvalid());
            inf.setMaxlength(hxField.getMaxLength());
            inf.setRequired(hxField.isRequired());
            inf.setShowHelp(false);
            inf.setTooltip(hxField.getTooltip());
            inf.setType(DataType.STRING);
            inf.setValue(hxField.getValueAsString(pc.getLocale()));
            inf.setVisible(hxField.isVisible());
            inf.setSize(hxField.getMaxLength());
         * Set a HMTLB InputField with the values stored in the HxField.
         * This makes for less code in the JSP, and some versions of the PDK/EP
         * do not support some paramters in the TAG (e.g. Tooltip)
         * @param hxField
         * @param myContext
         * @param pageContext
        public static void setUpInputField(HxInputField hxInputField, InputField inf, IPageContext pc) {
            inf.setDisabled(hxInputField.isDisabled());
            inf.setInvalid(hxInputField.isInvalid());
            inf.setMaxlength(hxInputField.getMaxlength());
            inf.setRequired(hxInputField.isRequired());
            inf.setShowHelp(false);
            inf.setTooltip(hxInputField.getTooltip());
            inf.setType(DataType.STRING);
            inf.setValue(hxInputField.getPreformattedValueAsString());
            inf.setVisible(hxInputField.isVisible());
            inf.setSize(hxInputField.getSize());
         * Render the HTML to be placed after a HTMLB InputField so that it
         * behaves like a HTMLX HxInputField
         * @param field
         * @param myContext
         * @param pageContext
        public static void renderAfterInputTag(HxField field, IPageContext pc, PageContext pageContext) {
            renderAfterInputTag(new HxInputField(field), pc, pageContext);
         * Render the HTML to be placed after a HTMLB InputField so that it
         * behaves like a HTMLX HxInputField
         * @param inf
         * @param myContext
         * @param pageContext
        public static void renderAfterInputTag(HxInputField inf, IPageContext pc, PageContext pageContext) {
            Component component = (Component)pageContext.getAttribute(inf.getId());
            String uniqueName = pc.getParamIdForComponent(component);
            String popUpKeyUniqueName = "";
            if (inf.isShowPopUp()) {
                component = (Component)pageContext.getAttribute(inf.getId() + "PopUpKey");
                popUpKeyUniqueName = pc.getParamIdForComponent(component);
            renderAfterInputTag(inf, pc, uniqueName, popUpKeyUniqueName);
         * Render the HTML to be placed after a HTMLB InputField so that it
         * behaves like a HTMLX HxInputField
         * @param inf
         * @param pc
         * @param uniqueName
         * @param popUpKeyUniqueName
        public static void renderAfterInputTag(
            HxInputField inf,
            IPageContext pc,
            String       uniqueName,
            String       popUpKeyUniqueName)
            if (showDateHelp(inf)) {
                String dateFormat  = HxLocaleUtil.getSapDatePatternNumber(pc.getLocale());       
                pc.write("</td><td align='left'><button id='");
                   pc.write(uniqueName);
                   pc.write("-btn' type="button" tabindex="-1" ti="-1" class="urEdfHlpDate" onclick="htmlb_showDateHelp(event,'");
                pc.write(uniqueName);
                pc.write("','");
                pc.write(dateFormat);
                pc.write("','1')"></button>");
                   pc.write("<script>htmlb_addTexts('pt_BR',{SAPUR_OCTOBER:"Outubro",SAPUR_MSG_LOADING:"Processo de carga em andamento"," +
                        "SAPUR_SUNDAY_ABBREV:"Do",SAPUR_F4FIELD_TUTOR:"Pressionar F4 para exibir as entradas possíveis"," +
                        "SAPUR_INVALID:"Não válido",SAPUR_FEBRUARY:"Fevereiro",SAPUR_F4FIELD:"F4- campo de entrada"," +
                        "SAPUR_FRIDAY_ABBREV:"6ª",SAPUR_WEDNESDAY_ABBREV:"4ª",SAPUR_MAY:"Maio",SAPUR_MSG_WARNING:"Advertência"," +
                        "SAPUR_DECEMBER:"Dezembro",SAPUR_SEPARATOR:"-",SAPUR_MSG_SUCCESS:"Com êxito",SAPUR_SATURDAY_ABBREV:"Sa"," +
                        "SAPUR_THURSDAY_ABBREV:"5ª",SAPUR_MSG:"{0} {1} {2}",SAPUR_BUTTON_WHL:"{0} - {1} - {2} - {3}",SAPUR_JULY:"Julho"," +
                        "SAPUR_APRIL:"Abril",SAPUR_FIELD_TIME:"Hora",SAPUR_MSG_ERROR:"Erro",SAPUR_REQUIRED:"Necessário"," +
                        "SAPUR_BUTTON_WHL3:"{0} - {1} - {2}",SAPUR_SEPTEMBER:"Setembro",SAPUR_NOVEMBER:"Novembro",SAPUR_AUGUST:"Agosto"," +
                        "SAPUR_JANUARY:"Janeiro",SAPUR_BUTTON:"Botão",SAPUR_FIELD_PW:"Senha",SAPUR_FIELD:"Texto editável"," +
                        "SAPUR_DISABLED:"Não disponível",SAPUR_FIELD_DATE:"Data",SAPUR_MARCH:"Março",SAPUR_FIELD_NUMBER:"N°"," +
                        "SAPUR_MSG_STOP:"Stop",SAPUR_BUTTON_WHL4:"{0} - {1} - {2} - {3}"," +
                        "SAPUR_BUTTON_ENABLED:"Para ativar, utilizar a barra de espaço",SAPUR_TUESDAY_ABBREV:"3ª",SAPUR_READOLNY:""," +
                        "SAPUR_MSG_JUMPKEY:"Pressionar a barra de espaço para navegar para o campo correspondente",SAPUR_JUNE:"Junho"," +
                        "SAPUR_MONDAY_ABBREV:"2ª"});</script>");
            if (showPopUp(inf)) {
                String dateFormat  = HxLocaleUtil.getSapDatePatternNumber(pc.getLocale());       
                pc.write("</td><td align='left'><div class="urEdfHlpSml" onClick="");
                pc.write("htmlxPopUp('");
                pc.write(getPopUpUrl(pc, inf.getPopUpPage()));
                pc.write("', '");
                pc.write(uniqueName);
                pc.write("', '");
                pc.write(popUpKeyUniqueName);
                pc.write("', ");
                pc.write(inf.getPopUpWidth());
                pc.write(", ");
                pc.write(inf.getPopUpHeight());
                pc.write(", '");
                pc.write(inf.getPopUpAttributes());
                pc.write("')">");
                pc.write(" </div>");
            if (showPatternHint(inf)) {
                String pattern        = "";       
                String patternTooltip = "";
                if (DataType.DATE.equals(inf.getType())) {
                    pattern        = HxLocaleUtil.getDatePatternInLocaleLanguage(pc.getLocale());       
                    patternTooltip = HxLocaleUtil.formatHxMsg(pc.getLocale(), "HxInputField.DatePatternTooltip", pattern);
                else if (DataType.TIME.equals(inf.getType())) {
                    pattern        = HxLocaleUtil.getTimePatternInLocaleLanguage(pc.getLocale());       
                    patternTooltip = HxLocaleUtil.formatHxMsg(pc.getLocale(), "HxInputField.TimePatternTooltip", pattern);
                    pattern = " " + pattern;
                else if ((inf.getPatternHint() != null) && (inf.getPatternHint().length() > 0)) {
                    pattern = " " + inf.getPatternHint();
                    patternTooltip = HxLocaleUtil.formatHxMsg(pc.getLocale(), "HxInputField.PatternTooltip", pattern);
                pc.write("</td><td align='left'>");
                pc.write("<span class='sapTxtLeg' title='" + patternTooltip + "'><nobr>");
                pc.write("<font color='666666' face='Microsoft Sans Serif' style='vertical-align:super' size='1'><b>" + pattern + "</b></font>");
                pc.write("</nobr></span>");
            if (showStatusMsg(inf)) {
                if (inf.getStatusMsgPosition().equalsIgnoreCase("RIGHT")) {
                    pc.write("</td><td align='left'>");
                    pc.write("<font color='990000' face='Microsoft Sans Serif' size='1'>");
                else if (inf.getStatusMsgPosition().equalsIgnoreCase("BELOW")) {
                    pc.write("</td></tr><tr>");
                    if (showDateHelp(inf) && showPatternHint(inf)) {
                        pc.write("<td align='left' colspan='3'>");
                    else if (showDateHelp(inf) ^ showPatternHint(inf)) {      // '^' is Exclusive OR (XOR)
                        pc.write("<td align='left' colspan='2'>");
                    else {
                        pc.write("<td align='left'>");
                    pc.write("<font color='990000' face='Microsoft Sans Serif' style='verticle-align:super' size='1'>");
                pc.write("<nobr>" + inf.getStatusMsg() + "</nobr>");
                pc.write("</font>");
            if (showDateHelp(inf) || showPopUp(inf) || showPatternHint(inf) || showStatusMsg(inf)) {
                pc.write("</span></td></tr></table>");
            // Generate code to store the current Locale in the HTML form,
            // and make the month and day names available in javascript arrays.
            // The form's Language attribute is used as a flag so that this is only
            // done once for each form.
            Form form = pc.getCurrentForm();
            if ((form.getLanguage() == null)
            || (!form.getLanguage().equals(pc.getLocale().toString()))) {
                // Save the locale in the html form as hidden fields so that the
                // same locale can be used to parse returned data.
                pc.write("<input type="hidden" name="_HTMLX_LANGUAGE_" value="" + pc.getLocale().getLanguage() + "">");
                pc.write("<input type="hidden" name="_HTMLX_COUNTRY_"  value="" + pc.getLocale().getCountry()  + "">");
                pc.write("<input type="hidden" name="_HTMLX_VARIANT_"  value="" + pc.getLocale().getVariant()  + "">");
                // Write javascript arrays of month and day names in the locale language
                StringBuffer sb = new StringBuffer(250);
                String javaScriptPath = pc.getJavascriptPath();
                sb.append("var javaScriptPath='");
                sb.append(javaScriptPath);
                sb.append("';");
                java.lang.String dayNames[] = RenderUtil.getDayAbbreviations(pc.getLocale());
                if (dayNames.length != 7) {
                    throw new IllegalStateException("Only locales with 7 days are supported!");
                sb.append("var htmlbDayNames = new Array('");
                for (int i = 0; i < 6; i++) {
                    sb.append(dayNames<i>);
                    sb.append("','");
                sb.append(dayNames[6]);
                sb.append("');n");
                sb.append("var htmlbMonthNames = new Array('");
                java.lang.String monthNames[] = RenderUtil.getMonthNames(pc.getLocale());
                for (int i = 0; i < 11; i++) {
                    sb.append(monthNames<i>);
                    sb.append("','");
                sb.append(monthNames[11]);
                sb.append("');n");
                String jscript = sb.toString();
                pc.getDocument().getIncludes().addBodyEndResource(ResourceType.DIRECTJSCRIPT, "HTMLB_INPUTFIELD_DATEHELP", jscript);
                pc.getDocument().getIncludes().addBodyEndResource(ResourceType.DIRECTJSCRIPT, "HTMLX", getHtmlxJavascript());  
                // Set the language in the form so we don't do this again       
                form.setLanguage(pc.getLocale().toString());
            if (writingDebugToConsole) {
                System.out.println("Finished rendering mimic HxInputField (id='" + inf.getId() + "')");
        private static boolean showDateHelp(HxInputField inf) {
            if (DataType.DATE.equals(inf.getType())
            && inf.isShowHelp()
            && !inf.isDisabled()) {
                return true;
            return false;
        private static boolean showPopUp(HxInputField inf) {
            if (!showDateHelp(inf)
            && !inf.isDisabled()
            && inf.isShowPopUp()) {
                return true;
            return false;
        private static boolean showPatternHint(HxInputField inf) {
            boolean isDateOrTime = DataType.DATE.equals(inf.getType()) || DataType.TIME.equals(inf.getType());
            boolean patternHintSet = (inf.getPatternHint() != null) && (inf.getPatternHint().length() > 0);
            if (inf.isShowPatternHint()
            && (isDateOrTime || patternHintSet)) {
                return true;
            return false;
        private static boolean showStatusMsg(HxInputField inf) {
            if (inf.isShowStatusMsg()
            && (inf.getStatusMsg() != null)
            && (inf.getStatusMsg().length() > 0)) {
                return true;
            return false;
        private static String getPopUpUrl(IPageContext pc, String pageName) {
            IPortalComponentRequest request = (IPortalComponentRequest)pc.getRequest();
            IPortalComponentResponse response = (IPortalComponentResponse)pc.getResponse();
            IPortalUrlGenerator portalGen = null;
            IUrlGeneratorService urlGen = (IUrlGeneratorService)request.getService(IUrlGeneratorService.KEY);
            ISpecializedUrlGenerator specUrlGen2 = urlGen.getSpecializedUrlGenerator(IPortalUrlGenerator.KEY);
            if (specUrlGen2 instanceof IPortalUrlGenerator) {
                portalGen = (IPortalUrlGenerator) specUrlGen2;
            // Create the url to the iView
            String url = "";
            if (portalGen != null) {
                // Create the parameters passed to SAP transaction for mesima
                url = portalGen.generatePortalComponentUrl(request, pageName); // "htmlxJarMimicExample.default");
            return url;
        protected static String getHtmlxJavascript() {   
            return "n" +
            "    if(window.document.domain == window.location.hostname) {                         n" +
            "        document.domain = document.domain.substring(document.domain.indexOf('.')+1); n" +
            "    }                                                                                n" +
            "    var popUpTextId;                                                                 n" +
            "    var popUpKeyId;                                                                  n" +
            "    var myPopUp;                                                                     n" +
            "    function setTextField(text) {                                                    n" +
            "        field = document.getElementById(popUpTextId);                                n" +
            "        if (field) {                                                                 n" +
            "            field.value = text;                                                      n" +
            "        }                                                                            n" +
            "        else {                                                                       n" +
            "            alert('Text target field for pop up not found (' + popUpTextId + ')');   n" +
            "        }                                                                            n" +
            "    }                                                                                n" +
            "    function setKeyField(key) {                                                      n" +
            "        field = document.getElementById(popUpKeyId);                                 n" +
            "        if (field) {                                                                 n" +
            "            field.value = key;                                                       n" +
            "        }                                                                            n" +
            "    }                                                                                n" +
            "    function setFields(text, key, close) {                                           n" +
            "        setTextField(text);                                                          n" +
            "        setKeyField(key);                                                            n" +
            "        if (close) {                                                                 n" +
            "            myPopUp.close();                                                         n" +
            "        }                                                                            n" +
            "        return false;                                                                n" +
            "    }                                                                                n" +
            "    function htmlxPopUp(url, textId, keyId, width, height, attributes) {                  n" +
            "        popUpTextId = textId;                                                        n" +
            "        popUpKeyId = keyId;                                                          n" +
            "        if (myPopUp) {                                                               n" +
            "            myPopUp.close();                                                         n" +
            "        }                                                                            n" +
            "        if (event!=null){                                                            n" +
            "            xPos = event.screenX-event.offsetX;                                      n" + 
            "            yPos = event.screenY-event.offsetY;                                      n" +
            "        }                                                                            n" +
            "        if ((xPos+width) > screen.availWidth) {                                      n" +
            "            xPos=screen.availWidth - width - 10;                                     n" +
            "        }                                                                            n" +
            "        if ((yPos+height) > screen.availHeight) {                                    n" +
            "            yPos=screen.availHeight - height - 10;                                   n" +
            "        }                                                                            n" +
            "        sizeAndPos = 'width=' + width + ', height=' + height + ', top=' + yPos + ', left=' + xPos;      n" +
            "        myPopUp = window.open(url, 'PopUp', sizeAndPos + ', ' + attributes); n" +
            "        if (!myPopUp) {                                                              n" +
            "            alert('You may have unrequested popup blocking on.');                    n" +
            "        }                                                                            n" +
            "    }n";   
        //  Methods to assist dubugging JSP pages   
         * @return True if debug messages are being written to the console
        public static boolean isWritingDebugToConsole() {
            return writingDebugToConsole;
         * When an error occurs in a JSP page the line number given in the stack
         * trace is rarely the line that caused the error.  This can make traking
         * down errors in a JSP page can be very difficult.  By writing debug messages
         * to the console every time a field is rendered, it can be much easier to
         * identify the area of code causing a problem.<p>  
         * <b>Do NOT set this in the production release of your application.</b>
         * @param b
        public static void setWritingDebugToConsole(boolean b) {
            writingDebugToConsole = b;
         * Initialise to NOT write debug to the console
        static {
            writingDebugToConsole = false;

    Try these
    [http://help.sap.com/saphelp_nwmobile71/helpdata/en/45/65ad4ee0531aa8e10000000a114a6b/content.htm]
    [http://help.sap.com/saphelp_nw04/helpdata/en/6f/1bd5c6a85b11d6b28500508b5d5211/content.htm]
    [http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.infocenter.dc01381.0120/doc/html/koh1278435126915.html]
    Reagards,
    Mouli

  • Why is my CSS style not applied to my HTMLB page ?

    Hello !
    I'm using a css file to define the layout of my htmlb page... but the layout is not applied.
    When I specify the layout CSS in a common html page the layout is applied but not for an htmlb page.
    Could someone let me know where I'm wrong ?
    EG :
    My htmlb page :
    <%@page language="abap" %>
    <%@extension name="htmlb" prefix="htmlb" %>
    <htmlb:content>
      <htmlb:page title=" " >
          <html>
                <head>
                <link href="style.css" rel="stylesheet" type="text/css">
                </head>
                <body>
                text1
        <htmlb:form>
            text2
        </htmlb:form>
                </body>
          </html>
      </htmlb:page>
    </htmlb:content>
    My css file style.css :
    <%@page language="abap"%>
    body {
        background-color: #990000;
        font-family: Verdana;
        font-size: 32x;
        line-height: 32px;
        color: #666666;
    As a result, I have a blank page (and not red) with the text "text1" and "text2" written.

    This code you have is unfortunately completely bogus. It is just not going to work. Writing HTMLB tags are easy. It takes but minutes to make the magic appear in the browser. But, you have also have to understand a little about what is happening.
    At a very first, I would like to recommend this link: <a href="/people/brian.mckellar/blog/2004/06/11/bsp-trouble-shooting-getting-help">Getting Help</a>. You are specifically interested in the section that shows you how to get help about specific tags.
    As a next step, look at the help for the <htmlb:page> tag. It is the first important one. See how it is a collection of other <htmlb:document*> tags.
    Thereafter, look at SBSPEXT_HTMLB/document.BSP for an example on how to replace the <htmlb:page> sequence in your application.
    Once this is done, place you "<link ...>" sequence directly after the <htmlb:headInclude> tag that you have now on your page.
    Compile, test, assign 10 points.

  • How to fix the column width in a table in htmlb tableview control

    HI Experts,
    I have an issue with my htmlb table view controller. I have created a custom iView with a htmlb table view control and placed it in quick navigation window.
    When data in columns exceeds, I am getting horizontal scroll bar and column,table are getting extened. I don't want  column size increases when text length increses. Instead when lenght of the text incrases in a column, I want the text displyed in multiple columns.
    I have tried for this as below.
    <hbj:tableView
        id="statTable"
        model="bean.stattableModel"
        design="ALTERNATING"
        headerVisible="false"
        footerVisible="false"
        fillUpEmptyRows="false"
        navigationMode="BYPAGE"
        selectionMode="NONE"
        headerText="Report List"
        visibleFirstRow="1"
        visibleRowCount="10"
    width="100%">
    <%
         stattableModel.getColumn("D").setWidth("5px");
         stattableModel.getColumn("D").setWrapping(false);//tried true aswell
         stattableModel.getColumn("H").setWidth("px");
         stattableModel.getColumn("H").setWrapping(false);
    %>
    No change happen ever after I used the above code.
    Any one has the idea, how make it work.
    Thanks in Advance,
    Chinna.

    Hi Babu,
    Please go through this links.
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/80a7eef2-9a2c-2a10-12bb-abad552f3302
    http://www.sapfans.com/forums/viewtopic.php?f=20&t=300326
    Kind regards
    Prabhakaran.P

  • How to insert check box fields in a htmlb: tableview

    Hi,
    Can anybody tell me how to insert check box fields in a htmlb: tableview in a sequence of rows in a table view. How to generate the sequence no for the checkbox inorder to know the row that is checked.
    Thanks in advance,
    Aruna.

    Here is the code which has the custom "Checkbox" in the tableview & Triggers the event. <b>You can identify the checkbox based on cell ID (p_cell_id)</b> in the method "IF_HTMLB_TABLEVIEW_ITERATOR~RENDER_CELL_START" & Based on the event name + Cell ID. Look at the code & let me know if you any issue.
    <b>Layout:</b>
    <%@page language="abap" %>
    <%@extension name="htmlb" prefix="htmlb" %>
    <htmlb:content id               = "content"
                   design           = "design2002+design2003"
                   controlRendering = "SAP"
                   rtlAutoSwitch    = "true"
                   forceEncode      = "ENABLED" >
      <htmlb:page title="Test " >
        <htmlb:form>
          <%
      data TV_ITERATOR Type Ref To zcl_itr.
      data iterator type ref to IF_HTMLB_TABLEVIEW_ITERATOR.
      create object tv_iterator exporting appl_cons = application.
      iterator = tv_iterator.
          %>
          <htmlb:tableView id              = "fligts"
                           headerText      = "Flight"
                           width           = "100"
                           headerVisible   = "true"
                           design          = "alternating"
                           visibleRowCount = "10"
                           fillUpEmptyRows = "true"
                           showNoMatchText = "true"
                           filter          = "server"
                           sort            = "server"
                           onHeaderClick   = "MyEventHeaderClick"
                           table           = "<%= APPLICATION->itab %>"
                           iterator        = "<%= ITERATOR %>" />
        </htmlb:form>
      </htmlb:page>
    </htmlb:content>
    <b>Event Handling:</b>
    DATA: EVENT_ID1 TYPE REF TO IF_HTMLB_DATA.
    EVENT_ID1 = CL_HTMLB_MANAGER=>GET_EVENT_EX( REQUEST ).
    CASE EVENT_ID1->EVENT_SERVER_NAME.
    IF NOT event_id1 IS INITIAL.
       if event_id1->server_event+0(9) = 'chkevent'.
      SPLIT event_id1->server_event AT '-' INTO v_event v_dummy v_row v_col.
      endif.
    endif.
    method IF_HTMLB_TABLEVIEW_ITERATOR~GET_COLUMN_DEFINITIONS.
         CLEAR p_column_definitions.
        CLEAR p_overwrites.
        DATA: tv_column  TYPE TABLEVIEWCONTROL.
        tv_column-COLUMNNAME  = 'FLDATE'.
        tv_column-edit        = 'X'.
        tv_column-sort        = 'X'.
        tv_column-TITLE               = 'Flight Date'.
        tv_column-WIDTH  = '100'.
        APPEND tv_column TO p_column_definitions.
        CLEAR tv_column.
        tv_column-edit        = 'X'.
        tv_column-COLUMNNAME          = 'CONNID'.
        tv_column-TITLE               = 'Conn.ID'.
        tv_column-WIDTH  = '70'.
        tv_column-HORIZONTALALIGNMENT = 'center'.
        APPEND tv_column TO p_column_definitions.
        CLEAR tv_column.
        tv_column-edit        = 'X'.
        tv_column-COLUMNNAME          = 'CHECKBOX1'.
        tv_column-TITLE               = 'Check Box'.
        tv_column-WIDTH  = '30'.
        tv_column-HORIZONTALALIGNMENT = 'center'.
        APPEND tv_column TO p_column_definitions.
    endmethod.
    METHOD IF_HTMLB_TABLEVIEW_ITERATOR~RENDER_CELL_START.
           DATA: L_EVENT TYPE STRING.
      CASE P_TABLEVIEW_ID.
        WHEN 'fligts'.
          CASE P_COLUMN_KEY.
            WHEN 'CHECKBOX1'.
    *          CONCATENATE 'chk_event' '123' '2323' INTO L_EVENT SEPARATED BY '-' .
    CONCATENATE 'chkevent' p_cell_id INTO l_event SEPARATED BY '-'.
              P_REPLACEMENT_BEE = CL_HTMLB_CHECKBOX=>FACTORY( ID = P_CELL_ID
            ONCLICK = L_EVENT CHECKED = 'false' ).
          ENDCASE.
      ENDCASE.
    ENDMETHOD.
    Hope this will solve your problem.
    <b><i>* Reward each helpful answer.</i></b>
    Raja T
    Message was edited by:
            Raja T

  • Error in HTMLB page

    hi,
    please try to give me a solution to the following error araised in the HTMLB.
    i have designed a jsp page using htmlb with several controls, that is online application form so we have more controls there, till now it worked, but now when trying to create any control after the last control it is giving the error as....
    <b>
    Portal Runtime Error
    An exception occurred while processing a request for :
    iView : N/A
    Component Name : N/A
    Error in executing a process for compilation, C:/usr/sap/J2E/JC00/j2ee/cluster/server0/apps/sap.com/irj/servlet_jsp/irj/root/web-inf/portal/portalapps/htmlbcon/work/pagelet/_sapportalsjsp_gridlay.java:35: code too large for try statement try { ^ C:/usr/sap/J2E/JC00/j2ee/cluster/server0/apps/sap.com/irj/servlet_jsp/irj/root/web-inf/portal/portalapps/htmlbcon/work/pagelet/_sapportalsjsp_gridlay.java:5506: code too large for try statement } catch(IOException jspioex) {} ^ C:/usr/sap/J2E/JC00/j2ee/cluster/server0/apps/sap.com/irj/servletjsp/irj/root/WEB-INF/portal/portalapps/HTMLBcon/work/pagelet/_sapportalsjsp_Gridlay.java:22: code too large public void doContent(IPortalComponentRequest componentRequest, IPortalComponentResponse aResponse) ^ 3 errors .
    Exception id: 10:06_24/06/05_0029_1761750
    See the details for the exception ID in the log file</b>
    this error is not coming only with one control, any code we written after the last control that is checkbox group.
    i don't think it is a controls error or any syntax error.
    is there any code length limit in the jsp pages? if not what might be the problem?
    kindly consider the error.
    Thanks & Regards,
    sireesha.

    Hi Sireesha,
    see code too large for try statement and the link / hints provided there.
    Hope it helps
    Detlev
    PS: Please consider rewarding points for helpful answers or give some feedback what's your additional question - e.g. in various ways to communicate to the database Thanks in advance!

  • HTML Tags in HTMLB or How to shrink HTMLB ?

    Hi,
    I have a JSP page using HTMLB tags, which works fine in EP5. I am migrated this JSP in EP6 SP6 and now it gives me the following message:
    Error in executing a process for compilation, C:/usr/sap/EP6/JC00/j2ee/cluster/server0/apps/sap.com/irj/servlet_jsp/irj/root/web-inf/portal/portalapps/com.suncor.ci.continuousimprovement/work/pagelet/_sapportalsjsp_recordinputform.java:5262: code too large for try statement } catch(IOException jspioex) {} ^ C:/usr/sap/EP6/JC00/j2ee/cluster/server0/apps/sap.com/irj/servletjsp/irj/root/WEB-INF/portal/portalapps/com.suncor.ci.continuousimprovement/work/pagelet/_sapportalsjsp_recordInputForm.java:4303: code too large for try statement try { ^ ...
    INF/portal/portalapps/com.suncor.ci.continuousimprovement/work/pagelet/_sapportalsjsp_recordInputForm.java:133: code too large for try statement try { ^ C:/usr/sap/EP6/JC00/j2ee/cluster/server0/apps/sap.com/irj/servlet_jsp/irj/root/web-inf/portal/portalapps/com.suncor.ci.continuousimprovement/work/pagelet/_sapportalsjsp_recordinputform.java:22: code too large public void doContent(IPortalComponentRequest componentRequest, IPortalComponentResponse aResponse) ^ 57 errors .
    The error is because of intense use of HTMLB.
    The whole JSP page is one form.
    I did some research and found out that the Servletsize is limited to 65k Byte.
    Indeed, when i removed some HTMLB tags, it was working fine....
    The suggestions was to use the Include Directive
    <@ include page="other.jsp" > This will load the other jsp at Runtime.
    When i did this, the content of the HTMB was not converted to HTML, but it only copied the HTMLB tags directly after the <body>. (I included the <%@ taglib uri="tagLib" prefix="hbj" %>)
    When writing <tr> or <td> directly (to compress the HTML lines) using the JSPWriter (out) instead of the HTMLB tags, my HTML was ignored and did not appear in the HTML output.
    My question is: How can I add HTML in HTML or how can I shrink a huge HTMLB form ?
    Any ideas are welcome...
    Kai

    Hallo Kai,
    Asking about JSP in the BSP forum is about 66% correct. Both have SP in the name. Unfortunately the B is very important for us, and we are shy when it gets to gets about J. BSP is an environment similar to JSP, but based on ABAP. We also have a rendering library called HTMLB. But after that, the similarities stop.
    Unfortunately, we can not help you more, and would recommend any of the Java programming forums.

  • Syntax error while activating BSP with OTR in htmlb element

    Hallo,
    I get a syntax error if I try to activate the BSP below with the lines commented out: "Statement concluding with "...%_O2_UTL_000" ended unexpectedly".
    I don't know what's going wrong. Have I to to any basis settings or to activate any more services etc? Or is it a bug? WAS620 SP53.
    Can anybody help?
    <%@page language="abap"%>
    <%@extension name="htmlb" prefix="htmlb"%>
    <htmlb:content>
      <htmlb:document>
        <%-- does not work
        <htmlb:documentHead title="<%=otr(SOTR_VOCABULARY_BASIC/ALL_ITEMS)%>" />
        --%>
        <htmlb:documentHead title="OK" />
        <htmlb:documentBody>
         <%=otr(SOTR_VOCABULARY_BASIC/ALL_ITEMS)%> <-- OK
         <%-- does not work
         <htmlb:textView id="t1" text = "<%=otr(SOTR_VOCABULARY_BASIC/ALL_ITEMS)%>" />
         --%>
         <htmlb:textView id="t1" text = "OK" />
         </htmlb:documentBody>
      </htmlb:document>
    </htmlb:content>
    Thank you
    Andreas

    Thank you for this note.
    I haven't found any one. The keywords 'OTR' or 'HTMLB' are not mentioned in the note...
    I have triggered the installation of SP54 and give feedback if the problem is solved.
    Andreas

  • Calling a method in AbstractPortalComponent from JSP without htmlb

    Hi,
    I am trying to trigger an event in a java method in an AbstractPortalComponent from a jsp.
    The event is caught in method doContent:
    IPageContext myContext = PageContextFactory.createPageContext(request, response);
    Event lastEvent = myContext.getCurrentEvent();
    if ((lastEvent != null) && (lastEvent.getComponentName().equals("Compute"))) {
      response.write("Compute");
    The problem is that I cannot trigger it from my jsp. In the jsp is used:
    <%
    IPortalComponentURI uri = componentRequest.createPortalComponentURI();
    uri.setPortalRequestEvent(componentRequest.createRequestEvent("Compute"));
    String linkEvent = uri.toString();
    %>
    and
    <.a href="<%=linkEvent%>">click</a.>     
    (i put some dots because otherwise the editor sees it as html)
    Please help.
    Raymond

    Hi Praveen,
    It still does not work. presentEvent is null.
    In line: if (null != event && "Compute".equalsIgnoreCase(presentEvent.getAction())) you wrote "event" Shouldn't that be presentEvent. I changed it to presentEvent.
    I think the problem is in the jsp. It seems to me that the jsp is not sending a correct event.
    Please keep in mind that I am not using htmlb in my jsp.
    Raymond

  • Regarding onClick event of htmlb:Link element.

    Hi All,
    We have a table in which we are displaying error messages.
    The requirment is that each message should be a link which , when clicked should set the focus on respective element in the form.
    I am displaying each message as link as follows:
    <%
      loop at itab_message into wa_message.
                  %>
    count = count + 1.
                  %>
                  </td>
                  <td bgcolor="#F0F0F0">
                  <htmlb:link id            = "link<%= count %>"
                              text          = "<%= wa_message-msg %>"
                              >
                  </htmlb:link>
                  </td>
                  </tr>
                  <%
      endloop.
                  %>
                  </table>
                  <%
      refresh itab_message.
                  %>
                  <%
      endif.
                  %>
    Displayng messages as links is fine , but how can i acchieve the functionality , that on clicking a particular link , the focus should be set on the respective field.
    For Ex:
    There are two error messages:
    1)Enter your name
    2)Select material group from drop down list box.
    If the user clicks 1st message the focus should be set on NAME element.
    Thanks,
    Anubhav.

    Hi,
    this is not gonna be easy but first, you´re not using
    <div class="jive-quote"> </div>
    so you should erase it.
    Second, you have to extend the use of label <htmlb:link> in this way:
    <htmlb:link id        = "link<%= count %>"
                      text          = "<%= wa_message-msg %>"
                      onClientClick = "set_focus('your_field')" >
    And then, some Javascript code:
        function setfocus(myfld) {
                if (document.forms.elements[myfld] != null) {
                    document.forms.elements[myfld].focus();
    Hope it helps.

  • Problem with htmlb:chart after upgrade

    We just upgraded from BW 3.0, WAS 6.20 to BW 3.5, WAS 6.40.   Testing revealed that my htmlb:chart would no longer work.  I just got a white screen whether using Internet Explorer or Netscape.  After much digging, I found that the values for charttype changed with this upgrade.  Any value before that was COLS* now is COLUMNS*
    This is just a "for your information" in case you run into this.
    Janice

    Thanks for the info!

  • TextEdit control of HTMLB

    Hi,
    I want to disable the text area using textEdit control of HTMLB. if I set disabled= "true" in jsp file, then portal throws runtime error "attribute disabled is not available in HTMLB".
    Any suggestion.
    Thanks in advance.
    Manish

    Hi Manish,
         There is no property called <b>disabled</b> but there is a property called <b>enabled</b>.
    enabled="TRUE"
    or
    enabled="FALSE"
    regards,
    prakash

  • HTMLB Code not working Please help.....

    Hello All,
    Ive new in HTMLB. Have written this code wherein a JSP page is called from a JSPDynPage file. But am <b>not getting any output. Its all blank.</b> Dunno if im going wrong .... Please help.
    Struggling with this since y'day.
    <b>CODE</b>:
    <u><b>UserInfoDynPage.java</b></u>
    package com.sap.sample;
    import com.sapportals.htmlb.*;
    import com.sapportals.htmlb.enum.*;
    import com.sapportals.htmlb.event.*;
    import com.sapportals.htmlb.page.*;
    import com.sapportals.portal.htmlb.page.*;
    import com.sapportals.portal.prt.component.*;
    public class UserInfoDynPage extends PageProcessorComponent
    {     public DynPage getPage()
         {     return new UserInfoDynPageDynPage();
           public static class UserInfoDynPageDynPage extends JSPDynPage
           {     //private UserInfoBean UserInfoBean = null;
             public void doInitialization()
             {          IPortalComponentRequest request = (IPortalComponentRequest) this.getRequest();
                       IPortalComponentSession componentSession = ((IPortalComponentRequest)getRequest()).getComponentSession();
                    /*Object o = componentSession.getValue("UserInfoBean");
                    if(o==null || !(o instanceof UserInfoBean))
                    {     UserInfoBean = new UserInfoBean();
                      componentSession.putValue("UserInfoBean",UserInfoBean);
                    else
                    {     UserInfoBean = (UserInfoBean) o;
                    // fill your bean with data here...
        public void doProcessAfterInput() throws PageException
        public void doProcessBeforeOutput() throws PageException
        {     this.setJspName("UserInfo.jsp");
    <u><b>UserInfo.jsp</b></u>
    <%@ taglib uri="tagLib" prefix="hjb" %>
    <hbj:content id="myContext" >
         <hbj:page title="UserInfo Page">
            <hbj:form id="myFormId" >
                 <hbj:textView id="title" text="Search Screen" design="STANDARD" />
                 <table>
                      <tr>
                           <td>
                                <hbj:label id:"lb_Search" text"Search For" labelFor="search" />
                           </td>
                           <td>
                                <hbj:inputField id="search" type="string" maxlength="25" />
                           </td>
                      </tr>
                      <tr>
                           <td>
                                <hbj:label id="lb_SearchType" text="Search Type" labelFor="searchType" />
                           </td>
                           <td>
                                <hbj:dropdownListBox id="SearchType" tooltip="UME Object  to search for" disabled="false">
                                     <hbj:listBoxItem key="user" value="User" />
                                     <hbj:listBoxItem key="group" value="Group" />
                                     <hbj:listBoxItem key="role" value="Role" />
                                </hbj:dropdownListBox>
                           </td>
                      </tr>
                 </table>
                 <br>
                 <hbj:button id="submit" text"search!" tooltip="Click me to search" disabled="false" design="emphasized" />
                 <br>
                 <br>
       </hbj:form>
      </hbj:page>
    </hbj:content>
    <u><b>Portalapp.xml</b></u>
    <?xml version="1.0" encoding="utf-8"?>
    <application>
      <application-config>
        <property name="PrivateSharingReference" value="com.sap.portal.htmlb"/>
      </application-config>
      <components>
        <component name="UserInfoDynPage">
          <component-config>
            <property name="ClassName" value="com.sap.sample.UserInfoDynPage"/>
            <property name="ComponentType" value="jspnative"/>
            <property name="JSP" value="pagelet/UserInfo.jsp"/>
          </component-config>
          <component-profile>
               <property name="tagLib" value="/SERVICE/htmlb/taglib/htmlb.tld"/>
          </component-profile>     
        </component>
      </components>
      <services/>
    </application>
    =============
    Please help.
    Awaiting Reply.
    Thanks,
    Uday
    Message was edited by: Uday Hardikar

    Hi BHI,
    Thank you for your input.
    Had made silly mistake and got solved.
    And now, I have another problem which is related to this same program but the error seems to be a different one.
    Have posted another query:
    Error in HTMLB program..Please help..Urgent OR Error in HTMLB program..Please help..Urgent
    Please help me as its kinda urgent.
    Thanks in advance.
    Uday

Maybe you are looking for