dojo

DataGrid in Dojo , with json data from a servlet

扶醉桌前 提交于 2019-11-30 14:19:09
问题 I am using JSON for first time... and want to fill my datagrid with my JSON data, this is my JSON data : { "head": { "vars": [ "s" , "fname" , "lname" ] } , "results": { "bindings": [ { "s": { "type": "uri" , "value": "http://tn.gov.in/Person/41" } , "fname": { "type": "literal" , "value": " } , "lname": { "type": "literal" ,n" } } , { "s": { "type": "uri" , "value": "http://tn.gov.in/Person/37" } , "fname": { "type": "literal" , "value": "sh" } , "lname": { "type": "literal" , "value": "Vvan

Has anybody used Dojo and JQuery in the same project?

ぃ、小莉子 提交于 2019-11-30 13:54:53
Has anybody used Dojo and JQuery in the same project? I need a Dojo object oriented part ( and nothing more ) and JQuery for easier presentation, but I am afraid of collision and name clashes. Is it possible to use both on the same page ? use jQuery.noConflict(); before writing jQuery code block more information : http://api.jquery.com/jQuery.noConflict/ read this article too: http://www.sitepen.com/blog/2010/11/15/from-jquery-to-large-applications/ Yes, it is possible and I am doing that right now. I am using Dojo for its framework and JQuery for presentation. It works seamlessly and there

Dojo Toggle Hide and Show Divs

主宰稳场 提交于 2019-11-30 11:36:19
I've done some searching and come up with a lot of mixed results for using Dojo to toggle divs showing vs hidden. Some use dojo.style which it looks like might have been replaced by dojo.fx Some use dijit but thus cannot access a DOM node. Some make use of show() and hide() Some change the CSS I can't seem to get any of them to work. Can someone please point me towards an up-to-date walkthru on this. Solved Used a combination of the following... dojo.addOnLoad(function() { dojo.style(dojo.byId('myDiv'), "display", "none"); }); and to toggle it function toggleDivs(){ if( dojo.style(dojo.byId(

jQuery (or any web tool) Nested Expression Builder

为君一笑 提交于 2019-11-30 11:36:09
问题 I would like to add a feature to a web app I am developing to allow the user to create rules with an expression builder. Such as the one used in Magento (picture in link below). http://i.stack.imgur.com/ZWgcG.png I want to allows them to be able to create the expressions or if statements using column names from a table in a Database, then be able to do comparisons and what not. The expression built in the user interface would then evaluate to code that would be evaluated by a PHP script or

DataGrid in Dojo , with json data from a servlet

╄→尐↘猪︶ㄣ 提交于 2019-11-30 10:07:03
I am using JSON for first time... and want to fill my datagrid with my JSON data, this is my JSON data : { "head": { "vars": [ "s" , "fname" , "lname" ] } , "results": { "bindings": [ { "s": { "type": "uri" , "value": "http://tn.gov.in/Person/41" } , "fname": { "type": "literal" , "value": " } , "lname": { "type": "literal" ,n" } } , { "s": { "type": "uri" , "value": "http://tn.gov.in/Person/37" } , "fname": { "type": "literal" , "value": "sh" } , "lname": { "type": "literal" , "value": "Vvan" } } , { "s": { "type": "uri" , "value": "http://tn.gov.in/Person/39" } , "fname": { "type": "literal"

深入浅出Node.js(四):Node.js的事件机制

佐手、 提交于 2019-11-30 09:54:00
Node.js的事件机制 Node.js在其Github代码仓库( https://github.com/joyent/node )上有着一句短短的介绍:Evented I/O for V8 JavaScript。这句近似广告语的句子却道尽了Node.js自身的特色所在:基于V8引擎实现的事件驱动IO。在本文的这部分内容中,我来揭开这Evented这个关键词的一切奥秘吧。 Node.js能够在众多的后端JavaScript技术之中脱颖而出,正是因其基于事件的特点而受到欢迎。拿Rhino来做比较,可以看出Rhino引擎支持的后端JavaScript摆脱不掉其他语言同步执行的影响,导致JavaScript在后端编程与前端编程之间有着十分显著的差别,在编程模型上无法形成统一。在前端编程中,事件的应用十分广泛,DOM上的各种事件。在Ajax大规模应用之后,异步请求更得到广泛的认同,而Ajax亦是基于事件机制的。在Rhino中,文件读取等操作,均是同步操作进行的。在这类单线程的编程模型下,如果采用同步机制,无法与PHP之类的服务端脚本语言的成熟度媲美,性能也没有值得可圈可点的部分。直到Ryan Dahl在2009年推出Node.js后,后端JavaScript才走出其迷局。Node.js的推出,我觉得该变了两个状况: 统一了前后端JavaScript的编程模型。

Is it possible to filter data in a dgrid like you can in a datagrid? If so, how?

主宰稳场 提交于 2019-11-30 09:50:08
I'm relatively new to dojo and have seen how datagrid offers a dynamic filtering capability that reduces the visible rows based on what you type into a filter text input. I have not found any examples of how to do it with the dgrid. If it can be done, please provide an example or point me to a resource that offers a tutorial or example. Thanks! phusick Yes, it is possible. Use dgrid/OnDemandGrid and define query function that will return true or false based on your logic for each row in dojo/store powering the grid. I prepared an example to play with at jsFiddle: http://jsfiddle.net/phusick

Set dojox.grid.datagrid header column width dynamically

别等时光非礼了梦想. 提交于 2019-11-30 09:27:55
问题 I have a declarative dojox.grid.datagrid with initial header column width. And i have a textbox. my need is In UI, if user enters any value to textbox, that value should be set as the dynamic width of column's header. <div class="claro" id="dfgdfgd" name="dataGrid" onclick="setWidgetproperty(this.id,'xy','inner__dfgdfgd');" ondblclick="editCustomGrid(this.id)" onmouseup="setDocStyle(this.id)" style="height:200px; left:42px; position:absolute; top:89px; width:950px;"> <table class="claro"

深入了解 Dojo 的服务器推送技术

試著忘記壹切 提交于 2019-11-30 08:54:21
本文首发于IBM Developeworks: http://www.ibm.com/developerworks/cn/web/1202_zhouxiang_dojocometd/ ,感谢 JayZ 的投稿。 简介: 服务器推送技术已经出来一段时间了,业界上也有不少基于这种技术(应该说是设计模式)的开源实现,但是要移植或者说应用到自己的项目上都比较麻烦。Dojo 这样一个大型的 Web2.0 开发框架提供了一套封装好的基于服务端推送技术的具体实现(包括服务端 Java 和客户端 Web 和 JavaScript),它基于 Bayeux 协议,提供了一些简单而且强大的接口可以让你快速构建自己的服务端推送功能。客户端实现即 Dojo 的 Cometd 前端组件,它封装了建立连接、消息订阅等等接口。服务端基于 Jetty 和 annotation,组建消息推送机制,同样也封装了比较简单但实用的消息推送接口,与前端 Dojox 的 Cometd 接口协同工作。这篇文章将重点介绍 Dojo 的服务端推送机制是如何运作的,以及我们应该如何基于 Dojo 的 Cometd 工具包构建自己的服务端推送功能。 服务器推送技术和 Bayeux 协议简介 服务器推送技术的基础思想是将浏览器主动查询信息改为服务器主动发送信息。服务器发送一批数据,浏览器显示这些数据,同时保证与服务器的连接

How to generate a right-click event in all browsers

落花浮王杯 提交于 2019-11-30 08:50:39
问题 A little context: The app I'm working on has a right-click context menu for certain objects on the screen. The current design as that each of these objects listens for a right-click, sends an AJAX request to get the context data for that object, uses that data to create a PopupMenu2 from Dojo 0.4.3 (I know!), and then generates a right-click to launch the Dojo menu. I'm trying to figure out a way to generate a right-click event for all browsers. Currently, we only support IE and use the