cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Help us improve the PTC Community by taking this short Community Survey! X

How to disable a dropdown list

dheerajkumar
4-Participant

How to disable a dropdown list

Hi,

I want to disable drop down list on mashup loaded and when the user clicks a button it must be enabled so that the user can select the data. Is there any way to do this by using a service? And can we call mashup widgets into services or can we invoke mashup widgets from services?

 

1 ACCEPTED SOLUTION

Accepted Solutions

Have you tried expression widget/function? you can use checkbox Boolean as input, and use if/else condition to send out infotable result to be datasource or blank

View solution in original post

6 REPLIES 6

2 ways to solve the problem:

1. The Visible is boolean property for the widget, you can use the button to trigger a service, make the widget become visible after first click.

2. Keep the Drop down list in the mashup, bind the service input, but don't trigger the service upon mashup click. Thus when the mashup is opened, list does not have input so it's disabled, after click the button and trigger the service to provide input, List gets enabled.

dheerajkumar
4-Participant
(To:zyuan1)

disable in the sense ....even if the data is given to the list on mashup loaded ,when the user clicks the list it should not display the list.

After clicking the button or checkbox the user should be able to select the list i.e list must be displayed after clicking the button or checkbox but the list must be visible all the time in the mashup.

Then use the solution 2, bind the data source only to the Button, so when mashup loaded, list is visible but does not have content, and after click the button, it will be selectable.

 

I have tested it, you may give it a try.

dheerajkumar
4-Participant
(To:zyuan1)

solution 2 is working fine. But my scenario is if the user clicks the checkbox ....if the checkbox is true then list should be displayed and if again user unchecks the checkbox then the list data should be gone but the list must be visible i.e it must be disabled there should be no data in list for the user to select

Have you tried expression widget/function? you can use checkbox Boolean as input, and use if/else condition to send out infotable result to be datasource or blank

dheerajkumar
4-Participant
(To:zyuan1)

yes, it is working now:) Thanks

Top Tags