ZK Component Set Component Not Value

Brucevilla

It seems very simple and maybe silly. But I couldn't find a way to set reverse of the combobox disabled value into the a(id=add) visibility.

<combobox id="cb" model="@{cont.values}" autodrop="true" disabled="true" readonly="false" >
    <comboitem self="@{each=val}"  label="@{val.name}" />
</combobox>
<a id="add" iconSclass="icon-plus-sign" visible="${cb.disabled}"/>
  • if combobox is disabled a is NOT visible
  • if combobox is enabled a is visible

How to make this? The above form in my solution makes the exact opposite what I want.

kachhalimbu

Use EL expression NOT operator

visible="${not cb.disabled}"

Refer here for more details about EL expression operators within ZUML

Update: Here is a working sample

<zk>
    <combobox id="cb" disabled="true" readonly="false" >
       <comboitem label="Test 1" />
       <comboitem label="Test 2" />
       <comboitem label="Test 3" />
    </combobox>
    <a id="add" visible="${not cb.disabled}">Add</a>
</zk>

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

ZK custom listbox component

How Customize Component Label in ZK

How to disable ZK CKeditor Component

How to set the value of a component to a number

Set TemplateRef value from component

localstorage value set in one component gives null in other component angular

set a value to a prop of a component that is passed in as another prop of its parent component

ZK: Custom Component with Listbox not binding SelectedItem

How do I find the root component of a given component in zk?

PrimeNG - set value in time-picker component

Set default value for the select component in pentaho CDE

rxjs behavior subject set value from component

Set Antd TextArea value to Tag component

How to set a value to a specific component in ReactJs

Yii2 Set component value dynamically

AlpineJS catch child component value if set

How to set value of private field or property in a component depending on parameter value

In ZK, change a component's property from other ViewModel

Java multiple extends Zk Component became very verbose

How to set value to parent component property when a button is clicked in Child component in Angular

Angular 2: How to set default value of field from parent component back to child component?

Test that a value is correctly set before calling an asynchronous service in a component

Set Child Component TextField's Value to Parent Components Dropdown Selection?

How to set default value on select in a dynamic select component angular

How to pass value to props from component and set state

ReactJS set value using state component return undefined

Angular 2 can't set default value for ControlValueAccessor component

How to set initial 'rows per page' value in Vuetify DataTable component?

set defalut value to custom java swing component property