private static String getImg(Element ele)
{
// TODO 添加onclick
String imgCode = "";
// TODO 目前元素间只有元素节点,故使用ele.hasContent();
boolean isFold = ele.hasContent();
if (isFold)
{
String topoicID = ele.attributeValue(Constants.FACTURE_NAVI_TOPIC_ATTRIBUTE_TOPICID);
String altStr = "展开";
String srcSign = Constants.FACTURE_NAVI_PATH_IMG_PLUS;
String srcBook = Constants.FACTURE_NAVI_PATH_IMG_BOOK_FOLD;
imgCode = "<img alt=\"";
imgCode += altStr;
imgCode += "\" src=\"";
imgCode += srcSign;
imgCode += "\" οnclick=\"showHideFacture('";
imgCode += topoicID;
imgCode += "');\"></img>";
imgCode += "<img alt=\"";
imgCode += altStr;
imgCode += "\" src=\"";
imgCode += srcBook;
imgCode += "\" οnclick=\"showHideFacture('";
imgCode += topoicID;
imgCode += "\');\"></img>";
}
else
{
// TODO 动态判断alt
imgCode = "<img alt=\"[html]\" src=\"";
imgCode += Constants.FACTURE_NAVI_PATH_IMG_HTML;
imgCode += "\"></img>";
}
return imgCode;
}
/**
* <根据导航文件中的元素生成导航展示时需要的a代码>
* <功能详细描述>
* @param ele
* @return [参数说明]
*
* @return String [返回类型说明]
* @exception throws [违例类型] [违例说明]
* @see [类、类#方法、类#成员]
*/
private static String getA(Element ele)
{
String txt = ele.attributeValue(Constants.FACTURE_NAVI_TOPIC_ATTRIBUTE_NAME);
String topicID = ele.attributeValue(Constants.FACTURE_NAVI_TOPIC_ATTRIBUTE_TOPICID);
String url = ele.attributeValue(Constants.FACTURE_NAVI_TOPIC_ATTRIBUTE_URL);
String code = null;
if (txt != null && !"".equals(txt))
{
code = "<a class=\"li-a-b\" target=\"cFrame_110\" style=\"cursor:pointer;\" οnclick=\"showHtmlContent(\\'"
+ url + "\\',"+"\\'"+topicID+"\\'"+")\">";
code += txt;
code += "</a>";
}
return code;
}
{
// TODO 添加onclick
String imgCode = "";
// TODO 目前元素间只有元素节点,故使用ele.hasContent();
boolean isFold = ele.hasContent();
if (isFold)
{
String topoicID = ele.attributeValue(Constants.FACTURE_NAVI_TOPIC_ATTRIBUTE_TOPICID);
String altStr = "展开";
String srcSign = Constants.FACTURE_NAVI_PATH_IMG_PLUS;
String srcBook = Constants.FACTURE_NAVI_PATH_IMG_BOOK_FOLD;
imgCode = "<img alt=\"";
imgCode += altStr;
imgCode += "\" src=\"";
imgCode += srcSign;
imgCode += "\" οnclick=\"showHideFacture('";
imgCode += topoicID;
imgCode += "');\"></img>";
imgCode += "<img alt=\"";
imgCode += altStr;
imgCode += "\" src=\"";
imgCode += srcBook;
imgCode += "\" οnclick=\"showHideFacture('";
imgCode += topoicID;
imgCode += "\');\"></img>";
}
else
{
// TODO 动态判断alt
imgCode = "<img alt=\"[html]\" src=\"";
imgCode += Constants.FACTURE_NAVI_PATH_IMG_HTML;
imgCode += "\"></img>";
}
return imgCode;
}
/**
* <根据导航文件中的元素生成导航展示时需要的a代码>
* <功能详细描述>
* @param ele
* @return [参数说明]
*
* @return String [返回类型说明]
* @exception throws [违例类型] [违例说明]
* @see [类、类#方法、类#成员]
*/
private static String getA(Element ele)
{
String txt = ele.attributeValue(Constants.FACTURE_NAVI_TOPIC_ATTRIBUTE_NAME);
String topicID = ele.attributeValue(Constants.FACTURE_NAVI_TOPIC_ATTRIBUTE_TOPICID);
String url = ele.attributeValue(Constants.FACTURE_NAVI_TOPIC_ATTRIBUTE_URL);
String code = null;
if (txt != null && !"".equals(txt))
{
code = "<a class=\"li-a-b\" target=\"cFrame_110\" style=\"cursor:pointer;\" οnclick=\"showHtmlContent(\\'"
+ url + "\\',"+"\\'"+topicID+"\\'"+")\">";
code += txt;
code += "</a>";
}
return code;
}