users@woodstock.java.net

Re: widget JavaScript file?

From: Yu Chen <Yu.Chen_at_Sun.COM>
Date: Fri, 01 Jun 2007 19:57:42 -0600

I have the in-line Javascript rendered in the page source, but the page
html is empty except the page title.


Thx again.
-Yu

===============================
<title>test ImageOption page</title>
<link rel="stylesheet" type="text/css" href="/test/theme/com/sun/webui/jsf/suntheme/css/css_master.css" />
<script type="text/javascript">
var djConfig = {
    "parseWidgets": false,
    "isDebug": false,
    "debugAtAllCosts": false
};
</script>
<script type="text/javascript" src="/test/theme/META-INF/dojo/dojo.js"></script>
<script type="text/javascript" src="/test/theme/META-INF/json/json.js"></script>

<script type="text/javascript" src="/test/theme/META-INF/prototype/prototype.js"></script>
<script type="text/javascript" src="/test/theme/META-INF/com_sun_faces_ajax.js"></script>
<script type="text/javascript">
dojo.hostenv.setModulePrefix("webui.suntheme", "/test/theme/com/sun/webui/jsf/suntheme/javascript");
dojo.require('webui.suntheme.*');
dojo.require('webui.suntheme.widget.*');
dojo.require('webui.suntheme.widget.jsfx.*');
</script>
<link href="/test/css/styles.css" type="text/css" rel="stylesheet" /></head>
<body id="j_id_id7" onload="" onunload="">
<form id="selectForm" class="form" method="post" action="/test/faces/imageoption/testContent.jspx" enctype="application/x-www-form-urlencoded">
<div id="selectForm:testPageTitle"><table border="0" width="100%" cellpadding="0" cellspacing="0"><tr valign="bottom"><td nowrap="nowrap" valign="bottom"><div class="TtlTxtDiv_sun4"><h1 class="TtlTxt_sun4">Test ImageOption rendered content</h1></div></td></tr></table></div><div class="selTable"><div class="displayCard1" name="selection" id="one"><span id="selectForm:imgOpt1"></span>
<script type="text/javascript">
webui.suntheme.widget.common.createWidget({
    "_widgetType": "network.ondemand:ImageOption",
    "templatePath": "/test/resources/com/network/ondemand/resources/templates/imageOption.html",
    "value": "<span class=\"title\">Startup Essentials<\/span><div class=\"desc\">Operating System: Solaris 10 u3; Software: Sun Studio 10, Sun Studio 11<\/div>",
    "disabled": false,
    "className": "green",
    "onClick": "setSelected(1);",
    "_modules": ["network.ondemand.widget.ImageOption"],
    "id": "selectForm:imgOpt1",
    "button": {
        "primary": true,
        "templatePath": "/test/theme/com/sun/webui/jsf/suntheme/templates/submitButton.html",
        "_widgetType": "webui.suntheme:button",
        "value": "Choose",
        "disabled": false,
        "visible": true,
        "onClick": "document.getElementById('selectForm:imgOpt1').setSelected(1);return false;",
        "mini": false,
        "escape": false,
        "_modules": [
            "webui.suntheme.widget.button",
            "webui.suntheme.widget.jsfx.button"
        ],
        "id": "selectForm:imgOpt1_button"
    }
});


Yu Chen wrote:

> I have a question, and it maybe more a dojo question. But I hope some
> experts here can help answer, thanks!
>
> I got a 404 error in the Firebug degger, looks like it can't find the
> widget javascript file. My question is how/where is it specified which
> widget Javascript file to use and where to load it?
> /
> //GET
> http://hostname.sun.com:8070/test/theme/META-INF/network/ondemand/widget/ImageOption.js404
> (16ms)
>
>
> /Thanks./
> /-Yu/
> /
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe_at_woodstock.dev.java.net
>For additional commands, e-mail: users-help_at_woodstock.dev.java.net
>
>