- 博客(19)
- 收藏
- 关注
原创 js向jsf调用后台方法并传递参数
使用p:remoteCommand来达到复杂的异步刷新取值大家请注意,这个方法可以真正的解决在jsf中通过js调用后台bean方法并获取bean方法返回值的问题。同样,首先我们要写两个jsf组件,来和后台bean结合<h:inputHidden id=“input1” value="#{advancedQueryManager.vals}"></h:inputHidden><h:form><p:remoteCommand name=“processSele
2020-08-26 14:26:05
945
原创 JSF pickList
<h:form><p:growl id=“msg” showDetail=“true” escape=“false” /><h3 style="margin-top: 0">Basic PickList</h3><p:pickList id="pickList" value="#{pickListView.cities}" var="cities" itemLabel="#{cities}" itemValue="#{cities}" />
2020-08-26 14:24:29
193
原创 JSF中使用jquery
ID选择器:<h:formid=“myForm”><h:inputTextid=“myInput”/></h:form>1你要选择到这个input,要这样写:$(“myForm\:myInput”)12、引入js:<h:outputScriptlibrary="primefaces"name="jquery/jquery.js"target=“head”/>13、javascript代码:<h:outputScripttarget=“
2020-08-26 14:23:24
538
转载 JSF中CommandButton与CommandLink传值
f:param标签能够将一个参数添加到组件。需要注意的是f:param标签的不同表现依赖于它所关联的组件类型:【1】如果为 h:outputText添加f:param标签,那么JSF实现将使用参数来填充占位符,例如{0}、{1}等。【2】如果添加f:param标签到h:commandLink,JSF实现会将参数值作为请求参数传递到服务器,如:123<h :commandLink actionListener="#{userListBean.checkUser}" value=“审核通过”&
2020-08-26 14:22:12
290
原创 JSF中的h:commandLink如何传递参数 三种取值比较
声明本人刚学jsf三天 如有不足请指教…本人总结了三种取得参数的方法这是jsf中的代码<h:commandLink action="#{}"><h:outputText value=“删除”></h:outputText><f:param id=“id” name=“id” value=“123”></f:param> //假如要传递的参数为id</h:commandLink>这是BackBean中的代码 下边是如何在后
2020-08-26 14:21:23
213
原创 jsf页面向后台传递参数
向request中设值,再在该页面的ManageredBean中读取。//设request值FacesContext.getCurrentInstance().getExternalContext.getRequestMap().put(“someKey”, “someValue”);//读request值Map params = FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap();Stri
2020-08-26 14:19:51
316
原创 maven手动注入jar包至仓库
mvn install:install-file -DgroupId=com.gexin.platform -DartifactId=protobuf-java -Dversion=2.5.0 -Dpackaging=jar -Dfile=E:\资源文件\protobuf-java-2.5.0.jar
2020-08-25 10:34:04
270
原创 git生成ssh秘钥
任意空白处右击,选择Git Base Here1.输入:cd ~/.ssh2.然后输入ls查看秘钥列表如上图是已经配置过了就无需配置。如果没有看到id_ras.pub文件即没有配置,然后请看下面如何配置。同上打开Git Base Here然后输入下面命令1.输入命令:cd ~2.然后输入:ssh-keygen.exe然后按回车,再次按回车,在回车,按三次回车:收藏自网络,记录一下...
2020-08-25 10:33:21
136
原创 邮箱正则表达式
1+[A-Za-z0-9-.]+@[a-zA-Z0-9-]+(.[a-zA-Z0-9_-]+)+$java中 . 需要转义为 \.A-Za-z0-9 ↩︎
2020-08-25 10:31:15
115
转载 pdf添加文字水印
package cn.tomtocc.pdf;import java.io.FileNotFoundException;import java.io.FileOutputStream;import java.io.IOException;import com.itextpdf.text.BaseColor;import com.itextpdf.text.Document;import com.itextpdf.text.DocumentException;import com.itextpd
2020-08-25 10:30:00
265
原创 pdf页眉页脚
/**ITextTestiText生成PDF加入列表,注释等内容,同时设置页眉和页脚及页码等。/package com.labci.itext.test;import java.awt.Color;import java.io.FileNotFoundException;import java.io.FileOutputStream;import java.io.IOException;import com.lowagie.text.Annotation;import com.lowa
2020-08-25 10:29:14
275
转载 pdf文字水印,后添加
/*** 中间或者两边水印* @param bos 添加完水印的输出* @param input 原PDF文件输入* @param word 水印内容* @param model 水印添加位置1中间,2两边*/public static setWatermark(BufferedOutputStream bos, InputStream input, String word, int model)throws DocumentException, IOException {PdfRe
2020-08-25 10:28:17
1249
1
转载 poi生成word
public void write2Docx()throws Exception{XWPFDocument document= new XWPFDocument(); //Write the Document in file system FileOutputStream out = new FileOutputStream(new File("G:\\Offer\\create_table.docx")); //添加标题 XWPFParagraph titleParag
2020-08-25 10:26:53
293
转载 Java获取存储过程返回的多个结果集
第一步:写你的存储过程delimiter //create procedure test_proc ()beginselect * from test_table1 where id=1;select * from test_table2 where id=2;select * from test_table3 where id=3;end;//delimiter ;call test_proc()这样就可以返回三个结果集,每个结果集对应一个select。那么在JAVA程序里面如何来取
2020-08-25 10:24:47
902
转载 利用jxls进行excel模板生成
net.sf.jxls jxls-core 1.0.3 org.apache.commonscommons-digester33.2<jx:forEach items="${data}" var=“item” varStatus=“i”>${item.a1}</jx:forEach>@Testpublic void method1() throws Exception {// ...
2020-08-25 10:23:51
803
原创 ApplicationContext的getBean不能获取继承子类
ApplicationContext的getBean不能获取继承子类记录一下,ApplicationContext的getBean可以获取spring注解管理的类和接口,但是无法获取继承子类,另外,使用多线程时无法用@autowried 注入,只能用getBean或想其他办法。...
2020-08-21 16:57:52
1088
1
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人