Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1)

E13403-04

oracle.jdeveloper.webapp.utils.html
Class HtmlUtils

java.lang.Object
  extended by oracle.jdeveloper.webapp.utils.html.HtmlUtils

public class HtmlUtils
extends java.lang.Object


Method Summary
static java.net.URL addURLToProject(java.net.URL documentURL, Context context, java.lang.String promptMessage, java.lang.String promptDialogTitle, java.lang.String saveDialogTitle)
          Adds a document URL to a project, prompting the user to move the document under the webroot if necessary.
static java.net.URL addURLToProject(java.net.URL documentURL, Context context, java.lang.String promptMessage, java.lang.String promptDialogTitle, java.lang.String saveDialogTitle, boolean forceAdd)
           
static java.lang.String getRelativeString(Context context, java.net.URL url)
          Returns a relative url for any document under the document root in a web application if one is possible.
static java.lang.String getRelativeString(Context context, java.net.URL root, java.net.URL url)
          Return a relative String for HTML elements such as img src, href, etc.
static void openHtmlPage(Node node)
          Open the given node in the HTML preview editor.
static void openHtmlPage(java.net.URL url)
          Open the given URL in the HTML preview editor.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

openHtmlPage

public static void openHtmlPage(java.net.URL url)
Open the given URL in the HTML preview editor.

Parameters:
url - The URL of the HTML file

openHtmlPage

public static void openHtmlPage(Node node)
Open the given node in the HTML preview editor.

Parameters:
node - The node representing the HTML file

addURLToProject

public static java.net.URL addURLToProject(java.net.URL documentURL,
                                           Context context,
                                           java.lang.String promptMessage,
                                           java.lang.String promptDialogTitle,
                                           java.lang.String saveDialogTitle)
Adds a document URL to a project, prompting the user to move the document under the webroot if necessary. If project is null returns original document URL.


addURLToProject

public static java.net.URL addURLToProject(java.net.URL documentURL,
                                           Context context,
                                           java.lang.String promptMessage,
                                           java.lang.String promptDialogTitle,
                                           java.lang.String saveDialogTitle,
                                           boolean forceAdd)
Parameters:
forceAdd - If true user must copy given URL to the project.
Returns:

getRelativeString

public static java.lang.String getRelativeString(Context context,
                                                 java.net.URL url)
Returns a relative url for any document under the document root in a web application if one is possible.

Parameters:
context - the current context
url - the url to make relative
Returns:
relative if possible, otherwise, a string represenation of the full url.

getRelativeString

public static java.lang.String getRelativeString(Context context,
                                                 java.net.URL root,
                                                 java.net.URL url)
Return a relative String for HTML elements such as img src, href, etc.

Parameters:
context - the current context
root - the root url
url - the url to make relative based on the root url
Returns:
a relative string

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1)

E13403-04

Copyright © 1997, 2010, Oracle. All rights reserved.