webuijsf
Tag script


Use the webuijsf:script tag to create a <script> element in the rendered HTML page. The webuijsf:script tag must be used within the webuijsf:head tag, or within the webuijsf:body tag.  The webuijsf:script tag can be used to refer to a Javascript file, by using the url attribute. The tag can also be used embed Javascript code within the rendered HTML page.

The client-side script allows you to perform some interactive functions such as input checking before the page is submitted.

HTML Elements and Layout

The rendered HTML page contains a <script> element with any attributes specified through the webuijsf:script tag attributes. 

Theme Identifiers

None.

Client Side Javascript Functions

None.

Example

Example 1: Create a script tag to a file

<webuijsf:script url="/pathtomyjs/myjavascript.js" />

Example 2: Create a script tag with embedded script (Not Recommended)

<webuijsf:script>
  function foo(text) {
      alert(text);
  }
</webuijsf:script>


Tag Information
Tag Classcom.sun.webui.jsf.component.ScriptTag
TagExtraInfo ClassNone
Body ContentJSP
Display NameNone

Attributes
NameRequiredRequest-timeTypeDescription
bindingfalsefalsejava.lang.String A ValueExpression that resolves to the UIComponent that corresponds to this tag. This binding allows the Java bean that contains the UIComponent to manipulate the UIComponent, its properties, and its children.
typefalsefalsejava.lang.String

Indicates the MIME type of the script. Default is "text/javascript"

urlfalsefalsejava.lang.String

Defines the absolute or relative URL to a file that contains the script. Use this attribute to refer to a file instead of inserting the script into your HTML document

renderedfalsefalsejava.lang.String Use the rendered attribute to indicate whether the HTML code for the component should be included in the rendered HTML page. If set to false, the rendered HTML page does not include the HTML for the component. If the component is not rendered, it is also not processed on any subsequent form submission.
charsetfalsefalsejava.lang.String

Defines the character (charset) encoding of the target URL. See iana.org for a complete list of character encodings.

idfalsetruejava.lang.StringNo Description

Variables
No Variables Defined.


Output Generated by Tag Library Documentation Generator. Java, JSP, and JavaServer Pages are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries. Copyright 2002-4 Sun Microsystems, Inc. 4150 Network Circle Santa Clara, CA 95054, U.S.A. All Rights Reserved.