问题描述:
页面文件:
<h:outputText value="类型:" id="assessType_inputtext"></h:outputText>
<h:selectOneListbox size="1" id="assessTypeId"
value="#{agcExceptionDataBackBean.assessTypeId}">
<f:selectItems value="#{agcExceptionData ...
报错的代码:
java.lang.NullPointerException
at com.sun.facelets.util.FastWriter.write(FastWriter.java:77)
at com.sun.facelets.StateWriter.write(StateWriter.java:116)
at com.sun.faces.renderkit.html_basic.HtmlResponseWriter.write(HtmlRespo
nseWriter.java:524)
at com.su ...
1。org.richfaces.component.UIDatascroller.getPageIndex() deprecated掉了。
它的函数被写成
public int getPageIndex() {
return getPageIndex();
}
因此若在程序中用到这个方法的话,会一直递归循环,只要堆栈溢出
2。版本升级过程中很可能出现Javascript错误,
&n ...
<rich:modalPanel>不能放在form中
如<h:form>,<a4j:form>
否则在<rich:modalPanel>中进行操作,不会把数据提交到后台去。
而<rich:modalPanel>内必须放form,否则会报一个javascript错误:
this._form has no properties
http://localhost:88/pro/a4j_3_1_2.GAorg.ajax4jsf.javascript.AjaxScript.jsf
Line 1691
  ...
