How to disable the selection component ? | Community
Skip to main content
Level 2
October 16, 2015
Solved

How to disable the selection component ?

  • October 16, 2015
  • 3 replies
  • 1859 views

I have a selection component . I have made it mandatory (allowBlank : false).

In my selection changed listener function i am making the field disabled/enabled .

But even when it is disabled (Disabled : true) , since there is allowblank it still keeps alerting for the mandatory field  .

My requirement is that when the button is disabled it should not check for allowBlank property .Please help in doing this .

 

Thanks in advance

Harish

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Scott_Brodersen

As a workaround, in your listener you can also change the value for the allowblank property, so that when it's disabled it also allows a blank value, and when enabled it does not allow a blank value

scott

3 replies

Scott_Brodersen
Scott_BrodersenAccepted solution
Level 8
October 16, 2015

As a workaround, in your listener you can also change the value for the allowblank property, so that when it's disabled it also allows a blank value, and when enabled it does not allow a blank value

scott

Level 2
October 16, 2015

Hi Scott,

I also have a similar kind of requirement. In a panel, I have a dropdown of approve and reject and if approve is selected, another dialogfieldset in the same panel opens to enter more options. But, all these options are mandatory fields having property allowBlank=false.

As you suggested, change the property allowBlank, but can you plz also tell how to acccess that particular property inside  a listener that I can put on the Approve/Reject field.

I need to disable the dialogfieldset when reject is selected, but it has all mandatory fields. So, when I click OK to submit the form, it gives an error "verify the marked fields.".

Please elaborate a little more on the workaround that you provided.

 

Thanks,

Ankush

Scott_Brodersen
Level 8
October 16, 2015

well, it's a little difficult without knowing the particulars of your situation, but the event that the listener reacts to typically has some parameters, and you can use those parameters as a way to access items on the dialog.

What event are you listening to, and on what type of object?

scott