This site has been archived and you can no longer log in or post new messages. For up-to-date community resources please visit ezplatform.com

eZ Community » Forums » Developer » ezajaxrelations_jquery.js AND object...
expandshrink

ezajaxrelations_jquery.js AND object attributes

ezajaxrelations_jquery.js AND object attributes

Monday 29 November 2010 3:41:47 pm

Good morning my friends.

I am looking the method to fetch some attributes from objects returned in a search with ezajaxrelations_jquery.js, inside object relation attribute in editing mode.

Searching text in edition mode, for a object relation attribute, returns matching object as links, i need to check some attributes of the returned object in order to activate or not the onclick method in ezajaxrelations_jquery.js:

for ( var i = 0, l = arr.length; i < l; i++ )
                {
                        html += '<a onclick="return ezajaxrelationsSearchAddObject( 
                                        this, \'' + boxID + '\', ' + arr[i].id + 
                                        ',\'' + arr[i].name + '\',\'' + 
                                         arr[i].class_name + '\',\'' + 
                                         arr[i].section.name + '\',\'' + 
                                         pub.val() + '\'  );">' + 
                                         arr[i].name + '<\/a><br \/>';
 
                }
                $( boxID + ' div.ezobject-relation-search-browse'  ).html( html ).show();

In the above code, if i want to show the name of the returned object i must use arr[i].name, this is equivalent to $node.name or $object.name, so , i want to be able to retrieve any object's attribute like $node.data_map.myattribute.content or $node.data_map.myattribute.data_text, etc. How can i do it?

No reply yet!

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from