Richard Perry | 1 Feb 01:56

Stumped adding a form in a tab container

I feel like I'm missing something simple, but I'm stumped.


I have a tab container where I display available users via a filtering select, which then retrieves the user details via ajax.

I have a blank user update form stored as a js variable. Upon fetching the user details, I create a new tab, plug in the update form, then set the form values based on the details retrieved and set up another ajax request to update the user info when submitted.

Everything works as expected except the update process. An empty post is submitted, the xhrPost does not pick up the form values.  Here's  the gist of the code:

       //... retreive user data.....
       var tabs = dijit.byId('users_tab');
       var pane = new dijit.layout.ContentPane({ title:'User Profile', id:'user_details'});
       tabs.addChild(pane,1);  
       
       dojo.byId('user_details').innerHTML = supuf;   // the js variable containing the blank form....
 
       // ...plug in values.....                 
       dojo.byId('user_email_input').value=data.email;                    
       dojo.byId('user_phone_1_input').value=data.phone_1;                    
       ...                    

       upub=dojo.byId('user_profile_update_button');
       dojo.connect(upub, 'onclick', function(){
         upub.disabled='disabled';      
         dojo.xhrPost({
           url: 'ajax/user.profile.update.php',
           handleAs: 'text',
           form: dojo.byId('user_profile_update_form'),
           load: function(data) {
             ...
           },
           error: function() {
             ...      
           } 
         });    
       });
 
Can someone point me to the error in my ways?

________________________________________________________
Dojotoolkit: http://dojotoolkit.org
Reference Guide: http://dojotoolkit.org/reference-guide
API Documentation: http://dojotoolkit.org/api
Tutorials: http://dojotoolkit.org/documentation

Dojo-interest <at> mail.dojotoolkit.org
http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
Picon

Size of custom build

Hello,
 I'm using Dojo 1.6.1 with no custom code, just the normal release.  I've created a customized build to minimize the load, but it occupies about 640 Kb. Is it possible to reduce it to get a smaller file. The main issue is that it is supposed to be downloaded through 3G, and it takes a while. We are thinking of using gzip compression, but before working on that, I want to be sure that my customized build is as small as possible. The custom build is as follows:

dependencies ={
        localeList: "en-us,es-es",
        layers:  [{
            name: "dojo-eco.js",
            dependencies: [
                "dijit.Dialog",
                "dijit.form.Button",
                "dijit.form.ComboBox",
                "dijit.form.DateTextBox",
                "dijit.form.FilteringSelect",
                "dijit.form.Form",
                "dijit.form.RadioButton",
                "dijit.form.Select",
                "dijit.form.Textarea",
                "dijit.form.TextBox",
                "dijit.layout.BorderContainer",
                "dijit.layout.ContentPane",
                "dijit.layout.LayoutContainer",
                "dijit.layout.TabContainer",
                "dijit.MenuBar",
                "dijit.MenuBarItem",
                "dijit.ProgressBar",
                "dijit.Tooltip",
                "dijit.Tree",
                "dojo.data.ItemFileWriteStore",
                "dojox.data.QueryReadStore",
                "dojox.layout.ContentPane",
                "dojox.grid.enhanced.plugins.IndirectSelection",
                "dojox.grid.enhanced.plugins.Menu",
                "dojox.grid.enhanced.plugins.NestedSorting",
                "dojox.grid.enhanced.plugins.Pagination",
                "dojox.grid.EnhancedGrid",
                "dojox.widget.Standby",
                "dojox.xml.parser"
           ]
       }
   ],

   prefixes: [
       [ "dijit", "../dijit" ],
       [ "dojox", "../dojox" ]
     ]
     };

And I run it with the following arguments:

mini=true
optimize=closure
layerOptimize=closure

Anything I maybe missing?

Thanks

Jose

________________________________________________________
Dojotoolkit: http://dojotoolkit.org
Reference Guide: http://dojotoolkit.org/reference-guide
API Documentation: http://dojotoolkit.org/api
Tutorials: http://dojotoolkit.org/documentation

