Javascript error in jsf page.

Hi,
I am trying to Do post form a script function in a jsf page. I am using the trh:script tag for adding the script. But when run it i am getting a lot of errors saying that the attributes cannot be recognised. I am trying to send a xml updated with some data after the click of a button to the server. Though its not showing any any errors when not run.
Below is the code i am using :
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<%@ page contentType="text/html;charset=windows-1252"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib uri="http://myfaces.apache.org/trinidad/html" prefix="trh"%>
<%@ taglib uri="http://myfaces.apache.org/trinidad" prefix="tr"%>
<%@ taglib uri="http://xmlns.oracle.com/dss/trinidad/faces" prefix="dvtt"%>
<%@ taglib uri="http://xmlns.oracle.com/adf/faces/rich" prefix="af"%>
<f:view>
<trh:script text="
var endpointURL = "http://localhost:7101/services/MobileManagerService";
var xmlstring = '<?xml version="1.0"encoding="UTF-8"?>\
<notifications>\
     <notification>\
          <id>1<\/id>\
               <status>CLOSE<\/status>\               
          <\/notification>\
     <\/notifications>';
var xmlobject = (new DOMParser()).parseFromString(xmlstring, "text/xml");
var stautsXml = (new XMLSerializer()).serializeToString(xmlobject);
alert(stautsXml);
var http_request = false;
function makePOSTRequest(method, url, parameters) {
http_request = false;
if(window.XMLHttpRequest) { // Mozilla, Safari,...
http_request = new XMLHttpRequest();
if (http_request.overrideMimeType) {
// Set type accordingly to anticipated content type.
http_request.overrideMimeType('text/xml');
// http_request.overrideMimeType('text/html');
} else if (window.ActiveXObject) { // IE
try {
http_request = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try {
http_request = new ActiveXObject("Microsoft.XMLHTTP");
} catch (e) {}
if (!http_request) {
alert('Cannot create XMLHttpRequest object');
return false;
http_request.onreadystatechange = alertContents;
// http_request.open(method, url, true);
if(method=='GET'){
http_request.open(method, url + parameters, true);
http_request.setRequestHeader("Content-type", "text/xml");
http_request.setRequestHeader("Content-length", parameters.length);
http_request.setRequestHeader("Connection", "close");
http_request.send(null);
if(method=='POST') {
http_request.open(method, url, true);
http_request.setRequestHeader("Content-type", "text/xml");
http_request.setRequestHeader("Content-length", parameters.length);
http_request.setRequestHeader("Connection", "close");
http_request.send(parameters);
if(method=='PUT') {
http_request.open(method, url, true);
http_request.setRequestHeader("Content-type", "text/xml");
http_request.setRequestHeader("Content-length", parameters.length);
http_request.setRequestHeader("Connection", "close");
http_request.send(parameters);
if(method=='DELETE') {
http_request.open(method, url+parameters, true);
http_request.setRequestHeader("Content-type", "text/xml");
http_request.setRequestHeader("Content-length", parameters.length);
http_request.setRequestHeader("Connection", "close");
http_request.send(null);
function alertContents() {
if (http_request.readyState == 4) {
if (http_request.status == 200) {
alert('Response received from server:\n'+http_request.responseText);
result = http_request.responseText;
// Turn < and > into &lt; and &gt; for displaying on the page.
result = result.replace(/\<([^!])/g, '&lt;$1');
result = result.replace(/([^-])\>/g, '$1&gt;');
document.getElementById('serverresponse').innerHTML = result;
} else {
alert('There was a problem with the request.'
+http_request.responseText +' '+http_request.status);
document.getElementById('serverresponse').innerHTML = http_request.responseText;
function postApproveForm() {
var poststr = stautsXml ;
alert('Sending XML to server:\n'+poststr);
makePOSTRequest('POST', endpointURL , poststr);
"/>
<trh:html id="h2">
<trh:head title="ApproveAlerts" id="h1">
<meta http-equiv="Content-Type"
content="text/html; charset=windows-1252"/>
<link type="text/css" rel="stylesheet" href="css/iPhone.css"/>
</trh:head>
<trh:body id="b1">
<!-- <jsp:useBean id="IdBean" class="oracle.application.IdBean" scope="application"/> -->
<af:messages id="m1"/>
<trh:body styleClass="body" id="b2">
<!-- <td><input type="button" name="Approve" value="Approve" onclick="javascript:approveAlert();"></td> -->
<td>
<input type="button" name="Approve" value="Approve" onclick="postApproveform();" </input>
</td>
<af:outputText id="ot1" value='"#{requestScope.myId}"'/>
</trh:body>
</trh:body>
</trh:html>
</f:view>
Do i need to add some taglib or something to make it work ?
Regards
Sishant
Edited by: user784337 on May 24, 2010 3:37 AM

Because :
Session.getAtrribute is java-code that can only run on the server
and
var y = session.getAttribute is javascript-code run on the client.

Similar Messages

  • Javascript error on SharePoint page

    Hi Team,
    I'm updating a list column value by comparing a value of field from the same list using JS. It is working fine. But throwing javascript error on the page. 
    Below is the snippet.
    var web = null;
    var clientContext = null;
    var list = null;
    var item = null;
    var reviewStatus = null;
    $(document).ready(function () {
    setInterval(function () {
    $Text = $("td.ms-cellstyle.ms-vb2:contains('No')");
    $Text.parent().css("background-color", "#FFb3BD");
    $("input[name='teamCheckbox']").change(function () {
    var controlid = $(this).attr("id");
    var parts = controlid.split('_');
    var itemID = parts[1];
    clientContext = new SP.ClientContext(_spPageContextInfo.webAbsoluteUrl);
    var list = clientContext.get_web().get_lists().getById(_spPageContextInfo.pageListId);
    item = list.getItemById(itemID);
    clientContext.load(item);
    clientContext.load(item, 'Status');
    clientContext.executeQueryAsync(Function.createDelegate(this, LoadStatus), Function.createDelegate(this, onQueryFailed));
    }, 900);
    function LoadStatus() {
    reviewStatus = item.get_item('Status');
    if(reviewStatus)
    item.set_item('Status', 0);
    item.update();
    clientContext.load(item);
    clientContext.executeQueryAsync(Function.createDelegate(this, UpdateNo), Function.createDelegate(this, onQueryFailed1));
    }else
    item.set_item('Status', 1);
    item.update();
    clientContext.load(item);
    clientContext.executeQueryAsync(Function.createDelegate(this, UpdateYes), Function.createDelegate(this, onQueryFailed1));
    function onQueryFailed() {
    alert("Request Failed at 1st asych");
    function onQueryFailed1(){
    alert("Request Failed at 2nd asynch");
    function UpdateYes() {
    //reviewStatus = null;
    function UpdateNo()
    //reviewStatus = null;
    I'm getting the below JS error :
    Message: The property or field has not been initialized. It has not been requested or the request has not been executed. It may need to be explicitly requested. URI: _layouts/15/sp.debug.js?rev=vK8qdKxCg9qccxdMK5Ebzg%3D%3D
    $Q_2: function SP_ListItem$$Q_2($p0) {
    var $v_0 = (this.get_fieldValues())[$p0];
    if (SP.ScriptUtility.isUndefined($v_0)) {
    throw Error.create(SP.ResResources.getString(SP.ResourceStrings.propertyHasNotBeenInitialized));
    return $v_0;
    I have tried by calling the 2nd async query by changing to item.get_Context(); doesn't helped me.
    Please suggest how to kill this error...
    Thanks,
    Bharath P N
    P N Bharath

    Hi Dennis,
    I had tried by updating the script. But it is failing in update the list item. Please let me know if i'm doing wrong?
    $(document).ready(function () {
    setInterval(function () {
    $Text = $("td.ms-cellstyle.ms-vb2:contains('No')");
    $Text.parent().css("background-color", "#FFb3BD");
    $("input[name='teamCheckbox']").change(function () {
    var controlid = $(this).attr("id");
    var parts = controlid.split('_');
    var itemID = parts[1];
    var ctx = GetCurrentCtx();
    var listName = ctx.ListTitle;
    var url = _spPageContextInfo.webAbsoluteUrl;
    var currentStatus = null;
    var Status = null;
    getListItemWithId(itemID, listName, url, function (data) {
    if (data.d.results.length == 1) {
    currentStatus = data.d.results[0].Status;
    }, function (data) {
    alert("Error in GetListItemwithID method");
    if (currentStatus) {
    Status = 0;
    updateListItem(url, listName, itemID, Status, function () {
    alert("Item updated, refreshing avilable items");
    }, function () {
    alert("Ooops, an error occured. Please try again");
    } else {
    Status = 1;
    updateListItem(itemID, listName, url, Status, function () {
    alert("Item updated, refreshing avilable items");
    }, function () {
    alert("Ooops, an error occured else loop. Please try again");
    }, 900);
    function getListItemWithId(itemId, listName, siteurl, success, failure) {
    var url = siteurl + "/_api/web/lists/getbytitle('" + listName + "')/items?$filter=Id eq " + itemId;
    $.ajax({
    url: url,
    method: "GET",
    headers: { "Accept": "application/json; odata=verbose" },
    success: function (data) {
    success(data);
    error: function (data) {
    failure(data);
    function GetItemTypeForListName(name) {
    return "SP.Data." + name.charAt(0).toUpperCase() + name.split(" ").join("").slice(1) + "ListItem";
    function updateListItem(itemId, listName, siteUrl, title, success, failure) {
    var itemType = GetItemTypeForListName(listName);
    var item = {
    "__metadata": { "type": itemType },
    "Status": title
    getListItemWithId(itemId, listName, siteUrl, function (data) {
    $.ajax({
    url: data.d.results[0].__metadata.uri,
    type: "POST",
    contentType: "application/json;odata=verbose",
    data: JSON.stringify(item),
    headers: {
    "Accept": "application/json;odata=verbose",
    "X-RequestDigest": $("#__REQUESTDIGEST").val(),
    "X-HTTP-Method": "MERGE",
    "If-Match": data.d.results[0].__metadata.etag
    success: function (data) {
    success(data);
    error: function (data) {
    failure(data);
    }, function (data) {
    failure(data);
    P N Bharath

  • Getting javascript error in jsf portlet

    Hi,
    I wrote a jsf page with command links calling an action in ManagedBean. Its works fine if run as jsf page. But when I associate the jsf page with a portlet and run the page, I am getting javascript error when clicked on the command links.
    Please help me to resolve this problem.
    The jsf page
    <%@ page language="java" contentType="text/html;charset=UTF-8"%>
    <%@ taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
    <%@ taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
    <%@ taglib uri="http://www.bea.com/servers/portal/groupspace/tags/activemenus" prefix="activemenus" %>
    <%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
    <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
    <%@ taglib uri="http://bea.com/faces/adapter/tags-naming" prefix="netuix" %>
    <html>
    <head></head>
         <body>
    <f:view>
         <netuix:namingContainer id="facesContent">
              <h:form>
    <f:verbatim>
         <table border="0" width="100%">
              <tr>
                   <td>
                        <h:outputLabel value="Notifications" for="heading"/>
                   </td>
                   <td>
                        (<h:outputText value="#{notificationsBean.notificationsSize}" escape="true"/>)
                   </td>
                   <td>
                             <h:commandLink action="#{notificationsBean.showInWorkList}" immediate="true">
                                  <h:outputText value="Show in Worklist"/>
                             </h:commandLink>
                   </td>
                   <td>
                        <h:outputText value="hai"/>
                   </td>
              </tr>
         </table>
    </f:verbatim>     
              <div style="overflow: auto; width: 100%; height: 200px">
              <h:dataTable value="#{notificationsBean.userNotifs.notificationsList}" var="notification">
                   <h:column>
                        <f:facet name="header">
                             <h:commandLink action="#{notificationsBean.sort}">
                                  <f:param name="column" value="caseNB"/>
                                  <f:param name="sortDirection" value="#{notificationsBean.sortDirection}"/>
                                  <f:param name="pattern" value="####"/>
                                  <h:outputText value="Case ID"/>
                             </h:commandLink>
                        </f:facet>
                        <h:outputText value="#{notification.caseNB}"/>
                   </h:column>
                   <h:column>
                        <f:facet name="header">
                             <h:commandLink action="#{notificationsBean.sort}" immediate="true">
                                  <h:outputText value="From"/>
                                  <f:param name="column" value="senderNM"/>
                                  <f:param name="pattern" value=""/>
                                  <f:param name="sortDirection" value="#{notificationsBean.sortDirection}"/>
                             </h:commandLink>
                        </f:facet>
                        <h:outputText value="#{notification.senderNM}"/>
                   </h:column>
                   <h:column>
                        <f:facet name="header">
                             <h:commandLink action="#{notificationsBean.sort}">
                                  <f:param name="column" value="priorityCD"/>
                                  <f:param name="sortDirection" value="#{notificationsBean.sortDirection}"/>
                                  <f:param name="pattern" value=""/>
                                  <h:outputText value="Priority"/>
                             </h:commandLink>
                        </f:facet>
                        <h:outputText value="#{notification.priorityCD}"/>
                   </h:column>
                   <h:column>
                        <f:facet name="header">
                             <h:commandLink action="#{notificationsBean.sort}">
                                  <f:param name="column" value="subjectTX"/>
                                  <f:param name="sortDirection" value="#{notificationsBean.sortDirection}"/>
                                  <f:param name="pattern" value=""/>
                                  <h:outputText value="Subject"/>
                             </h:commandLink>
                        </f:facet>
                        <h:outputText value="#{notification.subjectTX}"/>
                   </h:column>
                   <h:column>
                        <f:facet name="header">
                             <h:commandLink action="#{notificationsBean.sort}">
                                  <f:param name="column" value="createDT"/>
                                  <f:param name="sortDirection" value="#{notificationsBean.sortDirection}"/>
                                  <f:param name="pattern" value="dd-MM-yyyy"/>
                                  <h:outputText value="Created(ET)"/>
                             </h:commandLink>
                        </f:facet>
                        <h:outputText value="#{notification.createDT}"/>
                   </h:column>
              </h:dataTable>
              </div>
                   </h:form>
    </netuix:namingContainer>
    </f:view>
    </body>
    </html>
    The Managed Bean:
    public class NotificationsManagedBean {
         private UserNotifications userNotifs=new UserNotifications();
         private int notificationsSize;
         private String column;
         private String sortDirection = "asc";
         private String pattern;
         public UserNotifications getUserNotifs() {
              getUserNotificationsList();
              return userNotifs;
         public void setUserNotifs(UserNotifications userNotifs) {
              this.userNotifs = userNotifs;
         public int getNotificationsSize() {
              getUserNotificationsList();
              return notificationsSize;
         public void setNotificationsSize(int notificationsSize) {
              this.notificationsSize = notificationsSize;
         public String getColumn() {
              return column;
         public void setColumn(String column) {
              this.column = column;
         public String getSortDirection() {
              return sortDirection;
         public void setSortDirection(String sortDirection) {
              if(sortDirection != null && sortDirection.trim().length()!=0)
                   this.sortDirection = sortDirection;
         public String getPattern() {
              return pattern;
         public void setPattern(String pattern) {
              this.pattern = pattern;
         public String showInWorkList() {
              System.err.println("test");
              return "success1";
              //TODO Auto-generated method stub
         public String sort(){
              sort(column, sortDirection);
              return "success";
         @SuppressWarnings("unchecked")
         private void getUserNotificationsList()
              ArrayList<Notification> notificationsList = new ArrayList<Notification>();
              for(int i=0;i<20;i++)
                   Notification notif = new Notification();
                   notif.setCaseNB("122"+i);
                   notif.setCreateDT("12-12-2002");
                   notif.setSenderNM("testing1"+(i%3));
                   System.out.println(notif.getSenderNM());
                   notif.setSubjectTX("testing2"+(i%4));
                   System.out.println(notif.getSubjectTX());
                   notif.setPriorityCD("High");
                   notificationsList.add(notif);
    userNotifs.setNotificationsList(notificationsList);
              if(userNotifs.getNotificationsList()!=null)
                   this.setNotificationsSize(userNotifs.getNotificationsList().size());
    * <p>Return the <code>FacesContext</code> instance for the
    * current request.
    protected FacesContext context() {
    return (FacesContext.getCurrentInstance());
    protected void sort(final String column, final String direction) {
              java.util.Comparator comparator = new SortComparator(userNotifs.getNotificationsList(),column,direction,pattern);
              java.util.Collections.sort(userNotifs.getNotificationsList(), comparator);     
              if(direction.equalsIgnoreCase("asc"))
                   setSortDirection("desc");
              else
                   setSortDirection("asc");
    }

    Too less relevant information and too much irrelevant code.
    First of all, which JS error exactly are you getting? You as developer should know better that you shouldn't ignore errors. They contain helpful information about the cause of the problem and thus also how to solve it. Where exactly does the error come from? (view the generated HTML source). Which JSF implementation and version exactly are you using? Which webbrowser exactly are you using? Does it work in/with other/newer versions?

  • Javascript error with JSF and TOMAHAWK

    I've got two selectOneMenu in my page and I would like to change the selected item of the second selectOneMenu when an item is selected in the first selectOneMenu.
    I tried to implement a solution using Tomahawk. The idea is to generate a click event on a hidden link when an item is selected like explained here:
    http://wiki.apache.org/myfaces/JavascriptWithJavaServerFaces
    When I click on the selectOneMenu, I always have following javascript error : object expected.
    Here is my page:
    <%@ page language="java" pageEncoding="UTF-8"%>
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
    <%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
         <f:view>
              <head>
              </head>
              <body>
                   <h:form id="Monitoring">
                   <SCRIPT language="JavaScript" type="text/javascript">
                   function clickLink(linkId)
                        var fireOnThis = document.getElementById(linkId)
                        alert('le champ a pour valeur : '+linkId)
                        alert('le obj a pour valeur : '+fireOnThis.value)
                        if (document.createEvent)
                        var evObj = document.createEvent('MouseEvents')
                        evObj.initEvent( 'click', true, false )
                        fireOnThis.dispatchEvent(evObj)
                        else if (document.createEventObject)
                        fireOnThis.fireEvent('onclick')
                   </SCRIPT>
                   <t:commandLink id="hiddenLink" forceId="true" style="display:none; visibility:hidden;" action="#{TotoBean.selectModule}"/>
                        <h:selectOneMenu id="modulefilter" value="#{TototBean.moduleId}" rendered="true" onchange="clickLink('hiddenLink');" >
              <f:selectItems value="#{TototBean.moduleList}" />
              </h:selectOneMenu>      
                        <h:selectOneMenu id="servicefilter" value="#{TototBean.serviceId}" rendered="true" onchange="clickLink('hiddenLink');" >
              <f:selectItems value="#{TototBean.serviceList}" />
              </h:selectOneMenu>      
                   </h:form>
              </body>
         </f:view>
    </html>
    and my bean:
    package com.toto.monitoring.bean;
    import java.util.ArrayList;
    import java.util.List;
    import javax.faces.context.FacesContext;
    import javax.faces.event.ValueChangeEvent;
    import javax.faces.model.SelectItem;
    public final class TototBean extends Object {
         private ArrayList<SelectItem> moduleList;
         private ArrayList<SelectItem> serviceList;
         private String          moduleId;
         private String          serviceId;
         public TototBean() {
              super();
              // TODO Auto-generated constructor stub
              this.moduleList           = new ArrayList<SelectItem>();
              this.serviceList           = new ArrayList<SelectItem>();
              initModuleList();
              initServiceList();
         public String selectModule() {
              System.out.println("change");
              setServiceId("All Services");
              return(null);
         final List initModuleList() {
              System.out.println("init module list");
              moduleList = new ArrayList<SelectItem>();
              moduleList.add(new SelectItem("All Modules", "All Modules"));
              moduleList.add(new SelectItem("Module 1", "Module 1"));
              moduleList.add(new SelectItem("Module 2", "Module 2"));
              return moduleList;
         public List getModuleList() {
              System.out.println("get module list");
              return moduleList;
         public String getModuleId() {
              System.out.println("get module ID");
              return moduleId;
         public void setModuleId(String id) {
              System.out.println("set module ID");
              moduleId = id;
         final List initServiceList() {
              System.out.println("init service list");
              serviceList = new ArrayList<SelectItem>();
              serviceList.add(new SelectItem("All Services", "All Services"));
              serviceList.add(new SelectItem("Service 1", "Service 1"));
              serviceList.add(new SelectItem("Service 2", "Service 2"));
              return serviceList;
         public List getServiceList() {
              System.out.println("get service list");
              return serviceList;
         public String getServiceId() {
              System.out.println("get service ID");
              return serviceId;
         public void setServiceId(String id) {
              System.out.println("set service ID");
              serviceId = id;
    Any idea ?
    Thanks for your help.

    The hiddenLink has no value. Does it really need one as it is just used to submit the form ?

  • How to custom a conversion error in JSF page in JDeveloper

    According to the book "Core JavaServer Faces" p213 (fifth edition), if I add the following line to messages.properties file, and specifiy it in the faces-config.xml and .jsp file, then the displayed conversion error message should be my tailored one instead of the default. However, I still get the default error message. Besides, I didn't find "CONVERSION" variable in UIInput class. Is the book wrong? And what's the correct way?
    javax.faces.component.UIInput.CONVERSION=Please correct your input

    I didn't choose any special in JDeveloper IDE. I just selected "new" to create a file called "message.properties" and put the line there. I didn't specify converters excepts declaring the type in the Jave Beans. I guess the converting is done by the JSF framework automatically. It must be a JSF converter since I created the page as a JSF page.

  • 404 error access JSF pages

    Hello,
    When I was running my JSF application through the embeded Tomcat 6.0.18 server in Netbeans 6.5.1 all worked fine. After deploying the *.WAR file to the stand alone Tomcat 6.0.18 server I get a 404 error when I access the jsf pages. The default page at http://localhost:8080 work fine and so does the servlet in the same webapp as my jsfs. I tried downloading the JSF & JSTL frameworks and placing the contents of their lib directory into TOMCATHOME/lib and restarted the server - no effect
    Pls Help ! Thnx
    (URL im using to access one of the jsf pages is http://localhost:8080/LUIDManager/LUID_Config_List.jsf)
    Here is my web.xml file:
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
        <context-param>
            <param-name>com.sun.faces.verifyObjects</param-name>
            <param-value>false</param-value>
        </context-param>
        <context-param>
            <param-name>com.sun.faces.validateXml</param-name>
            <param-value>true</param-value>
        </context-param>
        <context-param>
            <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
            <param-value>client</param-value>
        </context-param>
        <servlet>
            <servlet-name>Faces Servlet</servlet-name>
            <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
            <load-on-startup>1</load-on-startup>
        </servlet>
        <servlet>
            <servlet-name>initServlet</servlet-name>
            <servlet-class>Servlets.initServlet</servlet-class>
        </servlet>
        <servlet-mapping>
            <servlet-name>Faces Servlet</servlet-name>
            <url-pattern>*.jsf</url-pattern>
        </servlet-mapping>
        <servlet-mapping>
            <servlet-name>initServlet</servlet-name>
            <url-pattern>/initServlet</url-pattern>
        </servlet-mapping>
        <session-config>
            <session-timeout>
                30
            </session-timeout>
        </session-config>
        <welcome-file-list>
            <welcome-file>forwardToJSF.jsp</welcome-file>
            </welcome-file-list>
        <resource-ref>
            <description>DB Connection</description>
            <res-ref-name>jdbc/luidregistry</res-ref-name>
            <res-type>javax.sql.DataSource</res-type>
            <res-auth>Container</res-auth>
        </resource-ref>
        </web-app>Edited by: paulchwd on Apr 15, 2009 5:01 PM

    Thnx for your reply. Not sure what Faclets are. I added the JSF 1.2 framework from Netbeans into my project. I am also an idiot :)
    The links the servlet generates to take me to the JSFs had a typo - wrong port #
    Thnx for the help

  • Error loading JSF page popup window - Cannot find FacesContext

    Hello,
    I am trying to load a popup window from my Visual Web JSF page. The popup window itself will be a Visual Web JSF page also.
    As an example, i have 2 buttons on my original page with jsp tags as follows::
    <webuijsf:button binding="#{Page1.button1}" id="button1" onClick="window.showModelessDialog('./PopupPage.jsp'); return false;"
    style="left: 19px; top: 16px; position: absolute" text="Button"/>
    <webuijsf:button actionExpression="#{Page1.button2_action}" binding="#{Page1.button2}" id="button2"
    onClick="window.showModelessDialog('./PopupPage.jsp');" style="position: absolute; left: 20px; top: 44px" text="Button"/>
    When i click Button1, the popup window appears but will not load the page within the window. I get the following report in the server log:
    StandardWrapperValve[jsp]: PWC1406: Servlet.service() for servlet jsp threw exception
    java.lang.RuntimeException: Cannot find FacesContext
    at javax.faces.webapp.UIComponentClassicTagBase.getFacesContext(UIComponentClassicTagBase.java:1811)
    at javax.faces.webapp.UIComponentClassicTagBase.setJspId(UIComponentClassicTagBase.java:1628)
    at org.apache.jsp.PopupPage_jsp._jspx_meth_f_view_0(PopupPage_jsp.java from :102)
    at org.apache.jsp.PopupPage_jsp._jspService(PopupPage_jsp.java from :77)
    ETC ETC
    If i click Button2 (which does NOT return false in the onclick Script and thus submits the first page) the first attempt fails with the same error, but if i try a second time the popup window displays and loads the page correctly.
    Any solutions would be greatly appreciated as this is driving me crazy :-s
    Edited by: coxy69 on Jan 9, 2008 10:29 PM

    Cannot find FacesContextThis generally indicates that you invoked a request which points to a JSP page which contains JSF tags, but that the request itself isn't passed through the FacesServlet. Make sure that the request URL is covered by the url-pattern setting of the FacesServlet in the web.xml.

  • Javascript Error with UIX Page

    Hi all,
    I am using JHeadstart 10.1.2.2.32 with JDeveloper 10.1.2.1.0 to develop UIX pages. I have run into the following problem with one of my UIX pages. We have a page with a table view which uses sortable headers. In certain situations when using the sortable headers in IE 6.0.2900.2180, a javascript error appears. This does not occur using Firefox.
    It says:
    Line: 2894
    Char: 1
    Error: 'type' is null or not an object
    Code: 0
    URL: (the URL of the page)
    I have figured out that the error is occuring in the Common2_2_20.js file on the following line, which is part of the function _multivalidate:
    var a7 = a6.type; The error only occurs in the following situation. If the user has just logged into the system and certain rows in the table are read-only and others are editable. If you click on any of the sortable headers, it will sort fine the first time. However, if you click on the sortable header again, the javascript error appears. It only happens if you click on the sortable headers twice in a row.
    I have tried taking out the line of code, but then I can not sort the headers at all.
    I read in the forum that the error can occur because of the way IE handles the compression of javascript files. We changed the setting on the app server to not compress javascript files. I then undeployed and redeployed the application. However the same error is still occuring.
    If you need any more information, please let me know. Thanks in advance.
    Susan

    We found out that we had a custom script on the page that was interfering with script in the Common2_2_20.js. By moving the script to the end of our page, it solved our problem.
    Susan

  • Javascript errors on Novell page

    On Novell Documenttation pages i get this error :
    A JavaScript error has occurred on this page! Please note down the following information and pass it on to the Webmaster..
    Error: eval(docName + (".getElementById(\"" + objName + "\")")) is null
    Page: http://www.novell.com/documentation/docui_a/docnav.js
    Line: 20
    Browser: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.13) Gecko/20101203 Firefox/3.6.13
    example :
    http://www.novell.com/documentation/gw8/gw8_admin/?page=/documentation/gw8/gw8_admin/data/a2zvyc4.html
    i tested IE , Opera and Chrome without problems.

    On Novell Documenttation pages i get this error :
    A JavaScript error has occurred on this page! Please note down the following information and pass it on to the Webmaster..
    Error: eval(docName + (".getElementById(\"" + objName + "\")")) is null
    Page: http://www.novell.com/documentation/docui_a/docnav.js
    Line: 20
    Browser: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.13) Gecko/20101203 Firefox/3.6.13
    example :
    http://www.novell.com/documentation/gw8/gw8_admin/?page=/documentation/gw8/gw8_admin/data/a2zvyc4.html
    i tested IE , Opera and Chrome without problems.

  • HTTP 500 internal server error with jsf pages in OC4J 10.1.2

    Hi all. I am trying to use the Sun RI o fJSF1.1 together with a standalone OC4J 10.1.2. My jsf pages are not being displayed. Any clues.

    Hi ,
      Please answer my following questiosn.
    1)  which PI version are you using?
    2) How many J2EE nodes you have.
    please be reminded that SOAP is not for the heavy messages. Then you need to increase your timeout parameters from BASIS.
    Rgds
    Veeru
    Edited by: viru srivastava on Dec 14, 2010 10:18 PM

  • Javascript error on jspx page

    Hello all,
    I am using ADF BC and ADF faces with JDEV version 11.2. I have issue where I have a popup on a page to create a row. Lately, I keep getting error in javascript as x269.getPeer().setBusy(x269,true); I used firebug to get this information and the line is in boot-SHEPHERD-PS1-9296.js
    I am not able to see why I get this error. Does anyone have a clue or resolution to this issue? I am pasting the code of jspx page below -
    <?xml version='1.0' encoding='UTF-8'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
    <jsp:directive.page contentType="text/html;charset=UTF-8"/>
    <f:view>
    <af:document id="d1">
    <af:messages id="m1"/>
    <af:form id="f1">
    <af:pageTemplate viewId="/templates/twocol-fixedheader-nomenu.jspx"
    value="#{bindings.pageTemplateBinding}" id="pt1">
    <f:facet name="left">
    <af:panelGroupLayout id="pgl1" layout="vertical">
    <af:panelAccordion id="pa1">
    <af:showDetailItem id="sdi1" stretchChildren="first">
    <af:train value="#{controllerContext.currentViewPort.taskFlowContext.trainModel}"
    id="t1" layout="vertical"/>
    </af:showDetailItem>
    </af:panelAccordion>
    </af:panelGroupLayout>
    </f:facet>
    <f:facet name="center">
    <af:panelGroupLayout id="pgl3" layout="vertical">
    <af:panelHeader text="#{res['create.writeoff.approvalflow']}"
    id="ph1">
    <f:facet name="context"/>
    <f:facet name="menuBar"/>
    <f:facet name="toolbar">
    <af:panelGroupLayout id="pgl2" layout="horizontal">
    <af:trainButtonBar value="#{controllerContext.currentViewPort.taskFlowContext.trainModel}"
    id="tbb1"/>
    <af:toolbar id="t2">
    <af:commandToolbarButton text="#{res['button.save.title']}"
    id="ctbWriteOffExit"
    action="Save" immediate="true"/>
    <af:commandToolbarButton text="#{res['button.exit.title']}"
    id="commandToolbarButton1"
    action="Cancel"
    immediate="true"/>
    </af:toolbar>
    </af:panelGroupLayout>
    </f:facet>
    <f:facet name="legend">
    <af:outputFormatted value="WO#{bindings.Id.inputValue} : #{bindings.Title.inputValue}"
    id="of2"/>
    </f:facet>
    <f:facet name="info"/>
    <af:panelGroupLayout id="pgl4" layout="horizontal">
    <af:spacer width="0" height="10" id="s2"/>
    <af:outputFormatted id="of1"
    value="#{res['create.writeoff.approvalflow.info']}"/>
    </af:panelGroupLayout>
    </af:panelHeader>
    <af:separator id="s1"/>
    <af:panelGroupLayout id="pgl5" layout="horizontal">
    <af:commandToolbarButton id="ctb2"
    text="#{res['button.insert.title']}"
    rendered="#{UserInfoBean.approver}">
    <af:showPopupBehavior popupId="p1"/>
    </af:commandToolbarButton>
    <af:commandToolbarButton id="commandToolbarButton2"
    text="#{res['button.delete.title']}"
    rendered="#{pageFlowScope.WriteOffBean.addedByUser == 'Y' and pageFlowScope.WriteOffBean.approverAddedBy == UserInfoBean.employeeLanId or backingBeanScope.AuthorizationBean.sysAdminRole}"
    action="#{TableBean.deleteApprover_action}"/>
    <af:commandToolbarButton id="commandToolbarButton3"
    text="Insert Before">
    <af:showPopupBehavior popupId="p3"/>
    </af:commandToolbarButton>
    <af:commandToolbarButton id="commandToolbarButton4"
    text="Insert After">
    <af:showPopupBehavior popupId="p3"/>
    </af:commandToolbarButton>
    </af:panelGroupLayout>
    <af:table value="#{bindings.WoApproverVO11.collectionModel}"
    var="row" rows="#{bindings.WoApproverVO11.rangeSize}"
    emptyText="#{bindings.WoApproverVO11.viewable ? 'No data to display.' : 'Access Denied.'}"
    fetchSize="#{bindings.WoApproverVO11.rangeSize}"
    rowBandingInterval="0"
    selectedRowKeys="#{bindings.WoApproverVO11.collectionModel.selectedRow}"
    selectionListener="#{bindings.WoApproverVO11.collectionModel.makeCurrent}"
    rowSelection="single" id="t3"
    partialTriggers="::commandToolbarButton2 ::p3 ::d3"
    styleClass="AFStretchWidth" displayRow="last">
    <af:column sortProperty="SeqId" sortable="true"
    headerText="#{bindings.WoApproverVO11.hints.SeqId.label}"
    id="c1">
    <af:outputText value="#{row.SeqId}" id="ot1">
    <af:convertNumber groupingUsed="false"
    pattern="#{bindings.WoApproverVO11.hints.SeqId.format}"/>
    </af:outputText>
    </af:column>
    <af:column sortProperty="EmpRoleName" sortable="true"
    headerText="#{bindings.WoApproverVO11.hints.EmpRoleName.label}"
    id="c3">
    <af:outputText value="#{row.EmpRoleName}" id="ot6"/>
    </af:column>
    <af:column sortProperty="Status" sortable="true"
    headerText="#{bindings.WoApproverVO11.hints.Status.label}"
    id="c2">
    <af:outputText value="#{row.Status}" id="ot2"/>
    </af:column>
    <af:column sortProperty="Watcher" sortable="true"
    headerText="#{bindings.WoApproverVO11.hints.Watcher.label}"
    id="c4">
    <af:outputText value="#{row.Watcher}" id="ot5"/>
    </af:column>
    <f:facet name="contextMenu">
    <!--af:popup id="p2">
    <af:menu text="menu 1" id="m2">
    <af:commandMenuItem text="#{res['button.before.title']}" id="cmi1"
    actionListener="#{pageFlowScope.WriteOffBean.onAddApproverBefore}">
    <af:showPopupBehavior popupId="::p3"/>
    </af:commandMenuItem>
    <af:commandMenuItem text="#{res['button.after.title']}" id="cmi2"
    actionListener="#{pageFlowScope.WriteOffBean.onAddApproverAfter}">
    <af:showPopupBehavior popupId="::p3"/>
    </af:commandMenuItem>
    </af:menu>
    </af:popup-->
    </f:facet>
    </af:table>
    <af:popup id="p1"
    popupFetchListener="#{pageFlowScope.WriteOffBean.addApproverPopupFetchListener}"
    popupCanceledListener="#{pageFlowScope.WriteOffBean.addApproverPopupCancelListener}"
    contentDelivery="lazyUncached"
    binding="#{pageFlowScope.WriteOffBean.approverPopup}">
    <af:dialog id="d2" title="Add Approver or Watcher"
    dialogListener="#{pageFlowScope.WriteOffBean.addApproverDialogListener}">
    <af:panelFormLayout id="pfl1">
    <af:inputListOfValues id="empNameId"
    popupTitle="Search and Select: #{bindings.EmpName.hints.label}"
    value="#{bindings.EmpName.inputValue}"
    label="#{bindings.EmpName.hints.label}"
    model="#{bindings.EmpName.listOfValuesModel}"
    required="#{bindings.EmpName.hints.mandatory}"
    columns="#{bindings.EmpName.hints.displayWidth}"
    shortDesc="#{bindings.EmpName.hints.tooltip}"
    autoSubmit="true">
    <f:validator binding="#{bindings.EmpName.validator}"/>
    </af:inputListOfValues>
    <af:selectBooleanCheckbox value="#{bindings.Watcher1.inputValue}"
    label="#{bindings.Watcher1.label}"
    shortDesc="#{bindings.Watcher1.hints.tooltip}"
    id="sbc1"/>
    </af:panelFormLayout>
    </af:dialog>
    </af:popup>
    <af:popup id="p3"
    popupFetchListener="#{pageFlowScope.WriteOffBean.addApproverPopupFetchListener}"
    popupCanceledListener="#{pageFlowScope.WriteOffBean.addApproverPopupCancelListener}">
    <af:dialog id="d3">
    <af:inputListOfValues id="inputListOfValues1"
    popupTitle="Search and Select: #{bindings.EmpName.hints.label}"
    value="#{bindings.EmpName.inputValue}"
    label="#{bindings.EmpName.hints.label}"
    model="#{bindings.EmpName.listOfValuesModel}"
    required="#{bindings.EmpName.hints.mandatory}"
    columns="#{bindings.EmpName.hints.displayWidth}"
    shortDesc="#{bindings.EmpName.hints.tooltip}"
    autoSubmit="true">
    <f:validator binding="#{bindings.EmpName.validator}"/>
    </af:inputListOfValues>
    <af:selectBooleanCheckbox value="#{bindings.Watcher1.inputValue}"
    label="#{bindings.Watcher1.label}"
    shortDesc="#{bindings.Watcher1.hints.tooltip}"
    id="sbc2"/>
    </af:dialog>
    </af:popup>
    </af:panelGroupLayout>
    </f:facet>
    </af:pageTemplate>
    </af:form>
    </af:document>
    </f:view>
    </jsp:root>

    Hi,
    build 9296 doesn't sound like a public version of JDeveloper. Is this from a production version ? If not, please test another version and - if required - file a bug
    Frank

  • Javascript error for Inserting Pages from a source

    Below is a script I wrote that isn't functioning properly on my large 200 page document that I need it to. Granted there might be a much easier way to script this, but I'm no expert. I have a 200 page document that needs to be 600 pages, basically every page needs to be copied twice (and obviously placed right after the original. So I have the original PDF, then I copied that PDF to use as a source document to copy from. (To clarify if I'm not being clear, the first 3 pages would be page 1, 2, 3,... it needs to be: 1,1,1,2,2,2,3,3,3 etc)
    var targetpage = 0;
    var sourcepage = 0;
    while(sourcepage < 199)
        this.insertPages({
            nPage: targetpage,
            cPath: "source.pdf",
            nStart: sourcepage,
            nEnd: sourcepage
        targetpage++;
        this.insertPages({
            nPage: targetpage,
            cPath: "source.pdf",
            nStart: sourcepage,
            nEnd: sourcepage
        sourcepage++;
        targetpage=targetpage+2;
    It gives me an error that I have no idea means, nor how to correct after only placing a total of 3 pages - so the doc went from 200 to 203 (2 of page 1 as intended, then 1 page of page 2, then for some reason it stops...
    InvalidArgsError: Invalid arguments.
    Doc.insertPages:9:Batch undefined:Exec
    Why is it stopping? And please don't assume I know what I'm doing Thank you.

    Have you read the Acrobat JS API Reference about the insertPages and the path value and restrictions?
    insertPages now needs to use the "privileged context" when not being run as a console or batch event.
    Safe path
    Acrobat 6.0 introduced the concept of a safe path for JavaScript methods that write data to the local hard drive based on a path passed to it by one of its parameters.
    A path cannot point to a system critical folder, for example a root, windows or system directory. A path is also subject to other unspecified tests.
    For many methods, the file name must have an extension appropriate to the type of data that is to be saved. Some methods may have a no-overwrite restriction. These additional restrictions are noted in the documentation.
    Generally, when a path is judged to be not safe, a NotAllowedError exception is thrown (see Error object) and the method fails.

  • Javascript error in BEx after system database copy

    Hello,
    we made a database copy of our BW 3.1 system on another hardware. After having done everything described in the How-To-Guide "Enable SAP BW Web functionality", we called the BEx via URL. The login screen displays and also the Report menu, but there occur JavaScript errors on the page, that didn't occur in the copy master. E.g.
    "SAPBWSSgdo is null or not an object" or
    "SAPBWItemCatalog undefined".
    These errors prevent the choice menu for BW report value options to be displayed, which is quite annoying. Does anybody know where the error might come from? Are there any components required by BEx which weren't copied with the database copy?
    Thanks for your help in advance,
    Volker Hofmann

    Hi Beat,
    thanks you're helping me! The MIME-Repository objects like JS-Files, stylesheets and images can be read. The strange thing is:
    The J2EE engine is hosted by a provider. When they're calling the BEx web reports, they're displayed correctly. But when we call them (via proxy!), the error occurs. Even the application management doesn't know where the error comes from, after having checked if the proxy caches old data. The error is still not resolved...
    Do you have another idea?
    Regards,
    Volker

  • JavaScript errors after v4 upgrade

    Hi,
    we are currently in the process of upgrading our APEX from v2 to v4.
    We have copied all of the application over and are currently testing them.
    One thing we have noticed is that there are JavaScript errors on the pages which are not present in v2.
    e.g Line: 2
    Char: 61979
    Error: 'length' is null or not an object
    The application still works despite this error message. Was wondering if anyone has had similar problems in APEX 4?
    Thanks
    Edited by: Cashy on 23-Nov-2010 03:22

    I removed all report regions from the page, then run it and the errors disappeared. I then put the regions back one by one and the error didnt come back.
    Quite confusing and not quite sure what was wrong but it works OK now.
    The version we are upgrading to is Application Express 4.0.0.00.46 and the templates we are using is template12.
    Thanks for your time
    Chris
    Edited by: Cashy on 23-Nov-2010 05:15

  • Netui javascript errors in portal

    The following code works in a webapp. It generates javascript errors in portal
    <%@ page language="java" contentType="text/html;charset=UTF-8"%>
    <%@taglib uri="http://beehive.apache.org/netui/tags-html-1.0" prefix="netui"%>
    <%@taglib uri="http://beehive.apache.org/netui/tags-databinding-1.0" prefix="netui-data"%>
    <%@taglib uri="http://beehive.apache.org/netui/tags-template-1.0" prefix="netui-template"%>
    <%@taglib tagdir="/WEB-INF/tags" prefix="dst" %>
    <%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
    <netui:html>
    <head>
    <netui:base/>
    <script language="JavaScript" type="text/JavaScript">
    function dstcheck(tagname)
    alert(document[lookupIdByTagId("sampleForm", this)][lookupIdByTagId("textID", this)].value);
    </script>
    </head>
    <netui:body>
    <netui:form action="begin" tagId="sampleForm">
              <netui:textBox dataSource="pageFlow.textValue" tagId="textID" onBlur="dstcheck('textID')"></netui:textBox>
              <netui:anchor action="begin" formSubmit="true">first link</netui:anchor>
    <dst:sample/>
         </netui:form>
    </netui:body>
    </netui:html>

    Can you attach the javascript errors you were getting?
    Thanks
    Subbu
    Srinivas Surapaneni wrote:
    The following code works in a webapp. It generates javascript errors in portal
    <%@ page language="java" contentType="text/html;charset=UTF-8"%>
    <%@taglib uri="http://beehive.apache.org/netui/tags-html-1.0" prefix="netui"%>
    <%@taglib uri="http://beehive.apache.org/netui/tags-databinding-1.0" prefix="netui-data"%>
    <%@taglib uri="http://beehive.apache.org/netui/tags-template-1.0" prefix="netui-template"%>
    <%@taglib tagdir="/WEB-INF/tags" prefix="dst" %>
    <%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
    <netui:html>
    <head>
    <netui:base/>
    <script language="JavaScript" type="text/JavaScript">
    function dstcheck(tagname)
    alert(document[lookupIdByTagId("sampleForm", this)][lookupIdByTagId("textID", this)].value);
    </script>
    </head>
    <netui:body>
    <netui:form action="begin" tagId="sampleForm">
              <netui:textBox dataSource="pageFlow.textValue" tagId="textID" onBlur="dstcheck('textID')"></netui:textBox>
              <netui:anchor action="begin" formSubmit="true">first link</netui:anchor>
    <dst:sample/>
         </netui:form>
    </netui:body>
    </netui:html>

Maybe you are looking for

  • Creative Cloud updates fail due to error U43M1D212

    Problem: Creative Cloud desktop is installed. Login to Creative Cloud works. Applications can be installed BUT applications CANNOT be updated. Error message: "Unable to reach Adobe servers" System: Windows 7 Ultimate, 64-bit What I've tried so far: 1

  • Windows 8.1 Fingerprin​t Reader Will Not Work With IE11

    After upgrading to Windows 8.1, I am having issues with Fingerprint Reader in Internet Explorer 11. I have upgraded to the latest Lenovo FPR software for Win 8.1 (6.0.0.8102) which has not helped. FPR works fine to log-on into Windows 8.1. When I try

  • Xcode 4 crashes after I open my project

    After I waste a day searching why Xcode consumes 100% of CPU (it seems a problem with SVN repository) this application begin to crash systematically when I open my project. I clean the build, I deleted DerivedData contents and Xcode cache... no luck.

  • Fiber disconnects and reconnects for no reason i can fix!

     I am not very computer literate and being mobility disabled i have problems maniplulating the equipment without a lot of pain, yet i have found myself having to get up several times a day to try and reset this router, check cables and filter etc.For

  • Older version of bonjour cannot be removed?

    I tried to install the latest Itunes but anytime I try to do it, halfway of the installation it says older version of bonjour cannot be removed. Help please and thank you