*/
public class JqueryMenuXP extends DOBaseMenu {
public String getHtmlCode(DOIModel aModel) {
DOMenuModel rootMenu = (DOMenuModel) aModel;
StringBuffer buffer = new StringBuffer();
for (Iterator it = rootMenu.retrieveChildren().iterator(); it.hasNext();) {
DOMenuModel aMenu = (DOMenuModel) it.next();
buffer.append("<DIV class=mTitle id=").append(aMenu.getObjUid())
.append(" name=").append(aMenu.getL10n()).append("><a>");
buffer.append(aMenu.getL10n()).append("</a></div>");
buffer.append("<div class=mHi>");
if (aMenu.retrieveChildren() != null) {
for (Iterator itChild = aMenu.retrieveChildren().iterator(); itChild
.hasNext();) {
DOMenuModel aChildMenu = (DOMenuModel) itChild.next();
buffer.append("<div class=mMenu id=\""
+ aChildMenu.getObjUid() + "\" name =\""
+ aChildMenu.getL10n() + "\"");
// �Զ�������paneid
if (aChildMenu.getMenuType() != null
&& aChildMenu.getMenuType().intValue() == DOMenuModel.MENUTYPE_LINK) {
buffer.append(" paneid=\"")
.append(aChildMenu.getNote()).append("\"");
} else
if (aChildMenu.getLinkPane() != null) {
BOInstance bi = DOGlobals.getInstance()
.getRuleContext().getInstance();
buffer.append(" paneid=\"").append(
aChildMenu.getLinkPane().getFullCorrHref(bi,
null)).append("\"");
}
if(aChildMenu.getDoClickJs()!=null){
buffer.append(" clickjs=\"")
.append(aChildMenu.getDoClickJs())
.append("\" ");
}
buffer.append(">").append("<A>").append(
aChildMenu.getL10n()).append("</A></div>");
}
}
buffer.append("</div>");
}