Questions tagged [expando]

An expando is an custom property attached to a document object.

An expando property is an attribute of a DOM element which is not part of the specification or IDL. Some legacy expandos, such as onclick, are natively mapped to an internal event handler for backward compatibility with the DOM level 0 model.

References

80 questions
51
votes
4 answers

Javascript expando objects

What are expando objects in javascripts? For what purpose we need this ? Any complete example will be appreciated I found 1 article here Javascript: The red-headed stepchild of web development
xyz
  • 513
  • 1
  • 5
  • 6
22
votes
3 answers

What is the Dart "Expando" feature about, what does it do?

Have been seeing the term "Expando" used recently with Dart. Sounds interesting. The API did not provide much of a clue to me. An example or two could be most helpful! (Not sure if this is related, but I am most anxious for a way to add methods…
george koller
  • 2,363
  • 3
  • 17
  • 26
19
votes
6 answers

Best way to add metadata to HTML elements

I'm trying to put together a way of marking up various components in HTML that get parsed by a jQuery script and created when the page loads. For example, at the moment I can put the following in to my page..
jonhobbs
  • 21,469
  • 23
  • 94
  • 144
17
votes
4 answers

Using jQuery's datastore vs. expando properties

I'm developing code using jQuery and need to store data associated with certain DOM elements. There are a bunch of other questions about how to store arbitrary data with an html element, but I'm more interested in why I would pick one option over…
AwesomeTown
  • 2,668
  • 2
  • 21
  • 36
9
votes
1 answer

How to databind a gridview to an ExpandoObject

When I try to databind an ASP.NET GridView to an IEnumerable using an ObjectDataSource, I get the following exception. System.Web.HttpException (0x80004005): DataBinding: 'System.Dynamic.ExpandoObject' does not contain a property…
EtienneT
  • 4,561
  • 5
  • 32
  • 35
8
votes
2 answers

how to convert Dictionary to Dictionary using Colllection.ToDictionary()

I am using Dapper to fetch a 2 column resultset into a dictionary. I noticed that intellisense shows me a .ToDictionary() when I hover over the resultset but I cannot get it to work since dapper uses dynamic…
Gullu
  • 3,109
  • 7
  • 37
  • 62
7
votes
3 answers

Why .data() function of jQuery is better to prevent memory leaks?

Regarding to jQuery utility function jQuery.data() the online documentation says: "The jQuery.data() method allows us to attach data of any type to DOM elements in a way that is safe from circular references and therefore from memory leaks.…
pencilCake
  • 45,443
  • 73
  • 211
  • 346
6
votes
2 answers

Why Doesn't JQuery Expose its UUID Functionality?

Underneath the hood JQuery uses a map of "UUIDs" (just a counter it maintains as jQuery.uuid) to work around the well-known memory leak issues browsers have when you attach a property to a tag in the DOM from Javascript. In lieu of doing so, JQuery…
Chris Moschini
  • 33,398
  • 18
  • 147
  • 176
6
votes
5 answers

App Engine Entity to Dictionary

What is a good way to copy a google app engine entity (in python) to a dictionary object? I'm using db.Expando objects. All properties are expando properties. Thanks!
Chris Dutrow
  • 42,732
  • 59
  • 174
  • 243
6
votes
1 answer

Implementing efficient audit trail of record changes in Google App Engine - design patterns

I have a quite common design problem: I need to implement a history log (audit trail) for records in Google App Engine. The history log has to be structured, i.e I cannot join all changes into some free-form text and store in string field. I've…
Alek Kowalczyk
  • 584
  • 4
  • 15
6
votes
1 answer

When Expando Class should be used in Google App Engine Apps?

What are the applications for Google App Engine Expando Class? And what are the good practices related to it?
fjsj
  • 10,501
  • 9
  • 36
  • 54
6
votes
1 answer

Reflect on an ExpandoObject

I have written a nifty function that will accept a system.object, reflect on its properties and serialize the object into a JSON string. It looks like this: public class JSONSerializer { public string Serialize(object obj) Now, I want to be…
Water Cooler v2
  • 29,006
  • 41
  • 139
  • 286
6
votes
1 answer

Adding curried closure as static property with expando metaclass loses default parameter value

I encountered this in both Groovy 1.8.6 and 2.0.0. So these scenarios all work as expected: def ay = { one, two=[:] -> [one, two] } def be = { one, two, three=[:] -> [one,two,three] } def ayprime = ay.curry('PRIME') def beprime =…
David Pisoni
  • 2,763
  • 2
  • 20
  • 26
6
votes
3 answers

Getting a custom user field value (expando) in Liferay

I added a custom user field in Liferay, and set a value on a specific user. How can I access this value programmatically? If I try this, I always get null: String customAttr =…
Daniel Kreiseder
  • 11,397
  • 8
  • 35
  • 57
5
votes
4 answers

In your architecture, how do you decouple a url from the database layer & business objects layers

BACKGROUND We've got some links on our site that have formats that look like: http://oursite.com/books/c_sharp_in_depth_12345. To handle this, we use a simple property called Url: public class Book { public string Url { get; set;} } Basically,…
John
  • 3,133
  • 5
  • 29
  • 50
1
2 3 4 5 6