Is there a way to set visible or invisible an html input in java

Hello everyone,

I need your help for set visible or invisible an html Input.
I have try with a Div but I know than the Input doesn’t support the “setvisible” parameter.

If somebody have the answer to this problem I will be really thankful if he can help me.

Best regards,

Arnaud

Any of your HTML components on the Java side allows the setVisible() method.
E.g. an input text field like;

@Input(id = "someID")
private InputTextField myTextField;

Then, you can toggle this by myTextField.setVisible(false)

All HTML components like DivComponent and InputTextField are extending the HTMLComponent interface:

public interface HTMLComponent {

	void setEnabled(boolean value);
	boolean isEnabled();

	void setVisible(boolean value);
	boolean isVisible();
}

Well I did this

Html side=
<input type="button id=“modename” value=“Mode” style=“width:100px”/>

Java side=
@Input(id = “modename”)
private InputTextField ModeName;

ModeName.setVisible(false); on the openview() and I got my error exactly at this line.

At least in the code you posted, it seems you are missing an ending "-mark for the type of the HTML input element.
<input type="button id=“modename” value=“Mode” style=“width:100px”/> :-1:
vs.
<input type="button" id=“modename” value=“Mode” style=“width:100px”/> :+1:

Oh god I really need to wash my eyes… Thanks for your help …