dojo

in onBeforeRow, I need to know what grid I am building. need grid id, or grid object

I am extending the subgrids example, and in the onBeforeRow, I need to know the grid that I am building. The "this" object is a view. I was hoping from the view I could somehow access the grid but I can't find a way to.

What I really want to do is something like this:

function buildSubgrid(inRowIndex, inCell) {
...
subGrid['info'] = "data";
subGrid.render();
...
}

and, in the onBeforeRow: access data. In onBeforeRow I also tried this.getCell(0,0).grid['info'] but it seems that the cells are undefined.

As an alternative I'd be happy if I could access that view variable and set my data on it, so I can access it in onBeforeRow that way.

thanks for any help!

need help understanding subgrids - ussues with grid height using 3 levels of dojo subgrids

Hi. Firstly, I'd like to better understand the dojo subgrid example. Why do they need to use setTimeout to build the subgrid? How exactly does the cacheHeight work? I see the cacheHeight is the size of the grid just created, but it seems that the div height is 120px because the grid is undefined. Why return the div anyway as a "placeholder"? Should I use autoheight=true for grids / subgrids?

I have a dojo grid, that contains subgrids, like the "subgrid" test example. I am using dojo 1.1.1. My grid has rows that expand to show a subgrid, and that subgrid can expand to show another subgrid.

1st level subgrid works fine, using a paradigm like the subgrid example supplied with dojo. However, the 3rd level was much more complicated. When I got that working I had weird grid height behavior. I would see that the 3rd level grid was created but the main grid height would not update and you can't see the grids.

After studying the problem, I think my issue is that I have variable height subgrids. The example frequently results in using the default "120px". I think the example depends on having the div placeholder set the height for the cell that contains the subgrid. Although I don't completely believe this because the 1st/2nd levels work fine, even when level 2 has many rows, and the div height is always 120 the 1st time!

Any info on this would be greatly appreciated!

Drag and Drop list?

Hi! I'm new to the forum (and to Dojo). I've got a client who has asked me to create two lists (each in an html list form) on a page. The user needs to be able to drag and drop the content from one list to the other and vice-versa. Does anyone have any recommendations as to the best way to build this? The only spec I have to keep to is Dojo.

Thanks everyone!

Tom

Modal Dialog, customized stylesheets - layout

Hi,

I am new to the Dojo toolkit. Have tried the examples and thats fine.

How do I best implement our own stylesheets with our own form layout when using the dojo modal dialog?

thanks, Lars

struts-dojo-plugin-2.1.0 and googlemaps-tags

Hello, I'm trying to use googlemaps-tags http://www.lamatek.com/GoogleMaps/ with struts-dojo, but when I load in a div the action that returns googlemaps jsp, then I receive the debug message "DEBUG: error downloading remote script" and obviously it doesn't work. I think that it is related to dojo bug #1640, but djconfig flag delaymozloadingfix doesn't solve the problem. Any idea? Thanks

programmatically created tree doesn't show up in IE7 - FF works fine

Hi all,

I have a problem with a dynamic created tree.

First I want to decribe the background:

I am using Dojo v.1.0.2. The tree is created dynamically, the data is hold by an ItemFileReadStore. So, the mainpage loads content via rawXhrPost, the Javascript is extracted from the response and executed. There are four ItemFileReadStores which were built.

So, depending on a navigation item the tree is created dynamically with one of the four stores.

The Problem: it doesn't show up in IE7. It works fine in Firefox. IE7 seems to need a lot of time to build the tree.

The Stores are correct formatted (i.e. no "," at the end) - there are no errors in IE7.

My code:
function destroyTree() {
     if (dijit.byId("tree")) {
        dijit.byId("tree").destroy();
    }
}

function changetree( storeName ) {
        destroyTree();
        var newStore = dojo.getObject(storeName);
        if (!newStore) {alert('No Store!');}else {
                var newTree = new dijit.Tree( {
                        store:newStore,
                        getLabelClass:getCustomLabelClass,
                        onClick:openLink,
                        id:"tree" }, document.createElement("div"));
                        dojo.byId("treeContainer").appendChild(newTree.domNode);
        }
}

Is there any other option to rebuild the tree than destroy it first and build it again?

Is there any known problem with IE7?

Thanks in advance for your help,

Best regards,
Micha aka Stiggi

How to handle the session timeout in dojo

Hi All,

I am in a big trouble. Actually i am using the DOJO toolkit to make an ajax call to fetch some data from the model side which i am showing on my JSP. The model action class forwards to a jsp which i am using in my original jsp to do my intended task.
It is working fine untill the sesion gets expired. Suppose a user leaves the webpage without toching it for say half an hour the sssion gets expired. Now if i click on the link which invokes the dojo ajax call, i get an error occured message(Which is an alert which i have put in dojo call something like this
error: function(type, data, evt){
alert("An error occurred.");
}

now tell me how to handle this such that i can refresh my jsp. Actually whenever the session gets expired and the user tries to do anything on the webpage whic involves the server call the application automaticall tries to authenticate that user. After the authentication it shows a web page where we are supposed to click on a button to proceed further.

Can anyone please help me.

Syndicate content

Back to top