Dojo-interest <at> mail.dojotoolkit.org
http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
johnbk | 1 Feb 04:21
Picon

Re: Dojo - Dijit.Tree - Updating Tree

@maastermedia -  I tried all the options..didn't work out...

--
View this message in context: http://dojo-toolkit.33424.n3.nabble.com/Dojo-Dijit-Tree-Updating-Tree-tp3703883p3705504.html
Sent from the Dojo Toolkit mailing list archive at Nabble.com.
________________________________________________________
Dojotoolkit: http://dojotoolkit.org
Reference Guide: http://dojotoolkit.org/reference-guide
API Documentation: http://dojotoolkit.org/api
Tutorials: http://dojotoolkit.org/documentation

Dojo-interest <at> mail.dojotoolkit.org
http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest

Lavkesh Rathi | 1 Feb 04:37
Picon

Can anyone provide me example of JsonrestStore+Service with ehance datagrid example?

Hi All,

 

Can any one provide me the example of JsonrestStore+Service with ehance datagrid example?

 

What is the use of parameter in service smd? How we will used that?

 

Thanks & Regards,

Lavkesh Rathi | Senior Software Engineer - Information Technology

lavkesh_rathi <at> persistent.co.in | Cell: +91-8275027783 | Tel: +91-20-30236038

Persistent Systems Ltd. | Partners in Innovation | www.persistentsys.com

 

DISCLAIMER ========== This e-mail may contain privileged and confidential information which is the property of Persistent Systems Ltd. It is intended only for the use of the individual or entity to which it is addressed. If you are not the intended recipient, you are not authorized to read, retain, copy, print, distribute or use this message. If you have received this communication in error, please notify the sender and delete all copies of this message. Persistent Systems Ltd. does not accept any liability for virus infected mails.

________________________________________________________
Dojotoolkit: http://dojotoolkit.org
Reference Guide: http://dojotoolkit.org/reference-guide
API Documentation: http://dojotoolkit.org/api
Tutorials: http://dojotoolkit.org/documentation

Dojo-interest <at> mail.dojotoolkit.org
http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
swapnil22589 | 1 Feb 05:47
Picon

Migrating from dojo 1.6.1 to 1.7.1

Hi all,

i am facing issue in migration, we have created certain widgets in dojo
1.6.1 but now since i have replaced 1.6.1 to 1.7.1 , page is not getting
loaded.

it gives error as 
1) "SyntaxError"  and "TypeError" in "dojo/_base/Deferred:216" file.
2) "Error parsing in _ContentSetter#Setter_kiss_layout_accordionpane_0_0 
TypeError" and "dijit/layout/ContentPane:414Error undefined running custom
onLoad code: This deferred has already been resolved" in
"dijit/layout/ContentPane"

My code is ass follows:

kiss.layout.accordionpane.js

dojo.provide("kiss.layout.accordionpane");
dojo.require("dijit._Widget");
dojo.require("dijit._Templated");
dojo.require("dijit.layout.AccordionPane");
dojo.require("kiss.core.parentLabel");

dojo.declare("kiss.layout.accordionpane",
    	
[dijit._Widget,dijit._Templated,dijit.layout.AccordionPane,kiss.core.parentLabel],
  {        
    title:"",
    initializeStrings: function()
    {
    	this.inherited(arguments);
    	if(this.title!=""){
    		this.title = this.getString(this.title);
    	}
    }
}
);

loginpage:

<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://www.springframework.org/tags" prefix="spring"%>
<%
	String path=application.getContextPath();
%>
<!DOCTYPE html PUBLIC &quot;-//W3C//DTD HTML 4.01 Transitional//EN&quot;
&quot;http://www.w3.org/TR/html4/loose.dtd&quot;>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>KISS</title>
<link type=&quot;text/css&quot; rel=&quot;stylesheet&quot;
href=&quot;&lt;c:url
value=&quot;/js/dojoresource/dijit/themes/claro/claro.css&quot; />" />
<%if(session.getAttribute("language") != null) { %>
<script type=&quot;text/javascript&quot; src=&quot;&lt;c:url
value=&quot;/js/dojoresource/dojo/dojo.js&quot; />" djConfig="parseOnLoad:
true, locale:'<%=session.getAttribute("language")%>'"></script>
<%} else {%>
<script type=&quot;text/javascript&quot; src=&quot;&lt;c:url
value=&quot;/js/dojoresource/dojo/dojo.js&quot; />" djConfig="parseOnLoad:
true"></script>
<%} %>

