Skip to Content
avatar image
Former Member

How to clear a htmlb inputField?

Hi experts,

I do have an html inputField on an stateless bsp page. Sometimes I want to clear the content of the field, but the inputField always displays the content of the last request, even if I've cleared LTEXT before next display in layout.

<%clear ltext. %>

<htmlb:inputField id = "field" value = "<%LTEXT%>"/>

I debugged a little bit and recognized, that the inputField always is filled from the last request, if it's empty. How could I deactivate this feature?

Any ideas?

regards, Claudia

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Jun 16, 2004 at 05:24 PM

    Hallo Claudia-

    Could it be that perhaps you are missing the '=' sign in your parameter assignment into the HTMLB input-field?

    I have had this field clearing requirement in many of my BSP applications as well and I have been able to accomplish this by setting the parameter 'value' of the HTMLB input-field to an attribute (that after initialization, takes in the value of this control). After initialization, I assign the value of the HTMLB input-field to an attribute and then keep the value there or empty it based on certain conditions. This way, I have control of when the input shows back in the HTMLB input-field and when it doesnt.

    Hope this helps,

    - Vik.

    Sample BSP Code:

    <%

    if <certain condition exists>

    selname = selname.

    else.

    selname = ''.

    endif.

    %>

    <htmlb:inputField id = "selname"

    value = "<%= selname %>"

    size = "10"/>

    Add comment
    10|10000 characters needed characters exceeded

  • Jun 16, 2004 at 08:25 PM

    Claudia,

    Maybe you are using SP27 or SP28?

    Looking at note 616900 (number which is written on your monitor), you find this entry of help:

    Service Packs: 27-28

    Note: 653167

    Text: <htmlb:inputField> value display doesn't clear

    ++bcm

    Add comment
    10|10000 characters needed characters exceeded

    • PS: If you do not like writing on your monitor, add the link below to your favourites. The acticle references some of the collection notes that the different groups use.

      BSP Trouble Shooting: Getting Help

      /people/brian.mckellar/blog/2004/06/11/bsp-trouble-shooting-getting-help