cancel
Showing results for 
Search instead for 
Did you mean: 

How to clear a htmlb inputField?

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member181879
Active Contributor
0 Kudos

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

former_member181879
Active Contributor
0 Kudos

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

Former Member
0 Kudos

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"/>