</head>
<body class="claro"  style="font-size: 12px;background-color:#EEEEFF;"
onload="document.f.j_username.focus();">
	<div>
	<table width="100%" >
	</table>
	</div>
		
	<div style="width: 100%; height: 100%;  padding-top: 100px" 
align="center">
		<div id="accordionDiv" dojoType="dijit.layout.AccordionContainer"
			style="width: 400px;">

			<div dojoType="kiss.layout.accordionpane" selected="true"
				title="login_title" align="center">								
				
				<c:if test="${not empty param.login_error}">
					<div>
					
						<p>Your login attempt was not successful, try again.</p>
					
					</div>
				</c:if>
				
				<form name=&quot;f&quot; dojoType=&quot;dijit.form.Form&quot;
method=&quot;POST&quot; action=&quot;&lt;c:url
value='j_spring_security_check'/>">
					<table border="0" cellpadding="5" cellspacing="2">
						<tr>
							<td><div dojoType="kiss.core.label" label="login_user_name"
id="userName"></div>
							<div dojoType="dijit.Tooltip" connectId="userName" position="after">
							<div dojoType="kiss.core.label" label="login_user_name"></div></div>
							</td>
							<td><input type=&quot;text&quot; name=&quot;j_username&quot;
value=&quot;&lt;c:if test='${not empty param.login_error}'><c:out
value='${SPRING_SECURITY_LAST_USERNAME}'/></c:if>" 
								dojoType="dijit.form.ValidationTextBox" required="true">
							</td>
						</tr>
						<tr>
							<td><div dojoType="kiss.core.label" label="login_user_password"
title="login_user_password"></div></td>
							<td><input type="password" name="j_password"
								dojoType="dijit.form.ValidationTextBox"  required="true">
							</td>
						</tr>
						<tr>							
							<td>&nbsp;</td>
							<td><input type="checkbox" name="_spring_security_remember_me"
dojoType="dijit.form.CheckBox">
							<div dojoType="kiss.core.label" label="login_rememberme"></div></td>
						</tr>
						<tr>						
						<td colspan="3" align="center"><button type="submit"
dojoType="kiss.form.button" label="login_submit" title="login_submit">
						</button></td>
						</tr>
					</table>
				</form>
			</div>
		</div>
	</div>
</body>
</html>

-----
Regards,
Swapnil :)
--
View this message in context: http://dojo-toolkit.33424.n3.nabble.com/Migrating-from-dojo-1-6-1-to-1-7-1-tp3705615p3705615.html
Sent from the Dojo Toolkit mailing list archive at Nabble.com.
________________________________________________________
Dojotoolkit: http://dojotoolkit.org
Reference Guide: http://dojotoolkit.org/reference-guide
API Documentation: http://dojotoolkit.org/api
Tutorials: http://dojotoolkit.org/documentation

Dojo-interest <at> mail.dojotoolkit.org
http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest

Cyril CHARLIER | 1 Feb 07:02
Picon

Re: Dojo EnhanceGrid

I put there my page that work for me with enhance and filter :

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">

<head>

<title>Atlantis - Dragons of Atlantis</title>

<link rel="stylesheet" href="./js/dojo/resources/dojo.css">
<link rel="stylesheet" href="./js/dijit/themes/claro/claro.css">
<link rel="stylesheet" href="./js/dijit/themes/claro/document.css">
<link rel="stylesheet" href="./js/dojox/grid/enhanced/resources/claro/EnhancedGrid.css">
<link rel="stylesheet" href="./js/dojox/grid/enhanced/resources/claro/EnhancedGrid_rtl.css">

