我自定义了一个组件UICustomTable 我想在UICustomTable中使用<h:commandLink />这个组件。 请高手赐教。以下只是其中的代码片段:public void encodeBegin(FacesContext context) throws IOException
{
ResponseWriter writer=FacesContext.getResponseWriter();
writer.write("<f:commandLink id='link' value=\""+vRow.elementAt(k).toString()+"\" onclick=\"return selectThis(this.parentNode.parentNode);\" />");
}
{
ResponseWriter writer=FacesContext.getResponseWriter();
writer.write("<f:commandLink id='link' value=\""+vRow.elementAt(k).toString()+"\" onclick=\"return selectThis(this.parentNode.parentNode);\" />");
}
解决方案 »
- struts里面的action的name属性可以有多个值吗。当用一个action处理多个业务的时候。
- jxl 以数据的格式 写入excel
- struts 从jsp页面跳转到acton
- 崩溃!JSP问题,高手帮忙看下!!!!!!!!!!!!
- 谁动了我的Session
- 有关取得IP地址得问题!!!(求救...在线急等...解决立即结贴!谢谢........)
- 请问application与servlet怎么传递参数
- JAVA中使用JCOM打印Excel报表
- 关于JQuery的change事件重复触发问题
- Servlet里怎么样调用bean中数据库链接?
- 能否在JavaBean中而不是Servlet中直接使用Session,马上给分,谢谢!
- 怎样可靠的取得当前标准时间
然后赋予onclick属性
writer.write是无用的
因为那根本无法渲染组件
<custom:customtable>
......
<f:commandLink id='link' value="" onclick="return selectThis(this.parentNode.parentNode);" />
......
</custom:customtable>
直接用不就可以了吗?你要是真想写在里面,那就去找到<f:commandLink>的源代码,按照它写的自己从新写一遍.