cancel
Showing results for 
Search instead for 
Did you mean: 

Visible and In-Visible on checkbox tick mark

uday_nalla
Explorer
0 Kudos

Hi All,

i have a requirement in webdynpro java, i inserted a child called check box,

once i select that then i have to see the textview and inputfiled parellelly.

once the check is removed those testview and inputfield are invisible.

so please help me for writing this code.

Thanks in advance

UDAY

Accepted Solutions (1)

Accepted Solutions (1)

former_member189631
Active Contributor
0 Kudos

Hi Uday,

This is very much possible through below steps,

  • Create a Check box and text View UI
  • Create a context attribute with the type WDVisibility and bind the attribute to TextView's Visibility property.
  • Create an attribute named Va_Checked with the type boolean and and bind the attribute to "checked" property
  • Create an event handler named "ChangeCheckBox" for the check box, Add the below code in your modimethod to get the check box selected status.

 

                boolean isSelected = wdContext.currentContextElement().getVa_Checked()

  • based on isSelected value you can enable/disable your textView.
  • Set the the initial value of the textview visibility and the attribute Va_Checked.

Thanks.

Answers (0)