<link rel="stylesheet" type="text/css" href="style.css" media="screen" />

<style>
#grid {

height: 700px;

}
</style>

<script src="./js/dojo/dojo.js" type="text/javascript" data-dojo-config="parseOnLoad:true"></script>
<script>
dojo.require("dojox.grid.EnhancedGrid");
dojo.require("dojox.grid.enhanced.plugins.Filter");
dojo.require("dojo.data.ItemFileWriteStore");
dojo.require("dijit.form.Select");
dojo.require("dijit.form.FilteringSelect");
dojo.require("dijit.form.Button");
dojo.require("dijit.Tooltip");
dojo.require("dojo.parser");

function showFilterBar(){
dijit.byId('grid').showFilterBar(true);
}

var grid, store;

dojo.ready(function(){
store = new dojo.data.ItemFileWriteStore({
url: "data.php?mode=listjoueurcarte&idroyaume=4"
});

grid = new dojox.grid.EnhancedGrid({store: store, /*query: { id : "0" },*/ 
plugins : {filter: {closeFilterbarButton: true,  ruleCount: 5} },
       structure: [
{ name: "Alliance", field: "Alliance"},
{ name: "Joueur", field: "Joueur"},
{ name: "Force", field: "Force", datatype: "number"},
{ name: "X", field: "X", datatype: "number"},
{ name: "Y", field: "Y", datatype: "number"},
{ name: "Nom Cité", field: "Libelle"},
{ name: "Terrain", field: "LibelleTerrain"},
{ name: "Niveau Terrain", field: "NiveauTerrain"}
]},
dojo.byId('grid'));

grid.startup();

dojo.connect(grid, "onRowClick", grid, function(evt){

var idx = evt.rowIndex, item = this.getItem(idx);

if(evt.cell.field == "Alliance") {
var value = this.store.getValue(item, "IdAlliance");
                                                // Don't work with enhanced grid
//this.filter( { IdAlliance:value } );

}
else if(evt.cell.field == "Joueur") {
var value = this.store.getValue(item, "IdJoueur");
                                                // Don't work with enhanced grid
//this.filter( { IdJoueur:value } );
}
});
});
</script>
</head>

<body class="claro">
<div id="header">
<h1>title</h1>
<div id="menu">
 <ul id="nav"> 
  <li><a href="#" onClick="doSomething();">D&eacute;connexion</a></li>
 </ul>
</div>
</div>

<div id="content">
<div id="right">
<p>
<h2>Contenu du Royaume : <button data-dojo-type="dijit.form.Button" onclick='showFilterBar()'>Afficher la barre de filtre</button></h2>
</p>
<p>
<span id="grid"></span>
</p>
</div>
</div>
</body>
</html>


--
Cyril Charlier

http://www.orionbanque.fr/
http://www.orionbanque.fr/wiki/doku.php




2012/1/31 deepesh <njandeepesh <at> gmail.com>
Hi
Now i corrected the things. But i dont know what to write there to get it
displayed

<!DOCTYPE html>
<html>
<head>
<title>The Simplest Dojo DataGrid Example of All Time</title>




       </head>
       <body>
       <div id="gridDiv"></div>
</body>
</html>


--
View this message in context: http://dojo-toolkit.33424.n3.nabble.com/Dojo-EnhanceGrid-tp3702398p3702844.html
Sent from the Dojo Toolkit mailing list archive at Nabble.com.
________________________________________________________
Dojotoolkit: http://dojotoolkit.org
Reference Guide: http://dojotoolkit.org/reference-guide
API Documentation: http://dojotoolkit.org/api
Tutorials: http://dojotoolkit.org/documentation

Dojo-interest <at> mail.dojotoolkit.org
http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest

________________________________________________________
Dojotoolkit: http://dojotoolkit.org
Reference Guide: http://dojotoolkit.org/reference-guide
API Documentation: http://dojotoolkit.org/api
Tutorials: http://dojotoolkit.org/documentation

Dojo-interest <at> mail.dojotoolkit.org
http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
bobvan | 1 Feb 07:46
Picon

