users@glassfish.java.net

Enums, JSP, setProperty, error, fail, not working (other similar keywords)

From: <glassfish_at_javadesktop.org>
Date: Sun, 29 Jun 2008 19:21:14 PDT

I assume that I'm missing something. The docs all seem clear that a String can be used in the "value" attribute of the <jsp:setProperty .../> standard action and will be coerced. This seems not to be working for me.

the class com.graphicpoet.web.gui.LayoutOrientation looks like:

package com.graphicpoet.web.gui;

public class LayoutOrientation {
    public static enum HorizontalOrigin {
        vertical, horizontal;
    }
}

the offending jsp tag looks like:

    <jsp:useBean id="layoutOrientation" scope="request"
        class="com.graphicpoet.web.gui.LayoutOrientation">

        <jsp:setProperty name="layoutOrientation"
                property="primaryDirection" value="vertical" />
    </jsp:useBean>

When I call the page containing the above jsp snippet, I get:

HTTP Status 500 -

type Exception report

message

descriptionThe server encountered an internal error () that prevented it from fulfilling this request.

exception

org.apache.jasper.JasperException: org.apache.jasper.JasperException: org.apache.jasper.JasperException: PWC6338: Cannot convert "left" for the attribute horizontalOrigin of the bean com.graphicpoet.web.gui.LayoutOrientation$HorizontalOrigin

root cause

org.apache.jasper.JasperException: org.apache.jasper.JasperException: PWC6338: Cannot convert "left" for the attribute horizontalOrigin of the bean com.graphicpoet.web.gui.LayoutOrientation$HorizontalOrigin

root cause

org.apache.jasper.JasperException: PWC6338: Cannot convert "left" for the attribute horizontalOrigin of the bean com.graphicpoet.web.gui.LayoutOrientation$HorizontalOrigin

note The full stack traces of the exception and its root causes are available in the Sun Java System Application Server 9.1_02 logs.
Sun Java System Application Server 9.1_02

----
I'll be very appreciative to any and all who help.  I expect that I have something turned off, because, for all of my reading, I don't know what else to do.
Thanks in advance
[Message sent by forum member 'grpahicpoet' (grpahicpoet)]
http://forums.java.net/jive/thread.jspa?messageID=283233