xml代码:
<h:commandButton id="editbutton" action="edit" image="/images/EDIT.jpg" actionListener="# {search.edit}">
<f:attribute name="ehrid" value="#{result.ehr_id}"/>
</h:commandButton>
页面跳转通过faces-config.xml文件来实现:
<navigation-rule>
<from-view-id>/pages/personalinfoselect.xhtml</from-view-id>
<navigation-case>
<from-outcome>edit</from-outcome>
<to-view-id>/pages/personalinfoedit.xhtml</to-view-id>
</navigation-case>
</navigation-rule>
参数传递actionListener事件来实现,后台代码:
public void edit(ActionEvent event){
String ehruser = (String) event.getComponent().getAttributes().get("ehrid");
System.out.println("ehrusermap="+ehruser);
}
参数正常获得。
- 大小: 20.8 KB
分享到:
相关推荐
f:actionListener标签为h:commandLink,h:commandButton等指定自定义的事件侦听类。 f:actionListener使用: JSP: <h:commandButton id="regist" value="Regist"> <f:actionListener type="mypackage....
Java Server Faces API 组件标签 API Reference 速查手册 ... javax.faces.Command javax.faces.Button javax.faces.Link ...h:commandButton h:commandLink h:dataTable h:form h:graphicImage
<h:commandButton value="download" action="#{aBean.download}"></h:commandButton> 或者 <h:commandLink value="download" action="#{fileUploadForm.download}"></h:commandLink> 2、jsp页面可以这样调用: ; ...
听朋友说微软的CommandButton按钮控件不好用,其实很好用啊,可能你没找到方法,这个程序就是用CommandButton编写的,只拿BOTT...
发送一个AJAX 请求 决定发送什么 决定改变什么 4. Ajax4JSF 组件库 a4j:ajaxListener a4j:region a4j:page a4j:support a4j:commandLink a4j:commandButton a4j:outputPanel a4j:actionparam a4j:status ...
发送一个 AJAX 请求 决定发送什么 决定改变什么 4. Ajax4JSF 组件库 a4j:ajaxListener a4j:region a4j:page a4j:support a4j:commandLink a4j:commandButton a4j:outputPanel a4j:actionparam a4j:...
在CommandButton上显示进度条-精品源代码
第二章,第四节——CommandButton 控件
Hook程序-无焦点的CommandButton控件(6KB)
改变CommandButton字体颜色 VB源代码
一、分页具体使用方法如下(不多说,直接给你些颜色看看): 1. xhtml文件: <html xmlns:ems="http://www.ems.com.cn" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core"...
这是一个示例 Salesforce 页面,展示了如何将 Apex:InputFile 功能封装在 iframe 中,将其与父页面分开。 这样做的原因是因为在visualforce上有一个InputFile标签的限制,你可能会遇到这个错误: apex:inputFile ...
我决定重新写一个,代码很简单。大家不妨试用一下,并请不吝提出要求,以方便改进,使之成 为通用类,使后来者少走弯路。 1)Frmresize可以改变字体的相应大小; 2)Frmresize没有嵌套层数的限制,没有控件数量的...
<h:commandButton value="Submit" action="#{myBean.processMyFile}"/> <h:outputText value=" "/> </h:panelGrid> </h:form> </f:view> 其中tags.jsp文件如下: <%@ taglib uri="http://java.sun....
Html标签库:commandButton,commandLink,data Table,form,graphicImage,inputHidden...... 核心标签库:actionListener,attribute,convertDateTime,convertNumber......
无焦点的commandbutton控件,有兴趣的可以看看哦
VB按钮制作实例:文字对齐和按钮换色,使用CommandButton按钮控件制作按钮的例子,分别可以定义按钮三种状态下的样式,比如按钮默认状态、按钮按下、按钮滑过,另外还可设置按钮上面文字的对齐方式、载入外部图像、...
微软的CommandButton下课了[VsCmd.rar]-精品源代码
四、实验步骤 从运用中点击vb6.0经典版 打开标准 EXE 建立一个form 1 添加两个CommandButton,CommandButton的caption改为"参数输入半径计算结果"和"随 机数及逆序"。然后输入代码如图 运行即可 五、实验结果 六、...