Re: Does the profileFile have a new format for 1.7.x custom build?

Yes, Ivar's info is good. He recommends against a single layer, so doesn't
give an example. The variations on command line switches I've tried haven't
made any difference and aren't a big factor like I thought. There's a few
ways to get into a release build, point to a profile file and do optimizing,
so I'm getting the whole process to happen.

When I try old and new syntax command parameters and old and new profileFile
formats, I get the release build process to happen using my profileFile but
wind up with a release fileset containing compressed and uncompressed
versions of every js file. The resulting layer file is small, named as
'mywebappdojo-loadInit.js' and doesn't work if I use it in the webapp.

My webapp doesn't have AMD modules & I don't know what AST is so the system
may be putting the build in a legacy mode, or it's trying to, but running
amok.

I can get a build with dojo 1.6.1 to run good, but the same process, or
other variations, with dojo 1.7.1 gives me these problems. Since the build
commands and profileFile files look good, the problem may be in the layer
module file. Maybe the syntax is wrong in there?

--
View this message in context: http://dojo-toolkit.33424.n3.nabble.com/Does-the-profileFile-have-a-new-format-for-1-7-x-custom-build-tp3692358p3705743.html
Sent from the Dojo Toolkit mailing list archive at Nabble.com.
________________________________________________________
Dojotoolkit: http://dojotoolkit.org
Reference Guide: http://dojotoolkit.org/reference-guide
API Documentation: http://dojotoolkit.org/api
Tutorials: http://dojotoolkit.org/documentation

Dojo-interest <at> mail.dojotoolkit.org
http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest

deepesh | 1 Feb 08:06
Picon

Re: Dojo EnhanceGrid

Hi
  i am expecting a result that looks like what mentioned in the link

http://dojotoolkit.org/reference-guide/dojox/grid/EnhancedGrid/plugins/Pagination.html#id2

--
View this message in context: http://dojo-toolkit.33424.n3.nabble.com/Dojo-EnhanceGrid-tp3702398p3705759.html
Sent from the Dojo Toolkit mailing list archive at Nabble.com.
________________________________________________________
Dojotoolkit: http://dojotoolkit.org
Reference Guide: http://dojotoolkit.org/reference-guide
API Documentation: http://dojotoolkit.org/api
Tutorials: http://dojotoolkit.org/documentation

Dojo-interest <at> mail.dojotoolkit.org
http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest

Chris | 1 Feb 08:18
Picon

Re: Editable grids and the onCellFocus event handler

Ok .. I found it ..

                dojo.connect(grid, "onCellFocus", grid, function(inCell, inRowIndex){
                    console.log("focus row: "+inRowIndex);
                });

Working like a charm now.

________________________________________________________
Dojotoolkit: http://dojotoolkit.org
Reference Guide: http://dojotoolkit.org/reference-guide
API Documentation: http://dojotoolkit.org/api
Tutorials: http://dojotoolkit.org/documentation

Dojo-interest <at> mail.dojotoolkit.org
http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
Cyril CHARLIER | 1 Feb 09:01
Picon

Re: Dojo EnhanceGrid

In my example, i have juste add : 

dojo.require("dojox.grid.enhanced.plugins.Pagination");

and the option plugin work if i add it in the plugins option of tyhe grid : 

plugins : {
filter: {closeFilterbarButton: true,  ruleCount: 5},
pagination: {
   pageSizes: ["25", "50", "100", "All"],
   description: true,
   sizeSwitch: true,
   pageStepper: true,
   gotoButton: true,
   /*page step to be displayed*/
   maxPageStep: 7,
   defaultPageSize: 50,
   /*position of the pagination bar*/
   position: "top"
}
},

A+
________________________________________________________
Dojotoolkit: http://dojotoolkit.org
Reference Guide: http://dojotoolkit.org/reference-guide
API Documentation: http://dojotoolkit.org/api
Tutorials: http://dojotoolkit.org/documentation

Dojo-interest <at> mail.dojotoolkit.org
http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest

Gmane