on 08-13-2015 11:16 AM
Hi All,
Am trying to use setValueState("None") on the VH field while mandatory validation. I am using Livechange function, but valuestate None is not working as i am not typing any key physically i get the value from VH dialog. So "LiveChange" is not working here. So can anyone help me to where how can i set the ValueState property depending on the values entered in VH field.
if(this.byId(ValueHelpId).getTokens().length > 0 )
{
this.byId(ValueHelpId).setValueState(sap.ui.core.ValueState.None);
}else{
this.byId(ValueHelpId).setValueState(sap.ui.core.ValueState.Error);
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
i'm assuming you are using sap.m.multiinput.
check out these methods-JsDoc Report - SAP UI development Toolkit for HTML5 - API Reference - sap.m.MultiInput
liveChange="onChange"
onChange: function() {
if(this.getView().byId("id").getTokens().length > 0)
{
this.getView().byId("id").setValueState("None");
}
else
{
this.getView().byId("id").setValueState("Error");
}
},
I have above code written, but its not working when i try to select the value for VH from select Dialog. But if try to press tab / any key inside the VH field, this works.
but as per my requirement the user will not type / press any key , he will directly click on VH dialog to get the value. Once the user selects the value from VHDialog the ValueState should be None.
With out any key press I need to change the ValueState property.
Thanks,
Lakshmi
User | Count |
---|---|
98 | |
11 | |
11 | |
10 | |
10 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.