Could you post the stack trace as well (I want to see where in the
lifecycle / rendering process this is dying)?
On 7/25/06, Venkat Rao <[EMAIL PROTECTED]> wrote:
The objType method returns a string, and the case is correct. The single
missing quote was a typo when I composed my email.
I tried your suggestion, and the values printed are as expected.
The code below works as expected; however if I replace h:outputText with
h:inputText, the problem is thrown (first block entered even when object
is rectangle)
<ui:repeat var="graphicsObj" value="#{graphicsObjList}">
<h:panelGroup rendered="#{graphicsObj.objType == 'circle'}" >
<h:outputText value="#{graphicsObj.radius}"/>
</h:panelGroup>
<h:panelGroup rendered="#{graphicsObj.objType == 'rectangle'}" >
<h:outputText value="#{graphicsObj.length}"/>
</h:panelGroup>
</ui:repeat>
My code for the beans is as below:
public abstract class GraphicsObj {
public String getObjType();
}
public class Circle {
public String getObjType() {
return "circle";
}
public void setRadius(int radius) {
this.radius = radius;
}
public int getRadius() {
return this.radius;
}
}
public class Rectangle {
public String getObjType() {
return "rectangle";
}
public void setLength(int length) {
this.length = length;
}
public int getLength() {
return this.length;
}
}
-- venkat