1:<html:optionsCollectiion>的用法
<tr bgcolor="f5f5f5">
<td width="25%"> <div align="right">品牌 :</div></td>
<td width="75%"> <html:select property="brandid">
<html:option value="">***无***</html:option>
//brands为从后台查询到的数据集合,label表示显示出来的,code表示选择后的值v,然后将v赋值给brandid
<html:optionsCollection name="brands" label="name" value="code"/>
</html:select>(<a href="<html:rewrite action='/control/brand/manage'/>?method=addUI">添加品牌</a>)</td>
</tr>
组装html语句
1:<a href="<html:rewrite action='/control/product/type/manage'/>?method=addUI">添加产品类别</a>
<html:form action="/control/product/style/list?productid=3" method="post">//有待验证
2:
组装html语句:<c:forEach items="${gps}" var="gptype">
<c:set var="menuout" value="${menuout}>><a href='/baba1.1/control/product/manage.do?method=selectUI&typeid=${gptype.typeid }'>${gptype.name }</a>"></c:set>
</c:forEach>
输出效果
<c:out value="${menuout }" escapeXml="false"></c:out>
3:设置<c:if>条件来判断是否禁用按钮
<input name="visible" type="button" class="frm_btn" id="visible" onClick="javascript:changeMet('visible')" <c:if test="${fn:length(styles)<0}">disabled="disabled"</c:if> value="上架">
<input name="disVisible" type="button" class="frm_btn" id="disVisible" onClick="javascript:changeMet('disVisible')" <c:if test="${fn:length(styles)<0}">disabled="disabled"</c:if> value="下架">
1:在jsp页面上添加如下页面,则就可以对所有为textarea的元素,如<html:textarea property="descriptions" cols="80" rows="23"></html:textarea>形成html编辑器的效果,这里的在线编辑器是要用到js函数库的
<script type="text/javascript" src="/js/jscripts/tiny_mce/tiny_mce.js"></script>
<script language="javascript" type="text/javascript">
tinyMCE.init({
language : "zh_cn",
mode : "textareas",
theme : "advanced",
//width : "500",
plugins : "table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,zoom,flash,searchreplace,print,contextmenu",
theme_advanced_buttons1_add_before : "save,separator",
theme_advanced_buttons1_add : "fontselect,fontsizeselect",
theme_advanced_buttons2_add : "separator,insertdate,inserttime,preview,zoom,separator,forecolor,backcolor",
theme_advanced_buttons2_add_before: "cut,copy,paste,separator,search,replace,separator",
theme_advanced_buttons3_add_before : "tablecontrols,separator",
theme_advanced_buttons3_add : "emotions,iespell,flash,advhr,separator,print",
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "left",
theme_advanced_path_location : "bottom",
plugin_insertdate_dateFormat : "%Y-%m-%d",
plugin_insertdate_timeFormat : "%H:%M:%S",
extended_valid_elements : "a[name|href|target|title|onclick],img[class|src|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name],hr[class|width|size|noshade],font[face|size|color|style],span[class|align|style]",
external_link_list_url : "example_data/example_link_list.js",
external_image_list_url : "example_data/example_image_list.js",
flash_external_list_url : "example_data/example_flash_list.js"
});
-------------------------------------<html:hidden property="productid"/>和<input type="hidden" name="productid"/>的区别-------------------------------------------------------------------------
<html:hidden>要求对应的哦FormBean里必须要有对应的属性,而<input type="hidden"/>则不需要!