Custom Query (18300 matches)

Filters
 
Or
 
  
 
Columns

Show under each result:


Results (16 - 18 of 18300)

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
Ticket Resolution Summary Owner Reporter
#6142 invalid xhrPut/xhrDelete unit test failures (IE6, FF2) James Burke bill
Description

Run nightly unit tests. Failure in XHR tests.

#3845 fixed xhrPost() double-escapes form field names James Burke guest
Description

Posting the following form:

<form onsubmit="dojo.xhrPost({'form' : this})">

<input type="text" name="test[1]" value="first" /> <input type="submit" value="submit" />

</form>

Results in the following raw post data:

array%255B1%255D=first

The '[' has been escaped twice - first to '%5B', then the '%' gets escaped again.

dojo._ioSetArgs() turns the form into an object, the object into a string, the string back into an object and then the object into a string. Below is a simple patch that seems to address the problem - I'd attach it, but can't see how :

--- xhr.js.orig 2007-07-24 16:33:00.000000000 +0100
+++ xhr.js      2007-07-24 16:33:52.000000000 +0100
@@ -271,11 +271,11 @@
                ioArgs.args = args;
 
                //Get values from form if requestd.
-               var formQuery = null;
+               var formObject = null;
                if(args.form){
                        var form = dojo.byId(args.form);
                        ioArgs.url = args.url || form.getAttribute("action");
-                       formQuery = dojo.formToQuery(form);
+                       formObject = dojo.formToObject(form);
                }else{
                        ioArgs.url = args.url;
                }
@@ -283,9 +283,9 @@
                // set up the query params
                var miArgs = [{}];
 
-               if(formQuery){
+               if(formObject){
                        // potentially over-ride url-provided params w/ form values
-                       miArgs.push(dojo.queryToObject(formQuery));
+                       miArgs.push(formObject);
                }
                if(args.content){
                        // stuff in content over-rides what's set by form
#5323 invalid xhrPost 1.0 doesn't work but .9 does James Burke guest
Description

I am using websphere (application server 6)/ rad (7.0) ibm environment to develop portlets

I am trying to receive a string with an xhrPost. The string is a 2d array (and after i get this working i will want to send it to my grid code).... but that's after i get this working (hopefully you can help)

This exact code IS WORKING with .9 BUT NOT with 1.0

and it's extremely simple code.... (please let me know if it's working in your environment)

here's my post (i'll give you the full jsp below):

dojo.xhrPost( { url: '<%=renderResponse.encodeURL(renderRequest.getContextPath() + "/RestyDataLoad?")%>', handleAs: 'text', timeout: 10000,

load: function(response,ioArgs) { var mainForm = dojo.byId('mainTbl'); mainForm.innerHTML = response; dojo.parser.parse(mainForm); dijit.byId('noEmplIDDialog').hide(); return response; }, error: function(response, ioArgs) { alert('HTTP Status Code in callRestyDataLoad: ' + ioArgs.xhr.status); }, form: 'noEmplID' });

Here's the Servlet side:

protected void doPost(HttpServletRequest? request, HttpServletResponse? response) throws ServletException?, IOException {

String html=" "7", "10", "A01034", "Queued", "728"],[ "2", "taco", "A01034", "Queued", "729"?"; System.out.println("html:" + html); response.setContentType("text/html"); response.setHeader("Cache-Control", "no-cache"); response.getWriter().write(html); }

TO TEST THIS YOU HAVE TO PRESS THE CLICK HERE AND THEN ENTER THE NUMBER WHERE IT SAYS "FOR TESTING PURPOSES" THIS WILL CALL THE FUNCTION WITH THE POST IN IT.

FULL JSP

<%@page session="false" contentType="text/html" pageEncoding="ISO-8859-1" import="java.util.*,javax.portlet.*"%> <%@taglib uri="http://java.sun.com/portlet" prefix="portlet"%>

<% com.foo.AdminPortletSessionBean? sessionBean = (com.foo.AdminPortletSessionBean?) renderRequest .getPortletSession() .getAttribute( com.foo.AdminPortlet?.SESSION_BEAN);

String emplID = (String) renderRequest .getPortletSession() .getAttribute( com.foo.AdminPortlet?.EMPLID);

%>

<head>

<link rel="stylesheet"

href="<%= renderResponse.encodeURL(renderRequest.getContextPath() + "/_fooAdmin/jsp/html/style/pkiStyle.css") %>" type="text/css">

<link rel="stylesheet"

href="<%= renderResponse.encodeURL(renderRequest.getContextPath() + "/_fooAdmin/jsp/html/dojo/dojo/resources/dojo.css") %>" type="text/css">

<link rel="stylesheet"

href="<%= renderResponse.encodeURL(renderRequest.getContextPath() + "/_fooAdmin/jsp/html/dojo/dijit/themes/tundra/tundra.css") %>" type="text/css">

<script type="text/javascript"