在richfaces_reference.pdf P298
原来的例子:
<rich:modalPanel id="panel">
<f:facet name="header">
<h:outputText value="header">
</f:facet>
...
<!--Any Content inside-->
...
<a href="javascript:RichFaces.hideModalPanel('form:panel') ...
问题提出:
平台:Richfaces,Jsf,Spring,Ejb3.0
页面文件:
<h:selectOneListbox size="1"
value="#{coalDailyBackBean.currentEntity.coalDaily.coalTS}" converter="com.mycompany.CoalTransportStyleConverter">
<f:selectItems value="#{coalDailyBackBean.allTSs}" ...
在输出日期时,在Java里java.util.Date类型的对象都有带时间TimeZone
我们用
<h:outputText value="#{data.t_Date}">
<f:convertDateTime pattern="yyyy年MM月dd日" locale="cn" />
</h:outputText>
输出的时间与原来的时间差8个小时,原因是没加上时间的属性,改成:
<h:outputText value="#{d ...
1- use f:verbatim jsf tag
2- use h:outputText jsf tag with "escape" property set to "false"
目
前应用很广泛而且也很成熟的Struts应用开发框架,在未来几年里将会逐渐淡出,其基于Action(action-based)的开发模型也将被活跃
的java社区所推崇的新的开发模型所替代,对于java开源社区来说,追求完美是很多人的理想。在2000年初诞生的Struts以及其他类似的
MVC(Model View
Controler)框架主要都是以操作为中心,且都是无状态的开发模型,而现在,基于组件(component-based)和事件驱动(event-
driven)的开发模型逐渐流行起来,在很多时候都成了Struts的有利竞争者,这其中来自jcp的jsr127- ...
转自:http://livedemo.exadel.com/richfaces-demo/richfaces/actionparam.jsf?c=actionparam <a4j:commandButton value="Set Name to Alex" reRender="rep" >
<a4j:actionparam name="username" value="Alex" assignTo="#{userBean.name}"/>
& ...
JSF本地化的基本配置。首先要在faces-config.xml中配置本地化信息:<?xml version='1.0' encoding='UTF-8'?>
<faces-config version="1.2" xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/ ...
把HtmlMessage写在后台的BackBean如下所示: HtmlAjaxOutputPanel outputPanel = (HtmlAjaxOutputPanel) context
.getApplication().createComponent(
HtmlAjaxOutputPanel.COMPONENT_TYPE);
outputPanel.setId(extType.getPropertyName()+"_outputPanelId");
outputPanel.setStyleClass("p ...
下面是一个email验证器的示例:
EmailValidator.java:
import javax.faces.application.FacesMessage;
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
import javax.faces ...
当一个http 请求来临的时候,首先会调用FacesServlet的service来处理。现假设这个请求是第一次请求:1。执行该生命周期整个阶段的execute方法。//处理除了渲染视图外的所有事情(执行生命周期前五个阶段的事情)。 第一次请求,这里基本不做什么事情。 若是第二次请求。则execute则可能完整的走完其生命周期的六个阶段 这六个生命周期分别由六个Phase来实现 1)RestoreViewPhase ...
在jsf中,页面组件如果是由页面标签与后台的程序一起生成的话,那么很可能造成Id冲突,特别是在刷新时.可以将程序中生成组件的地方改成如下:把HtmlOutputText head = new HtmlOutputText(); 改成:HtmlOutputText head = (HtmlOutputText) context.getApplication().
createComponent(HtmlOutputText.COMPONENT_TYPE);
如果在页面中使用了<a4j:commandButton>来提交表单,并且使用<h:message for="componentid">来显示一些组件的报错信息,比如:
<h:inputSecret id="password" value="#{userBean.user.password}" size="11" required="true"> <f:validateLength minimum=" ...
转自:http://www.blogjava.net/ljl2004/archive/2006/06/01/49431.html在同一个页面实现功能,可以用ActionListener或用Action过程指向自身。在不同的页面之间导航,可以用Action或Action过程,用ActionListener来处理传递的参数,加载数据。
一般的流程是:向一个页面传递参数,并依参数对这个页面的数据进行初始化,加载数据,然后再在视图jsp中显示数据。当然,简单的页面不需要接受参数,甚至不用加载数据。
由一个页面向另一个页面传递 ...
用到<a4j:log>这个标签示例如下:<a4j:log level="ALL" popup="true" width="400" height="200"
hotkey="M" />hotkey表示快捷键为Mpopup=true表示弹出窗口level=all表示显示所有信息 属性名描述binding通过值绑定与后台的Bean对应 height弹出窗口的高度 hotkey热键(与Ctral+Shift)配合打开调试窗口 id每个组件拥有的唯一id ...
转自:http://www.cnblogs.com/phoenixup/articles/575124.html
.web.xml配置
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
<web-ap ...
facelets.DEVELOPMENT 不是必需的,但是它允许您使用 Facelets 的错误处理工具
javax.faces.FacesException: java.lang.LinkageError: loader constraints violated when linking javax/el/ExpressionFactory class
org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:425)
org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderVi ...
问题描述: 要写一个继承<rich:dataTable>的组件。 环境:tomcat 6.0.14myfaces1.1.5richfaces 3.1.2相应的配置文件如下:<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&q ...
<jsp-config> 包括<taglib> 和<jsp-property-group> 两个子元素。其中<taglib>元素在JSP 1.2时就已经存在;而<jsp-property-group>是JSP 2.0 新增的元素。<jsp-property-group>元素主要有八个子元素,它们分别为: 1.<description>:设定的说明 & ...
摘抄自javaeetutorial5:You can apply the following steps while developing your own custom component.
Create a custom component class that does the following:
Overrides the getFamily method to return the component family, which is used to look up renderers that can render the component.Includes the ren ...
转自:http://www.w3cn.org/webstandard/xhtml/2004/65.html
因为RichFaces里用到了xhtml的知识,了解一些xhtml的知识。
本文是2002年为硅谷动力网站翻译的稿件。当时xhtml1.0刚刚开始被设计师所接触,所以有下面这个基础问答。
HTML语言是我们建立网页的工具,从它出现发展到现在,规范不断完善,功能越来越强。但是依然有缺陷和不足,人们仍在不断的改进它,使它更加便于控制和有弹性,以适应网络上日新月异的应用需求。2000年底,国际W3C(World Wide Web Consortium)组织公布发行了XHTML 1.0版本 ...
- 浏览: 17976 次
- 性别:

- 来自: 上海

- 详细资料
搜索本博客
我的相册
ie7
共 2 张
共 2 张
最近加入圈子
链接
最新评论
-
Ajax4jsf 和 <h:message> ...
给<h:message> 加个ID标识 <a4j:commandBu ...
-- by zuzuzuu -
response.sendRedirect(lo ...
说的很详细,谢了啊
-- by ungshow -
Ajax4jsf 和 <h:message> ...
能把你的页面的代码贴上来看一下吗?包括<h:message>
-- by chxkyy -
Ajax4jsf 和 <h:message> ...
<a4j:commandButton value="Add" style ...
-- by rainingrose -
Firefox 3没办法用QZone?
stevenwang 写道ff3对中文支持的不好。访问个别网站乱码。查看->字符 ...
-- by qubic






评论排行榜