dojo

Dojo Grid - Switching between editable and not editable

I have a grid that will edit small chunks of data based on a larger tree structure. In order to make it easier to know what's being saved by the user, I want to have the grid be in a non-editable state when the user first sees the grid. When the user is ready, they can click the edit button, which will make portions of the grid editable....

Where can I find examples on creating a custum TreeGrid and datastore in Dojo 1.5?

Hello stackers, I would like to create a dojo grid with expandable/collapsible rows. Each page will have 25 collapsed rows, but each collapsed row can contain any number of items (for example, 100 items). TreeGrid looks like a good option, but the default layout of TreeGrid is not what I need - the current 1.5 implementations show a '...

Displaying Icons in the Struts2-dojo Tree Control

So, I've got a Struts2.1.8 application and I want to add a tree control with icons, similar to what you see on a file manager. I decided to use the tree control provided in the struts2-dojo-plugin. The tree displays just fine, but I can't find a way to add icon decorations to the nodes. Anyone know how to do this? I've searched the s...

I can't use HTML select within Dojo Tooltip.

I need a Dojo tooltip with a drop-down-list. Unfortunately the tooltip closes when the cursor is moved over the drop-down-list, because the list overhangs the tooltip's div. Is there any workaround? Could the close-automatism be disabled temporarily? <div class="dojoPopupContainer dojoTooltip showComboBox" style="position: abso...

How to call a function (non AJAX) after another function (non AJAX) finishes in Dojo?

Hello Stackers, This is not an AJAX request/response callback question... I am building a grid using Dojo 1.5. I am trying to dojo.connect expand/contract buttons with a function. My problem is that the grid.startup() method seems to take a while after being called before the actual DOM nodes are created, so when I call dojo.query no...

Why is my dijit.Tree not populated from json source?

Hi, I am new to dojo and spring development. I am trying to populate a Tree widget using a json response from a spring-mvc controller. I'm following the examples from the dojocampus website quite closely. Firstly if I use a local data source it works ok: <script type="text/javascript"> dojo.require("dojo.data.ItemFileReadStore"); ...

Listen to a dynamic number of dojo widgets (dijits)

I need to dynamically generate a webpage UI using javascript and dojo. I need to listen to the generated widgets in order to react on user input, but I cannot determine which one was changed... var combobox = new dijit.form.ComboBox( { id: id, store: dataStore, onCh...

Dojo EnhancedGrid nested sorting not working

I am trying to create an Enhanced Grid with nested sorting functionality in Dojo but when I go to add the nested sorting functionality via the plugins the grid no longer works (shows up) in the page. My enhanced grid creation code is as follows: dojo.require("dojox.grid.EnhancedGrid"); dojo.require("dojox.grid.enhanced.plugins.NestedSo...

Dojo Build with NLS - requireLocalization(..) fail?

My question, while at first somewhat similar to this one, seems to be a more basic question - and might be signaling a bug in the build system. I've created a custom build for my dojo application. I only build one layer right now, here's what the profile script/object looks like: dependencies = { stripConsole: "all", action: "...

Javascript AOP support

It is easy enough (for 90% of aop features) to do it without any support being the language itself, like in most dynamic languages like python and ruby. However, Dojo had direct support for it on 1.3.2. What happened in the latest versions? Did they remove it? Is there another javascript aop library that should get more attention? ...

How do I stop dijit.layout.TabContainer from switching tabs, based on the state of the data in the tab?

I know how to disable tabs, etc. This is about preventing an onclick event from switching to an active tab, if the user hasn't met a condition. Is there a function that I can connect to that will pass me an event I can use dojo.stopEvent() on? ...

How to Get Text Node with Dojo JS

I am trying to get the text from within a tag - but that tag has a nested node, too which I don't want. How do I just get the text? For example <div id="i_want_the_text_in_this_div"> <span id="but_not_this_one"> ignore this text </span> keep this text </div> ...

How to make dojo textbox cache the previously entered values

Hi there, How can I make dojo textbox dijit to remember previously entered values, like a regular text box ( David ...

How to change color of specific tree node of the dojo tree.

I created one dojo tree as follows : store = new dojo.data.ItemFileWriteStore({url: link}); treeModel = new dijit.tree.TreeStoreModel({ store: store, query: { "type": "ROOT" ...

iterating through dijit.Tree to set icons and dragable (yes/no) features.

Hi everybody! Hopefully somebody can help me with this problem. I have a dojo.Tree which I love to iterate to set features after it's initialization. var treeModel = new dijit.tree.ForestStoreModel({ store: store, query: { "type": "continent" }, ...

dojox.grid.DataGrid select a row by a column's value

I am not familiar with dojo. I have this application I am using that has a dojo data grid. <table jsid="grid" id="grid" dojoType="dojox.grid.DataGrid" store="store" clientSort="true" style="height: 400px;" rowsPerPage="10" postrender="setTableCount(store,'count');" > <thead> <tr> <th field="enabled" width="24px" st...

Page refresh with onclick event in dojo and I don't want a page refresh

For some reason in ie8 when I run this function after an onclick event it causes a page refresh. I don't wan the page refresh to happen. var edealsButton = dojo.byId("edeals_button"); var edealEmailInput = dojo.byId("edeals_email"); var edealsSignup = dojo.byId("edeals_signup"); var edealsThankYou = dojo.byId("edeals_thankyo...

[Dojo] dojo tree maintenance problem

Hi, I am creating a dojo tree on Mozilla 3 programatically as following var store = new dojo.data.ItemFileReadStore({ "id": "treeSt", "data": _treeData } ); var model = new dijit.tree.ForestStoreModel({ "jsId": "tModel", "store": store, "rootId": "tems", "rootLabel": "TEMS", "query": { "type": "root" }, "childrenAttr...

Dojo form dispalys different in IE 8

For some reason, my code displays correctly in all browsers except IE8. <form dojoType="dijit.form">' <ul class="ul_two_col_form"> <li> <label>Name</label> <input dojoType="dijit.form.ValidationTextBox" invalidMessage="Name is required." required="true" propercase="true" trim="true" id="contactname" /> <div d...

Variable scope in JavaScript (Dojo)

I've started playing with Dojo a bit and I'm curious about variable scope issue that I've experienced. I have the following code: <div dojoType="dijit.form.Button"> <script type="dojo/method" event="onClick" args="evt"> console.dir(lastSelectedItem); </script> Rename </div> <div dojoType="dojo.data.ItemFileReadStor...