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
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 BharathHi 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 -
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.
SusanWe 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. -
Error opening .jspx page
I am developing using Jdeveloper 10.1.3.1.3984, ADFBC, on a 512M ram WinXP Dell laptop. Until a few days ago, everything has been working fairly well other than the slow response. I started receiving memory too low warnings and apparently messed up in logging off. As you probably guessed, I lost my ...>View> navigators, inspector, palettes, etc.. I tried a tip retrieved from this forum (renamed directory <jdev_home>/jdev/system/oracle.ide.10.1.3.3984 and restarted) and all seemed fine except for my .jspx pages. In trying to open any page, I receive the following exception stack trace:
java.lang.NullPointerException
at oracle.jdevimpl.webapp.model.content.DocumentInfoManager$XmlDocumentInfoImpl.<init>(DocumentInfoManager.java:360)
at oracle.jdevimpl.webapp.model.content.DocumentInfoManager$XmlDocumentInfoImpl.<init>(DocumentInfoManager.java:351)
at oracle.jdevimpl.webapp.model.content.DocumentInfoManager.getDocumentInfo(DocumentInfoManager.java:176)
at oracle.jdevimpl.webapp.editor.html.HtmlEditor.getDocumentInfo(HtmlEditor.java:592)
at oracle.jdevimpl.webapp.editor.AbstractWebAppEditor.createDocuments(AbstractWebAppEditor.java:1197)
at oracle.jdevimpl.webapp.editor.AbstractWebAppEditor.open(AbstractWebAppEditor.java:393)
at oracle.jdevimpl.webapp.editor.html.HtmlEditor.open(HtmlEditor.java:172)
at oracle.jdevimpl.webapp.editor.jsp.JspEditor.open(JspEditor.java:113)
at oracle.ideimpl.editor.EditorState.openEditor(EditorState.java:239)
at oracle.ideimpl.editor.EditorState.createEditor(EditorState.java:147)
at oracle.ideimpl.editor.EditorState.getOrCreateEditor(EditorState.java:90)
at oracle.ideimpl.editor.SplitPaneState.canSetEditorStatePos(SplitPaneState.java:231)
at oracle.ideimpl.editor.SplitPaneState.setCurrentEditorStatePos(SplitPaneState.java:194)
at oracle.ideimpl.editor.TabGroupState.createSplitPaneState(TabGroupState.java:103)
at oracle.ideimpl.editor.TabGroup.addTabGroupState(TabGroup.java:275)
at oracle.ideimpl.editor.EditorManagerImpl.createEditor(EditorManagerImpl.java:1261)
at oracle.ideimpl.editor.EditorManagerImpl.createEditor(EditorManagerImpl.java:1196)
at oracle.ideimpl.editor.EditorManagerImpl.openEditor(EditorManagerImpl.java:1131)
at oracle.ideimpl.editor.EditorManagerImpl.whenOpenEditor(EditorManagerImpl.java:2332)
at oracle.ideimpl.editor.EditorManagerImpl.handleDefaultAction(EditorManagerImpl.java:1893)
at oracle.ide.controller.ContextMenu.fireDefaultAction(ContextMenu.java:343)
at oracle.ideimpl.explorer.BaseTreeExplorer.fireDefaultAction(BaseTreeExplorer.java:1576)
at oracle.ideimpl.explorer.BaseTreeExplorer.dblClicked(BaseTreeExplorer.java:1913)
at oracle.ideimpl.explorer.BaseTreeExplorer.mouseReleased(BaseTreeExplorer.java:1934)
at oracle.ideimpl.explorer.CustomTree.processMouseEvent(CustomTree.java:176)
at java.awt.Component.processEvent(Component.java:5253)
at java.awt.Container.processEvent(Container.java:1966)
at java.awt.Component.dispatchEventImpl(Component.java:3955)
at java.awt.Container.dispatchEventImpl(Container.java:2024)
at java.awt.Component.dispatchEvent(Component.java:3803)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
at java.awt.Container.dispatchEventImpl(Container.java:2010)
at java.awt.Window.dispatchEventImpl(Window.java:1774)
at java.awt.Component.dispatchEvent(Component.java:3803)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
Also, I responded "Yes" to the dialog request for if I wanted to migrate. Has anyone experienced this and can anyone help me to fix this?
Regards,
Paul.Try a fresh install of JDeveloper in a new directory and when asked if you want to migrate answe NO.
-
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 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 < and > for displaying on the page.
result = result.replace(/\<([^!])/g, '<$1');
result = result.replace(/([^-])\>/g, '$1>');
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 AMBecause :
Session.getAtrribute is java-code that can only run on the server
and
var y = session.getAttribute is javascript-code run on the client. -
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 HofmannHi 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:22I 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> -
Dreamweaver CS4 Javascript Errors
Dreamweaver cs4 on one of my computers displays javascript errors everytime any page that includes server behaviors is opened. Other computer has same version of software, opening the same pages, and it doesn't happen. How can I fix this problem?
12. Recreate the Dreamweaver user configuration folder.Windows:
For Dreamweaver CS3, see "How to re-create the Dreamweaver user configuration folder (CS3 on Windows XP, Vista)" (TechNote kb401118).
For Dreamweaver 8, see "Re-creating the Dreamweaver user configuration folder on Windows" (TechNote 36bda422)
Macintosh:
Quit Dreamweaver
In the Mac Finder, browse to the following folder:
Dreamweaver CS3:
Mac HD/Users/[user]/Library/Application Support/Adobe/Dreamweaver 9/Configuration
Dreamweaver 8:
Mac HD/Users/[user]/Library/Application Support/Macromedia/Dreamweaver 8/Configuration
Rename the folder to "Configuration Old"
Restart Dreamweaver and see if the problem persists. -
I have used a spry menu bar on several websites now, and It works very well.
However, I get a javascript error everytime a page loads. Like I said the menu bar works, but i would like my page to run error free.
The error is this items[i].getElements..."a")[0] is undefined
and it occurs in the following block of code from the spry js file.
// safari doesn't support tabindex
if (Spry.is.safari)
this.enableKeyboardNavigation = false;
if(this.element)
this.currMenu = this.element;
var items = this.element.getElementsByTagName('li');
for(var i=0; i<items.length; i++)
if (i > 0 && this.enableKeyboardNavigation)
items[i].getElementsByTagName('a')[0].tabIndex='-1';
this.initialize(items[i], element);
if(Spry.is.ie)
this.addClassName(items[i], this.isieClass);
items[i].style.position = "static";Hi,
The problem could be in your HTML-code or even in your modified style sheet.
So that we do not have to guess, please give us these code, preferably by supplying an online URL.
Ben -
Error while parsing JSF jspx page when including javascript loops
Hi All,
I have a jspx document which contains jsf tags including trinidad tags. I have added a javascript function in the page, which contains a for loop statement, however when I run the page I get an error
com.sun.facelets.FaceletException: Error Parsing /xAdvisorWeb/bundles/receivetask/manageinbox.jspx: Error Traced[line: 48] The content of elements must consist of well-formed character data or markup.
at com.sun.facelets.compiler.SAXCompiler.doCompile(SAXCompiler.java:234)
at com.sun.facelets.compiler.Compiler.compile(Compiler.java:104)
at com.sun.facelets.impl.DefaultFaceletFactory.createFacelet(DefaultFaceletFactory.java:192)
at com.sun.facelets.impl.DefaultFaceletFactory.getFacelet(DefaultFaceletFactory.java:141)
at com.sun.facelets.impl.DefaultFaceletFactory.getFacelet(DefaultFaceletFactory.java:93)
at com.sun.facelets.FaceletViewHandler.buildView(FaceletViewHandler.java:503)
at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:553)
at org.apache.myfaces.trinidadinternal.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:178)
at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:384)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:138)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:995)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:930)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:145)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._invokeDoFilter(TrinidadFilterImpl.java:326)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:290)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:213)
at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:90)
at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:190)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:130)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:87)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:761)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:673)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:498)
at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:464)
at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:90)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:744)
Please note that normal javascript code has worked in my jsf page, this problem only occurs only when I add for loop or while loop in the javascript function. Can we not add javascript loops in a jsf page? Is there something else I need to include?
This is the relevant code snippet :
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:tr="http://myfaces.apache.org/trinidad"
xmlns:ch="http://www.chordiant.com/jsf"
xmlns:chrd="http://chordiant.com/jsf/chrd">
<f:view locale="#{preferLocale.locale}">
<f:verbatim escape="true">
<script>
function validateInput(){
for(int i=0;i<3;i++)
alert('Hi');
return false;
</script>
</f:verbatim>
<tr:commandLink styleClass="ttmBtnCmdLink" onclick="return validateInput();"
action="#{manageInbox.executeTaskForAssignedWorkItems}">
<tr:outputText value="#{msgs.execute_btn}"
styleClass="ttmBtnOutTxt" />
</tr:commandLink>
Any help will be much appreciated.
Thanks in advance,
DebajyotiM-Y wrote:
replace "<" with "& l t ;"
remove spaces in "& l t ;" when u paste it in ur code
in my previous 2 replies i entered it with out spaces and it was getting converted to "<"The forum engine parses HTML entities. So just replace the & by its HTML entity & and it will work: <.
But no, this is not going to work. JavaScript doesn't recognize HTML entities as operators.
Follow the suggestion rlubke gave. Or, even better, put all Javascripts in its own .js file and include this file in the HTML head. -
I have a weird problem that adding a serverListerner component on jspx page causes compilation error:
The class of the deferred-methods return type "{0}" can not be found.
No property editor found for the bean "javax.el.MethodExpression"
If I remove serverListener (to pass compilation) and then add it again in run-time, it works normally (the backing bean method is being triggered correctly, including passing params, etc).
It is happening only on the current project, but when I make a test case it works normally. I suspect it has something with the project settings, but I couldn't find the cause regarding that the project has advanced and there are so many differences to be able to do simple comparison.
Does anyone know what could be the reason for af:serverListener to break compilation, please?
... from jspx page...
<af:resource type="javascript">
function aaa(event) {
var esrc = event.getSource();
AdfCustomEvent.queue(esrc, "bbb", {fvalue : "TEST"},true);
event.cancel();
</af:resource>
<af:inputText label="Label 1" id="it1">
<af:clientListener method="aaa" type="click"/>
<af:serverListener type="bbb" method="#{backing_bean.onClick}"/>
</af:inputText>
... from BB ...
public void onClick(ClientEvent clientEvent) {
String message = (String) clientEvent.getParameters().get("fvalue");
System.out.println(message);
}Hi,
Try like this
<trh:script>clientListenerMethoName= function(event) {
var source = event.getSource();
AdfCustomEvent.queue( source, "serVerListenerType", {}, false); }
</trh:script>
Next :
<af:clientListener method="clientListenerMethoName" type="click"/>
<af:serverListener type="serVerListenerType" method="#{beanName.methodName}"/>
Edited by: Raj Gopal K on May 4, 2011 4:05 PM -
Jspx and external javascript file (display empty page ?!?!)
I have created a JSPX file...
Now I want to add a javascript control to verify that only numbers are pressed from keyboard..
This is a simple javascript function:
function isNumberKey(evt)
var charCode = (evt.which) ? evt.which : event.keyCode
if (charCode > 31 && (charCode < 48 || charCode > 57))
return false;
return true;
When I add a function directly to jspx I get error in phase of compile of the page...
So I tryed to write an external javascript file with function above...
In My jspx page i have put <script src="functions.js"></script> the tag has a reference to external javascript file...
When I run the page I get "blank" page.. (it's like that all html code is a comment)..
If I remove the script tag the page will display correctly...
Is there any example how to include an external javascript file inside jspx?
this is a piece of jspx:
<f:view>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1250"/>
<title></title>
<link href="css/oracle.css" rel="stylesheet" media="screen"/>
<script src="functions.js" type="text/javascript"></script>
</head>
..Hi,
you should not add
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1250"/>
<title></title>
<link href="css/oracle.css" rel="stylesheet" media="screen"/>
<script src="functions.js" type="text/javascript"></script>
</head>
to f:view. There are JavaScript equivalents to this. Alternatively use
<f:verbatim>
<script src="functions.js" type="text/javascript"></script>
</f:verbatim>
I assume you use JDeveloper 10.1.3 because in JDeveloper 11 there are other options
Frank
Maybe you are looking for
-
MacBook Pro is running slow. Can someone look at this report?
Problem description: MacBook Pro is running very slow. Most of it happens within the Apple applications, such as Mail, Safari, Pages, etc., but there has been a noticeable decrease in performance. Thank You! EtreCheck version: 2.1.8 (121) Report gene
-
HP LaserJet Pro 200 Color MFP M276n issue with the software
Dear Members, When i'm trying to install the drivers for the printer HP LaserJet Pro 200 Color MFP M276n, on Windows Xp the issue is specific on windows xp only i tried on two machines its the same and its fine when i try to intall on windows 7. Err
-
Hi, i have a A1186 Mac Pro 2008 Tower. Im running windows 7 64Bit on it. Im not sure about what version of bootcamp should i use to get the drivers. Someone please help me.
-
How can I print a 3 1/2" x 4" photo? The picture is cropped to that size in iPhoto, but when I print it, it comes out much larger.
-
I have an Apple server at my house and have set up iTunes to share music, video and photos. I'm able to view and hear the music and video just fine, but I'd like to be able to view the photos that are on the server from my iPad or iPhone or even a