src="<%= renderResponse.encodeURL(renderRequest.getContextPath() + "/_fooAdmin/jsp/html/dojo/dojo/dojo.js") %>" djConfig="parseOnLoad: true"></script>

<script type="text/javascript">

dojo.require("dijit.layout.ContentPane?"); dojo.require("dijit.form.Button"); dojo.require("dijit.TitlePane?"); dojo.require("dijit.form.TextBox?"); dojo.require("dijit.Dialog");

dojo.require("dojo.parser"); dojo.require("dijit.ProgressBar?");

</script>

<script type="text/javascript">

function showEmployeeIdDialog() {

dijit.byId('indeterminateBar1').domNode.style.display = "none";

dijit.byId('noEmplIDDialog').show();

}

function callRestyDataLoad()

{

dijit.byId('indeterminateBar1').domNode.style.display = "block";

dojo.xhrPost( {

url: '<%=renderResponse.encodeURL(renderRequest.getContextPath() + "/RestyDataLoad?")%>',

handleAs: 'text', timeout: 10000,

load: function(response,ioArgs)

{

var mainForm = dojo.byId('mainTbl'); mainForm.innerHTML = response; dojo.parser.parse(mainForm);

dijit.byId('noEmplIDDialog').hide(); return response;

},

error: function(response, ioArgs)

{

alert('HTTP Status Code in callRestyDataLoad: ' + ioArgs.xhr.status);

},

form: 'noEmplID'

});

}

function hideCertReqStatusDialog(){

dijit.byId('certReqStatusDialog').hide();

}

dojo.addOnLoad(

function(){

if ("<%=emplID%>" != "<%=emplID%>") {

dijit.byId('noEmplIDMsg').domNode.style.display = "none"; dijit.byId('loadMsgPane').domNode.style.display = "block"; dijit.byId("emplID").setValue("<%=emplID%>"); callRestyData();

} else { dijit.byId('loadMsgPane').domNode.style.display = "none"; dijit.byId('noEmplIDMsg').domNode.style.display = "block"; }

});

</script>

</head>

<body class=tundra>

</form> </div>

<div dojoType="dijit.Dialog" id="noEmplIDDialog"

title="Enter Employee ID" style="font-size: 14px; width:320px">

<form id="noEmplID"> <table align="center">

<tr>

<td><label>Employee ID:</label></td> <td><input dojoType=dijit.form.TextBox? size="9" maxlength="9"

type="text" id="emplID" name="emplID"></td>

</tr> <tr>

<td colspan="3" align="center">

<button dojoType=dijit.form.Button type="submit"

onclick="callRestyDataLoad()">Submit</button>

</td>

</tr>

<tr>

<td colspan="3" align="center"> <div style="width:190px" id="indeterminateBar1" indeterminate="true" dojoType="dijit.ProgressBar?"></div> </td>

</tr>

</table> </form> </div>

<!-- Main table -->

<div id="mainTbl" align="center">

<div dojoType="dijit.layout.ContentPane?" id="noEmplIDMsg" style="width:75%">

<p style="font-size: 16px; color: red">An error has occurred while retrieving your Employee ID. <p style=:"font-size: 14px">You will need to contact the helpdesk to get this error fixed.<br> In the meantime, you can manually enter your Employee ID to continue using the application by clicking <a href="javascript:showEmployeeIdDialog()">here</a>.<br>For testing purposes, use 000108500 as the Employee ID.

</div> <div dojoType="dijit.layout.ContentPane?" id="loadMsgPane"> <p style="font-size: 16px">Loading Restaurants <div style="width:200px" id="loadingBar" indeterminate="true" dojoType="dijit.ProgressBar?"></div> </div> </div> </body>

ANY SUGGESTIONS OF WHY IT won't work in 1.0 but will with .9 would b great... i have been using beyond compare file comparison software to compare the dojo.js.uncompressed.js files for both, but haven't seen anything in there that is much different. Is there another file i can look at? Basically, it's falling through to the error code instead of producing the array like it does in .9, but i need 1.0 to create the grid... i am wondering if i could take the grid stuff and put it in .9's dojox... but haven't tried that yet.... In firebug it usually lands on this error after the button is pressed:

dojo "console is not defined toString()dojo.js (line 20) [Break on this error] if(typeof dojo=="undefined"){(function(){if(typeof thisdjConfig?=="undefined"..."

or says that dojo/regexp.js is the last file hit

I looked at the regex js for both .9 and 1.0 and didn't see anything in there that would seem to be that much different from the original code... please look at these files to see if you find anything... or please let me know if there has been a change between the two versions for xhr post....

i also tried looking at the porting guide for .9 to 1.0 and didn't find anything about xhr.... thanks for all your help on this... this code is urgent...thanx again!!! :) -j

fyi- This may have something to do with the form attribute... if i take that out and add "content" like content : "what i am posting" instead of form: "what i am posting" it works for a second, but then the page reloads (not sure y).

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
Note: See TracQuery for help on using queries.