AutoComplete in HTMLB

Does any one knows how to use the autoComplete-Feature in the <htmlb:form>-Tag?

I tried without any results. I'm at Support Package 39 (SAPKB62039). If I remember well without lower Support Packages I got HTML fields with autocomplete....
Sergio

Similar Messages

  • 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

  • Htmlb:inputField always uses encode="TRUE"

    Hi,
    I have a inputField using data binding. The model field contains "&#268;eská republika", and this code
    <htmlb:inputField id="InpSupl" value="//model/edit_wa.supplier" encode="FALSE"/>
    Renders to
    <input class="sapEdfTxtEnbl" size="60" maxlength="60" name="cont_INVEST_invest_edit_wa.supplier" id="cont_INVEST_InpSupl" value="&amp;#268;eská republika">
    How can I prevent this HTML-encoding?
    Version 6.40 SP 12.
    Thanks,
    Thilo

    Hmm, I don't understand all this.
    Look here, this is my complete output (sorry about that) of your example.
    And you can see, the ampersand is encoded, but I want the letter È (a upper sized C with a ^ on top).
    Why does it work at your place?
    <html><head><title> </title><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1" ><meta http-equiv="imagetoolbar" content="no"><script type="text/javascript" language="JavaScript" src="/sap/public/bsp/sap/htmlb/events.js"></script><script type="text/javascript" language="JavaScript" src="/sap/public/bsp/sap/htmlb/event_dictionary.js"></script><link id="urstyle" rel="stylesheet" type="text/css" href="/sap/public/bc/ur/Design2002/themes/sap_tradeshow/ur/ur_ie6.css"><link rel="stylesheet" type="text/css" href="/sap/public/bc/ur/Design2002/themes/sap_tradeshow/ur/ur_pop_ie6.css"><script type="text/javascript" language="JavaScript">var popup_emptydoc="/sap/public/bsp/sap/htmlb/domainRelaxOff.htm";var HTMLB_SECTION508 = false;</script><script type="text/javascript" language="JavaScript">var sapUrDomainRelaxing = {NONE:"NONE",MINIMAL:"MINIMAL",MAXIMAL:"MAXIMAL"};ur_system={doc:window.document ,mimepath:"/sap/public/bc/ur/Design2002/themes/sap_tradeshow/common/",stylepath:"/sap/public/bc/ur/Design2002/themes/sap_tradeshow/ur/",emptyhoverurl:"/sap/public/bc/ur/Design2002/themes/sap_tradeshow/common/emptyhover.html",is508:false,direction:"ltr",domainrelaxing:sapUrDomainRelaxing.NONE,browser_abbrev:"ie6",dateformat:1,firstdayofweek:0}</script><script type="text/javascript" language="JavaScript" src="/sap/public/bc/ur/Design2002/js/sapUrMapi_ie6.js"></script><script type="text/javascript" language="JavaScript" src="/sap/public/bc/ur/Design2002/js/popup_ie6.js"></script><script type="text/javascript" language="JavaScript" src="/sap/public/bc/ur/Design2002/js/languages/urMessageBundle_de.js"></script><script type="text/javascript" language="JavaScript" src="/sap/public/bsp/sap/htmlb/misc.js"></script></head><body class="urBdyStd" scroll="AUTO" style="margin-left:2;margin-right:2;margin-top:2;margin-bottom:2">
          <input disabled type="hidden" id="htmlb_first_form_id" name="htmlb_first_form_id" value="htmlb_form_1"><form id="htmlb_form_1" name="htmlb_form_1" method="POST" autocomplete="off"><input type="hidden" name="htmlbScrollX"><input type="hidden" name="htmlbScrollY"><input type="hidden" name="htmlbevt_ty"><input type="hidden" name="htmlbdoc_id" value=""><input type="hidden" name="htmlbevt_frm" id="htmlbevt_frm" value="htmlb_form_1"><input type="hidden" name="htmlbevt_oid"><input type="hidden" name="htmlbevt_id"><input type="hidden" name="htmlbevt_cnt"><input type="hidden" name="htmlbevt_par1"><input type="hidden" name="htmlbevt_par2"><input type="hidden" name="htmlbevt_par3"><input type="hidden" name="htmlbevt_par4"><input type="hidden" name="htmlbevt_par5"><input type="hidden" name="htmlbevt_par6"><input type="hidden" name="htmlbevt_par7"><input type="hidden" name="htmlbevt_par8"><input type="hidden" name="htmlbevt_par9"><input type="hidden" name="onInputProcessing" value="htmlb"><input type="hidden" name="htmlb_form_1_complete" id="htmlb_form_1_complete" code="OK"><input type="hidden" name="sap-htmlb-design" id="sap-htmlb-design" value="">
              <span id="InpSupl-r" class="urEdf2Whl"><input type="Text" class="urEdf2TxtEnbl" autocomplete="off" id="InpSupl" ct="InputField" name="InpSupl" st="" value="&amp;#268;eská republika" onblur="sapUrMapi_InputField_Blur('InpSupl',event)" onkeydown="sapUrMapi_InputField_keydown('InpSupl',event)" onkeyup="sapUrMapi_InputField_KeyUp('InpSupl',event)" onfocus="sapUrMapi_InputField_focus('InpSupl',event)"></span>
          </form>
    <script language="JavaScript">
    function sapArrErase(){if(typeof(sapUrMapi_PcTabSeq_Registry)=='undefined') return;sapUrMapi_PcTabSeq_Registry1=sapUrMapi_PcTabSeq_Registry;sapUrMapi_PcTabSeq_Registry=new Array();for(var p in sapUrMapi_PcTabSeq_Registry1){if(document.getElementById(p)!=null)sapUrMapi_PcTabSeq_Registry[p]=true;}}function sapOnResize(){sapArrErase();;}window.onresize=sapOnResize;window.attachEvent ('onload', sapOnResize);
    </script><script language="JavaScript">sapUrMapi_initLinkStatus();</script><noscript><iframe style="position:absolute;top:0;left:0;width:100%;height:150%" src="?sap-bsp-exception=NO_JS"></iframe></noscript><script language="JavaScript">if(document.cookie==null||document.cookie.indexOf("sap-contextid")<0){location.assign("?sap-bsp-exception=NO_CK");}</script></body></html>
    In my opinion the inputField always does a encode="TRUE" and I don't have a chance to set it to FALSE.

  • Outlook autocomplete cache stops working for multiple users at the same time

    Hi there
    Ever since we upgraded our Exchange 2010 to Exchange 2013 we have had problems with the autocomplete cache in Outlook 2010.
    We have 700 users and about once per week I get a call about the autocomplete cache. A few users are on cached mode, but most use online mode. The problem appears on both, but it can usually be corrected by /cleanautocompletecache.
    Granted, the autocomplete cache gets corrupted sometimes, but it seems to happen a lot for us. I have noticed that often more than one user experiences the problem at the same time, and, since the problem starting after upgrading Exchange, I suspect that
    the issue is with Exchange and not Outlook. Yesterday three users complained about the cache at the same time.
    I know how to get a broken cache going again - that is not the issue. The issue is keeping this from happening so often.
    Anyone out there able to help?
    Thanks!
    /Anders

    Hi ,
    Based on my knowledge , when you tried to send an email to a recipient in the same exchange organisation then the recipient address will be resolved in to legacy dn value and then that email will be delivered to destination mailbox by pointing towards to
    that legacy dn value.
    For the external recipients exchange user the smtp address to get it delivered.
    For your issue :
    Based upon the NDR message , we need to covert those values in to x500 format and add it to respective recipient mailbox as an x500 address.Then These erorrs will happen if the x500 value of the destination recipient is not available on it's maibox
    and that would be the cause of the NDR for most of the times.Some time as you said autocomplete cache would get corrupted on the client end but it is very rare.
    How to convert NDR to x500 address format :
    http://msexchangeguru.com/2012/03/15/x500/
    How to avoid getting such kind of NDR'S :
    https://www.simple-talk.com/sysadmin/exchange/exchange-e-mail-addresses-and-the-outlook-address-cache/
    In case if you don't want the users to use the autocomplete cache when composing the new emails :
    In group policy we can use the  office templates to disable the below mentioned option.
    1.use autocomplete to suggest the names ---> this option will comes under the advanced settings on the outlook client.
    In case if you don't want the users to use the autocomplete cache when composing the new emails as well as if you wanted to delete that autocomplete then you need to choose one more option along with the first one.
    1.Empty autocomplete cache.
    Please reply me if anyhitng is unclear.
    Thanks & Regards S.Nithyanandham

  • Norton Toolbar does not autocomplete afer sync'ing with Firefox 8.0.1 or 9.0.1

    I recently dl'd all of the Norton 360 v5.0.1.29 Liveupdates and synced everything to expose the latest Norton toolbar add-in. When I try to sign into any saved web page such as my email account, neither of the apps. are auto completing the form with userID and password details!?? Can someone help me ressolve this issue?
    Thanks . . .
    TomJ

    No I am talking about the functionality of using Norton to autocomplete my signin details such as USERID and PASSWORD information that is usually required to access a particular website's forums & subscriber features.
    Thanks . . .
    TomJ

  • Autocomplete search not working in a visual webpart

    I have a webservice that gives me some data from a sharePoint list.
    I am trying to use that webservice for an autosuggest textbox in a application using jquery.
    i can browse the webservice and invoke the operations directly.
    But i am getting error in the jquery all the time saying 500 internal server error.
    i can browse the web service without any issue if i go to the url.
    here is my code
    **jQUERY**
    $(document).ready(function () {
    $('#<%=txt_search.ClientID%>').autocomplete({
    source: function (request, response) {
    $.ajax({
    url: "/_layouts/service/getdata.asmx/Returndata",
    data: request.term,
    dataType: "json",
    type: "POST",
    contentType: "application/json; charset=utf-8",
    error: function (XMLHttpRequest, textStatus, errorThrown) {
    alert(textStatus);
    minLength:2
    **here is my webservice method code which returns array of strings**
    public string [] Returndata()
    List<String> _data = new List<string>();
    String title = string.Empty;
    String keycontent = string.Empty;
    SPList list = SPContext.Current.Web.Lists.TryGetList("Data");
    foreach (SPListItem _item in list.Items)
    title = (string)_item["Title"];
    _data.Add(title);
    return _data.ToArray();
    if i browse to the method directly like this i can see the array of strings
    http://sharepointsite/_layouts/service/getdata.asmx/Returndata like below
    This XML file does not appear to have any style information associated with it. The document tree is shown below.
    <ArrayOfString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://tempuri.org/">
    <string>Child Care Assistance</string>
    <string>TANF</string>
    <string>Child Care Subsidies</string>
    <string>Child Care Settings</string>
    <string>Regulation Status</string>
    <string>Family Copayments</string>
    <string>Reasons For Care</string>
    <string>Child Care Development Fund</string>
    <string>ACF-801 Child Care Monthly Case Record Form</string>
    <string>Air Pollutants</string>
    <string>Clean Air Act</string>
    I am struggling why i am having an error any help
    kukdai

    Hi,
    If you only want to get data from list and achieve the
    Autocomplete search function in SharePoint 2013, we can use SharePoint REST API and jQuery to achieve it.
    Here are two blog for your reference:
    Working with SharePoint list data - OData, REST and JavaScript
    http://www.plusconsulting.com/blog/2013/05/crud-on-list-items-using-rest-services-jquery/
    Using jQuery UI autocomplete with the REST API to get search results in the search box
    http://blogs.msdn.com/b/murads/archive/2013/02/20/using-jquery-ui-autocomplete-with-the-rest-api-to-get-search-results-in-the-search-box.aspx
    Best Regards
    Dennis Guo
    TechNet Community Support

  • I can no longer type after typing a URL and autocomplete not finding a matching URL. How to fix that?

    After I open Firefox I start typing the URL. After each letter I see autocomplete suggestions. Imagine I type "g", then "o" (google is shown as autocomplete), but then I enter "a". Since I have no pages that begin with "goa", autocomplete is hidden and the problem is, I can no longer type anything. All my key strokes are now ignored (backspace, enter... it dosen't matter). But I still see the cursor blinking after "goa".
    I have discovered that Firefox must be focused on some other interface element (not in the address bar), because if I press the TAB key, the focus is again shifted to the address bar and I can continue typing. Sometimes I have to press TAB 2 or 3 times while entering an address to be able to write what I want. It looks like every time autocomplete is closed, the program focus leaves the address bar.
    I've been having this problem for at least 4 or 5 versions of Firefox and it does not happen on every Firefox session. It can be solved by closing Firefox and opening it again. Pressing the TAB key has become kind of a reflex, so it's just annoying and I can work around it.
    But why is this happening?

    Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions (Firefox/Tools > Add-ons > Extensions) or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance).
    *Do not click the Reset button on the Safe mode start window or otherwise make changes.
    *https://support.mozilla.org/kb/Safe+Mode
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes

  • 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

  • Deleted contacts still show up in autocomplete list

    I have an iphone 4. I deleted some contacts from my contact list, and they still show up in the autocomplete list when I type an email and start typing a contact in the 'to' field.  How do I get them to not be in that list anymore? Is it possible?

    The only way to get rid of the autocomplete list is to restore your phone as NEW.

  • Autocomplete and linking issues with gchat on apple messages

    So I'm having a couple related(ish) problems with apple messages and gchat/hangouts/whatever it's called these days and imessage on my laptop:
    1) Gchat contacts sometimes do and sometimes don't autocomplete when i cmd+n for a new message and then start typing in the 'send to' field. this occurs irrespective of whether i try to start a jabber conversation via typing their email or via typing their name. I've noticed a couple of semi-consistent factors that seem to be impacting it, at least sometimes, but can't pinpoint anything entirely consistent:
         -It seems to be more problematic with contacts that I have their (google) email address on their contacts card in my icloud account on my actual computer/iphone (as opposed to not having them linked to a contact, and them being merely listed on my gchat friends list by virtue of being imported when i created the account)
         -It seems to be more problematic with buddies that i have had more recent contact with, so that their existing conversation is closer to the top of the messages window (and plus, even this isn't entirely consistent - sometimes it lets me type and find their jabber account even if i chatted yesterday and it's second or third on the list, other times it just returns no results in the address field, and other times (when they're a contact with email address as well as phone number) it only gives me their imessage account but their jabber doesn't show up and i have to go to my buddy list to find them)
    Any thoughts? It's sometimes easier to just do cmd+n and type a friend's name even if i have an existing conversation with them relatively top to the close of the list, than manually finding them in the list or looking at the buddy list or using the search bar. cmd+n typically works at least with imessage conversations, and sometimes even with jabber accounts/gchat, so it doesn't seem like this is merely a feature that doesn't exist.
    2) This might be less of a bug and more of a feature, but i'm wondering if there's a way to deactivate it. A lot of my friends have both imessages and gchat, and i have their google email and phone number on their contact card. in this case, apple messages, seemingly arbitrarily, alternates back and forth betweeen gchatting them and imessaging them in the same conversation. it doesn't always correspond to their away/available status on gchat, and even when it does correspond, i'd still prefer to be able to manually override to send an imessage even if they are available on gchat, I'd prefer to just have separate conversations going for imessage and gchat (because a lot of my friends just never look at one or the other depending on whether they are or arent near their computer, so i need to be able to control where the message goes). I do have a separate jabber conversation with John Smith from their imessage, but within the imessage conversation it still sometimes switches to jabber. It seems like this only happens for contacts that have both email and imessaage on their vcard, but i'd prefer not to delete the email address from their vcard just to resolve this issue, since the email address on contact comes in handy for purposes other than gchat. is there any workaround/way to disable this auto-switching between imessage and gchat accounts in the same conversation, while keeping contacts' email and phone number linked on their vcard?
    3) Some, but not all, of my android friends show up as having imessage when i type their name to contact via gchat. sometimes it says imessages for their phone number, and sometimes instead for their gmail (or both). With respect to the issue when it happens in phone number form: i've checked their contact cards and their phone number is just listed as mobile (not iphone or anything, though i'm unsure if the category of phone number actually tells the phone whether they have imessage, or if it recognizes (in this case, incorrectly) on its own). Of course the imessage won't actually send, but it's pretty annoying (especially in light of the problem from #1). Is their any way to tell messages that this person doesn't have imessage so it stops saying they do?
    Couldn't decide whether to post these separately or together, but since they may or may not be related i opted for the latter. sorry for the length. searched for all 3 and didn't find anything quite on point.
    macbook pro, mid-2010, 15"
    Mavericks 10.9.2
    messages v8.0

    Hi,
    Re 1)
    If a Buddy  (Google, AIM or Yahoo) is in the Buddy list as just the ID or Screen Name then broadly speaking they are not in your Contacts list.
    As such they will not show a "Real Name".
    However any Buddy can be added to the Contacts List even if you don't add a "Real Name"
    This in itself can also cause issues as the Contacts app does not create what it sees as Duplicate cards.
    i.e. you cannot create two cards with the name John Smith.
    It is easier if the ID/Screen Name becomes the "Real Name".
    I have three Macs
    On each the My Card  for myself reflects the Computer it is from and those Cards are synced on my iMac.
    Some of the various Jabber and AIM Screen Names are linked to the particular computers.
    That means if I type "ra" as the start of my Name in the "to" spot I get this:-
    First is a national breakdown service for helping out with cars (as opposed to any other breakdown)
    The next is a Buddy that I have hidden.
    It lists Apple ID and telephone numbers that it thinks are iMessages compatible (it thinks all numbers are valid)  liked to be G4 tower's card.
    It continues listing AIM, Jabber, Yahoo and other iMessages accounts as well as the Bonjour contact details.
    As you can see some at the bottom are IDs and Screen Names that are not associated with any of the Address Cards.
    In these cases my name from part of the ID so "ra" picks then up.
    As you can see you should get AIM, Jabber (Google), iMessages and Yahoo account indicated.
    That should then lead to 2)
    Once in the conversation you can use the "To" spot to change which ID you are calling and therefore effectively change which service you are using.
    In this Pic I have chosen to call Myself (easy with multiple accounts)
    My iMac My Card has no jabber account listed so you only see iMessages and  AIM option listed.
    I can "call" my main AIM name (ralphjohnsr) from the other three Accounts linked to this Card.
    From your end it may look like a random switch but in fact is most likely from an incoming change by the Buddy/Contact.
    You can make the change by using the "To" spot and a drop down
    The centralised messages in the chat should tell you of Changes as will the ID in the text field before typing
    Re 3)
    It will depend on what their Apple ID is.
    Some have had @mac.com names for a long time and linked them to MobileMe than more recently iCloud.
    Some linked their @me.com names form MobileMe to iCloud at the Change.
    Most recently iCloud IDs have been given @iCloud.com emails from the start.
    However any email can be used as an Apple ID.
    The pic above has my Apple ID partially hidden for that lower  iMessages info across the center.
    You may find that some people are using their Google ID as their Apple ID AND also using it as both the iMessages registered name and the Google ID  in the Messages app.
    Lets explain this another way.
    When iChat 1 came out Apple joined the AIM service with it (it did AIM and Bonjour  which was then called Rendezvous)
    At that time Apple entered in to an agreement with AIM that any Apple Issued ID would be a valid AIM Screen Name.
    At that time the Apple Service was .Mac and @mac.com IDs were being issued as paid for accounts, Trial Accounts and after while Lapsed paid for accounts.
    These all worked as iChat/AIM Screen Names.
    Then Apple changed to MobileMe and issued @me.com IDs
    The trials only lated until you ended them and the IDs no longer worked in iChat after that as valid AIM Screen Names and nor did lapsed Paid For accounts.
    More recently Apple have stopped a paid for Service and moved to iCloud.
    At the change you could link Any Apple ID to iCloud and you got an @me.com ID from the iCloud server (it could be the same as the on MobileMe but did seem to be "separate").
    Later these became @iCloud.com IDs  (Some people have both under iCloud and in some cases linking @mac.com names to MobileMe @me.com accounts for email still continues).
    To be clear you could link Any existing email ID to iCloud such as  Google ID.
    But broadly I am speaking of gaining various Apple Issued IDs over time that may or may not be linked to one account.
    These Apple Issued IDs works as Valid AIM Screen Names in Messages. (the iCloud issued ones don't work in iChat 5 or earlier though).
    I linked an external to Apple dial-up Email that has been my long time Apple ID to iCloud and got an @me.com ID at first and later an @icloud.com one as well.
    I can use these two separately in Messages as Valid AIM names.
    Someone using their Google ID as their Apple ID could use it as the iMessages registered Name AND as the GoogleTalk/Jabber entry as well.
    This might explain why it looks like they are swapping about.
    There can be one other explanation and that is dependent on where they are logged in.
    Obviously a GoogleTalk user can log in to the Google web Mail page and use Talk there.
    Although I don't use Google+ I presume there is a similar web page to chat from there.
    This would limit them to being "On Google" rather than iMessages when they sent a messages to you.
    Re GoogleTalk
    Obviously Android is Google.
    The Account settings at Google incudes the "products" you can link and use from your Account.
    Previously with a Google Mail Account that included enabling "Talk" which then allowed you to chat from the Web Mail Page login (or your chosen Jabber able app)
    Now Google use Google+ and this seems to give you automatic access to "Talk"  to the extent it is no longer something you have to Activate.
    I am wondering if using a Android phone is linked to having a Google+ account and that the phone number can be part of that ID set up (similar to iMessages and iPhone Numbers).
    If it does it would then depend if the phone is linked to both the Number and the Google ID as to what they can login as in certain situations.
    I am not sure I have covered everything but I think I have covered most things.
    From what you post I am not sure that there is an issue or not although I have posted what is normal and expected I think there are some fringe things that are an issue.
    9:46 pm      Tuesday; April 15, 2014
    ​  iMac 2.5Ghz i5 2011 (Mavericks 10.9)
     G4/1GhzDual MDD (Leopard 10.5.8)
     MacBookPro 2Gb (Snow Leopard 10.6.8)
     Mac OS X (10.6.8),
     Couple of iPhones and an iPad

  • 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

  • How do I disable Autocomplete COMPLETELY without messing with other settings such as with the location bar? I still like to see websites there that I've been to, without typing it in every time, but just hate the autocomplete part.

    Case: When I go to Tools - Options - Privacy then Location Bar options, there should be another option to where we can disable auto-complete from the Location Bar without messing with other settings. Example #1: I click "Nothing" and then I gotta type in the website I wanna go to every single time. Example #2: I click "History & Bookmarks" and then it auto-completes. Is there any other option just to disable Auto-Complete all together??

    Is inline autocomplete enabled?
    See:
    * http://kb.mozillazine.org/Inline_autocomplete

  • 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.

  • Interactive report search field with autocomplete , is it possible ?

    Hi all,
    As you know the APEX provides an in-built search for interactive reports . I would like to know if its possible to add autocomplete feature to this ?
    Thanks & regards
    Umer

    Its nor working for me .
    1) I created an textfiled item- P2_REPORT_SEARCH
    2) added an interadctive report with the source as
    SELECT * FROM (
    select     "WSR"."ID" as "ID",
    "WSR"."USER_ID" as "USER_ID",
    "WSR"."FROM_DATE" as "FROM_DATE",
    "WSR"."TO_DATE" as "TO_DATE",
    "WSR"."ACTIVITIES" as "ACTIVITIES",
    "WSR"."PROJECT" as "PROJECT",
    'delete' from
    "WSR" "WSR"
    where
    ("WSR"."USER_ID" = NVL(v('APP_USER'),USER) OR NVL(v('APP_USER'),USER) = 'ADMIN' ) AND (
    "WSR"."FROM_DATE"=to_char(sysdate+ (2-to_char(sysdate,'D')))
    where (
    instr(upper("USER_ID"),upper(nvl(:P2_REPORT_SEARCH,"USER_ID"))) > 0 or
    instr(upper("ACTIVITIES"),upper(nvl(:P2_REPORT_SEARCH,"ACTIVITIES"))) > 0
    instr(upper("PROJECT"),upper(nvl(:P2_REPORT_SEARCH,"PROJECT"))) > 0
    )3) added the folowing query to html header ,
    <script>
    apex.jQuery('#report_' + pId + '_catch').trigger('apexbeforerefresh', pId);
    var l_URL =
    'p='+$v('pFlowId')+':'+$v('pFlowStepId')+':'+$v('pInstance')+':FLOW_PPR_OUTPUT_R'+pId+'_';
    if (pRefreshMode) {
    if (pRefreshMode === 'current'){
    // do nothing to url here
    } else if (pRefreshMode === 'reset') {
    l_URL += 'reset_R_' + pId;
    } else {
    if (!!pSort) {
    l_URL += pSort+'::RP&fsp_region_id='+pId;
    } else {
    l_URL +=
    'pg_R_'+pId+':NO&pg_max_rows='+pMax+'&pg_min_row='+pMin+'&pg_rows_fetched='+pFetched;
    l_URL += ':NO::P2_REPORT_SEARCH:' + $('#P2_REPORT_SEARCH').val();
    var lRequest = new apex.ajax.url(l_URL,
    function(pResponse){
    var l_s = pResponse.readyState;
    var l_Id = lRequest.report_id;
    if(l_s == 1){
    }else if(l_s == 2||l_s == 3){
    }else if(l_s == 4){
    var lTemp = $u_js_temp_drop();
    apex.jQuery('#report_'+l_Id+'_catch').attr('id', 'report_'+l_Id+'_catch_old');
    apex.jQuery(lTemp).html(pResponse.responseText);
    apex.jQuery('#report_'+l_Id+'_catch_old').replaceWith(apex.jQuery('#report_'+l_Id+'_catch'));
    apex.jQuery(lTemp).empty();
    apex.jQuery('#report_' + pId + '_catch').trigger('apexafterrefresh', pId);
    }else{return false;}
    lRequest.report_id = pId;
    lRequest._get();
    return;
    </script>
    4) a dynamic action:
    >
    Name: Instant Search
    Event: Key Release
    Items: P2_REPORT_SEARCH
    Condition: No Condition
    Action: Refresh
    Fire when event result is: True
    Selection type: Region
    Region: WSR(Interactive reoprt region)5) When I enter the query in P2_REPORT_SEARCH , no change happens in the result set of IR
    Edited by: Nice1 on May 16, 2012 1:12 AM

Maybe you are looking for