Hi,
Is it possible to use the resource bundle outside the EAR file. Dojo toolkit is part of EAR file but I want to use the resource bundle outside the EAR.
If yes , could you please give the code snippet.
Thanks
Savita
Localization variables (nls folder) got cached because of that we couldn't able to retrieve new variable and deleted variable is still coming :( :(. We want to delete the cache so that we can get all the latest variable value.
I have xml data returned from a web service in the following format:
<ProductInformation>
<Product>
<ProductID>bundleA</ProductID>
<ProductName>Triple Bundle</ProductName>
<ProductType>BUNDLE</ProductType>
<Description>Telco Triple </Description>
</Product>
<Characteristics>
<Characteristic>
<Name>PRODUCT_NAME</Name>
<Description/>
<Values>
<Value>
<ValueName>PRODUCT_NAME</ValueName>
<ValueType>Feature</ValueType>
<Value>Telco Triple Bundle</Value>
</Value>
<Value>
<ValueName>RULE</ValueName>
<ValueType>SIMPLE_RULE</ValueType>
<Value>Telco Triple Bundle</Value>
</Value>
</Values>
</Characteristic>
<Characteristic>....</Characteristic>
<Characteristic>....</Characteristic>
<Characteristic>....</Characteristic>
...
</Characteristics>
I'm using the following code within a php file to produce the store and the model to populate the tree, but I do not get the whole xml doc. I see the root node and one level down with 'undefined' as the label? Please let me know where the error might be?
thanks, sdf
function getProductInformation(productid)
{ var xhrArgs = {
url: "services/Client_ProductService_GetProductInformation.php?Product=" + productid,
handleAs: "xml",
preventCache: false,
load: function(data){
hookXmlStore();
var xmlString = dojox.xml.parser.innerXML(data);
var myxml='<' + '?xml version="1.0" encoding="UTF-8"?' + '>' + xmlString;
var store = new my.data.XmlStringStore({
xmlstring: myxml,
});
var model = new dijit.tree.ForestStoreModel({
store: store,
rootId: "ProductInformation",
rootLabel: "ProductInformation",
childrenAttrs: ["Product", "Characteristics"]
});
console.log(" putting in tree");
var tree = new dijit.Tree({
model: model
}, "prodInfoTree"); } };
function hookXmlStore() {
dojo.declare("my.data.XmlStringStore", [dojox.data.XmlStore], {
constructor: function(args){
this.inherited("constructor", arguments);
this.xmlstring = args.xmlstring;
this.url = "dummy.xml";
this.rootItem = "ProductInformation";
_fetchItems: function(request, fetchHandler, errorHandler){
var url = this._getFetchUrl(request);
if(!url){
errorHandler(new Error("No URL specified."));
return;
}
var localRequest = (!this.sendQuery ? request : {});
var data = dojox.xml.parser.parse(this.xmlstring);
var items = this._getItems(data, localRequest);
if(items && items.length > 0){
fetchHandler(items, request);
}else{
fetchHandler([], request);
}
}
});
};
implementaion of Save on javascriptnaweli May 24, 2011 at 10:55 AM
I have one UI mock up.I ahve to implement it in Javascript with dojo.can any one help me in doing so...
dojonarendar October 24, 2011 at 9:57 AM
good
regarding externalization of resource bundlesavita January 19, 2013 at 6:33 PM
Hi, Is it possible to use the resource bundle outside the EAR file. Dojo toolkit is part of EAR file but I want to use the resource bundle outside the EAR. If yes , could you please give the code snippet. Thanks Savita
Localization cacheRajiv Singh July 9, 2012 at 8:13 PM
Localization variables (nls folder) got cached because of that we couldn't able to retrieve new variable and deleted variable is still coming :( :(. We want to delete the cache so that we can get all the latest variable value.
dojorakeshsharma September 6, 2012 at 2:28 PM
i need questions and answers
How to display xml nodes in dijit.trees df September 13, 2012 at 3:18 PM
I have xml data returned from a web service in the following format: <ProductInformation> <Product> <ProductID>bundleA</ProductID> <ProductName>Triple Bundle</ProductName> <ProductType>BUNDLE</ProductType> <Description>Telco Triple </Description> </Product> <Characteristics> <Characteristic> <Name>PRODUCT_NAME</Name> <Description/> <Values> <Value> <ValueName>PRODUCT_NAME</ValueName> <ValueType>Feature</ValueType> <Value>Telco Triple Bundle</Value> </Value> <Value> <ValueName>RULE</ValueName> <ValueType>SIMPLE_RULE</ValueType> <Value>Telco Triple Bundle</Value> </Value> </Values> </Characteristic> <Characteristic>....</Characteristic> <Characteristic>....</Characteristic> <Characteristic>....</Characteristic> ... </Characteristics> I'm using the following code within a php file to produce the store and the model to populate the tree, but I do not get the whole xml doc. I see the root node and one level down with 'undefined' as the label? Please let me know where the error might be? thanks, sdf function getProductInformation(productid) { var xhrArgs = { url: "services/Client_ProductService_GetProductInformation.php?Product=" + productid, handleAs: "xml", preventCache: false, load: function(data){ hookXmlStore(); var xmlString = dojox.xml.parser.innerXML(data); var myxml='<' + '?xml version="1.0" encoding="UTF-8"?' + '>' + xmlString; var store = new my.data.XmlStringStore({ xmlstring: myxml, }); var model = new dijit.tree.ForestStoreModel({ store: store, rootId: "ProductInformation", rootLabel: "ProductInformation", childrenAttrs: ["Product", "Characteristics"] }); console.log(" putting in tree"); var tree = new dijit.Tree({ model: model }, "prodInfoTree"); } }; function hookXmlStore() { dojo.declare("my.data.XmlStringStore", [dojox.data.XmlStore], { constructor: function(args){ this.inherited("constructor", arguments); this.xmlstring = args.xmlstring; this.url = "dummy.xml"; this.rootItem = "ProductInformation"; _fetchItems: function(request, fetchHandler, errorHandler){ var url = this._getFetchUrl(request); if(!url){ errorHandler(new Error("No URL specified.")); return; } var localRequest = (!this.sendQuery ? request : {}); var data = dojox.xml.parser.parse(this.xmlstring); var items = this._getItems(data, localRequest); if(items && items.length > 0){ fetchHandler(items, request); }else{ fetchHandler([], request); } } }); };
Post your Comment