converting normal text to textfield
hi,
I am unable to convert the normal text into a textfield by using the following code.Is there any mistake in my code.
my jsf page is
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<html>
<body>
<f:view>
<h:form>
<h:outputText value="ChangeMe" rendered="#{!myBean.showInputText}" />
<h:inputText value="ChangeMe" rendered="#{myBean.showInputText}"/>
<h:commandButton value="ClickMe" onclick="#{myBean.clicked}"/>
</h:form>
</f:view>
</body>
</html>
and my bean class is
public class MyBean {
private boolean showInputText = true;
private boolean clicked = true;
public boolean getShowInputText() {
if (showInputText)
return false;
else
return true;
}
public boolean getClicked() {
if (showInputText)
showInputText = false;
else
showInputText = true;
return clicked;
}
}

