after using dojo.mixin(this, p_args); have to make sure that neither of the defined as member variable is 'undefined' and note that 'undefined' can be pass into the constructor (which is different from where the parameter is not given at all) will override that '' default value.
other wise will get something like
"error: Error: *.widget.SummaryRow
template: library"
so need to do some post op to get rid of all 'undefined' values.
------------------------------------------------------------
dojo.provide("*.widget.SummaryRow");
dojo.require("dijit._Widget");
dojo.require("dijit._Templated");
dojo.declare("*.widget.SummaryRow", [ dijit._Widget,
dijit._Templated ], {
// Path to the template
templateString : dojo.cache("*.widget",
"templates/SummaryRow.html"),
widgetsInTemplate : false,
checkboxtitle : null,
image : '',
title : '',
author : '',
workflowstatus : '',
description : '',
contextpath : '',
library : '',
links : '',
constructor : function(p_args) {
dojo.mixin(this, p_args);
},
postMixInProperties : function() {
alert("in postMixInProperties");
this.library = this.getLibraryUuid(this.links);
},
getLibraryUuid : function(p_links) {
alert("in getLibraryUuid(): p_links: " + p_links);
return "WebContent";
},
postCreate : function() {
this.inherited(arguments);
}
});
Thursday, July 28, 2011
Monday, July 25, 2011
Handle Parameters Override for RESTful service
1. Allow the user of the RESTful Service to be able to specify parameter that overrides attributes in the header is good practice since it is not always convenient for the user writing the client application to specify the attributes in the request header
2. For example, dojox.rpc.REST(<url>, <isJson>), a nice functionality, but you can't really explicitly specify what the 'Content-type' is except for whether it is application/json or not. But if the corresponding RESTful service handles parameter override, then the user can conveniently just put that into the <url>.
3. Arguably this deviate from the how REST should be different RPC, but practically, who cares?
2. For example, dojox.rpc.REST(<url>, <isJson>), a nice functionality, but you can't really explicitly specify what the 'Content-type' is except for whether it is application/json or not. But if the corresponding RESTful service handles parameter override, then the user can conveniently just put that into the <url>.
3. Arguably this deviate from the how REST should be different RPC, but practically, who cares?
opacity, z-index,
in Style
opacity: transparency, 0 is lowest, 1 is highest - in FF; IE is 0-100
z-index: layering, the higher the more on top the layer.
opacity: transparency, 0 is lowest, 1 is highest - in FF; IE is 0-100
z-index: layering, the higher the more on top the layer.
Sunday, July 17, 2011
To pass string value as argument to a javascript function in HTML
To pass string value as argument to a javascript function in HTML
<li role="menuitem" id="createListItem">
<a tabindex="-1" href='javascript:onLeftMenuSelect("createListItem")'
id='createListItemLink'>Creates</a>
</li>
<li role="menuitem" id="createListItem">
<a tabindex="-1" href='javascript:onLeftMenuSelect("createListItem")'
id='createListItemLink'>Creates</a>
</li>
Thursday, July 14, 2011
Automated Testing: deletion before creation v.s. finally block (teardown, etc)
Deletion (if exist) before creation is the in general more recommended:
1. Assuming that the Deletion logic is valid, the test cases should be guaranteed to rerun properly, even in case such as the Test run thread is forced to stop (JUnit stop button in Eclipse, anyone has not ever pressed?)
2. In some case, it is good to leave the data created/updated in the data store to assist test failure investigation.
1. Assuming that the Deletion logic is valid, the test cases should be guaranteed to rerun properly, even in case such as the Test run thread is forced to stop (JUnit stop button in Eclipse, anyone has not ever pressed?)
2. In some case, it is good to leave the data created/updated in the data store to assist test failure investigation.
Wednesday, July 13, 2011
using EARExpander
http://publib.boulder.ibm.com/infocenter/wasinfo/v6r0/index.jsp?topic=/com.ibm.websphere.express.doc/info/exp/ae/rxml_earexpander.html
e.g.
/opt/WebSphere/AppServer/bin/EARExpander.sh -ear /opt/sampleUI.ear -operationDir /opt/WebSphere/wp_profile/installedApps/eli80/PA_wcm.portlet.design.ear/ -operation collapse
e.g.
/opt/WebSphere/AppServer/bin/EARExpander.sh -ear /opt/sampleUI.ear -operationDir /opt/WebSphere/wp_profile/installedApps/eli80/PA_wcm.portlet.design.ear/ -operation collapse
Subscribe to:
Posts (Atom)