Uncategorized

return xml from ajax and parse by javascript

function getVersionInfo(contentID,version) { $(‘input[name=published]’).removeAttr(‘checked’); //reset publish //alert(version); $.ajax({ url: “http://localhost:8060/CSAB/Content/selectedversioninfo/”+version+”/”+contentID+”&#8221;, dataType:”xml”, success: function(xml){ //alert(xml); var phisicalName=find(xml, “phisical-name”); var selectedVersion=find(xml, “selected-version”); var publishedVer=find(xml, “published-ver”); var contents=find(xml, “contents”); $(“#phisicalNameid”).val(phisicalName); $(“#contentsid”).val(contents); } }); } function find(xml, name) { var nodes = xml.documentElement.childNodes; for (i = 0; i < nodes.length; i++) { var node = nodes[i]; if (node.nodeName.toLowerCase() ==… Continue reading return xml from ajax and parse by javascript

java

Mapping One-To-Many Associations with Hibernate and JPA Annotations

Of all the mappings you’re going to see in a Java application, a one to many mapping has to be the most common. Just think about it, an Order has many LineItems; a Bank has many BankAccounts; a Record has many Songs; an Exam has many Questions. The one to many association really has to… Continue reading Mapping One-To-Many Associations with Hibernate and JPA Annotations

joomla

custom user groups in joomla

Access to your database (with PHPmyAdmin, in my case). Find user groups table (its name is « jos_core_acl_aro_groups »). Default prefix for tables is « jos », but check what is your prefixe and replace « jos » by your table prefix if it’s different. In all examples, I’ll use « jos » as prefix, but don’t forget to… Continue reading custom user groups in joomla