Package com.sun.javaee.blueprints.components.ui.model

Examples of com.sun.javaee.blueprints.components.ui.model.ImageArea


        }
       
// fails in Myfaces because it thinks we are an "included/forwarded" request and hence adds a unique suffix
// area.findComponent(area.getTargetImage()).getClientId(context);

        ImageArea iarea = (ImageArea) area.getValue();
        ResponseWriter writer = context.getResponseWriter();
        StringBuffer sb = null;
              
        String formRef = "document.forms[0]['";
        if (form != null)
          formRef = "document.forms['" + form.getClientId(context) + "']";
       

        writer.startElement("area", area);
        writer.writeAttribute("alt", iarea.getAlt(), "alt");
        writer.writeAttribute("coords", iarea.getCoords(), "coords");
        writer.writeAttribute("shape", iarea.getShape(), "shape");
        // PENDING(craigmcc) - onmouseout only works on first form of a page
        sb =
            new StringBuffer(formRef).append("['").append(targetImageId)
            .append("'].src='");
        sb.append(
            getURI(context, (String) area.getAttributes().get("onmouseout")));
        sb.append("'");
        writer.writeAttribute("onmouseout", sb.toString(), "onmouseout");
        // PENDING(craigmcc) - onmouseover only works on first form of a page
        sb =
            new StringBuffer(formRef).append("['").append(targetImageId)
            .append("'].src='");
        sb.append(
            getURI(context, (String) area.getAttributes().get("onmouseover")));
        sb.append("'");
        writer.writeAttribute("onmouseover", sb.toString(), "onmouseover");
        // PENDING(craigmcc) - onclick only works on first form of a page
        sb = new StringBuffer(formRef).append("['");
        sb.append(getName(context, area));
        sb.append("'].value='");
        sb.append(iarea.getAlt());
        sb.append("'; " + formRef + ".submit()");
        writer.writeAttribute("onclick", sb.toString(), "value");
        writer.endElement("area");

    }
View Full Code Here

TOP

Related Classes of com.sun.javaee.blueprints.components.ui.model.ImageArea

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.