标签: richfaces

使用richfaces链接到外部URL

我目前正在显示这样的票号.

<h:outputText value="#{ticket.ticketNumber}" />
Run Code Online (Sandbox Code Playgroud)

而不是这个,我想要一个URL的超链接.

地址将类似于:http://testserver.com/viewer.jsp?ticket =# {ticket.ticketNumber}

因此,新代码可能看起来像这样(注意下面的代码不起作用,只是一个概念).

<a4j:commandLink action="http://testserver.com/viewer.jsp?ticket=#{ticket.ticketNumber}"
                 value="#{ticket.ticketNumber}" />
Run Code Online (Sandbox Code Playgroud)

java jsf richfaces

2
推荐指数
1
解决办法
6260
查看次数

如何避免重复评估EL

我正在开发一个带有seam/richfaces的web界面.

很多组件都有类似的东西

<h:panelGrid rendered="#{complexbean.heavyoperation()}">
    ...
</h:panelGrid>
<h:panelGrid rendered="#{!complexbean.heavyoperation()}">
    ...
</h:panelGrid>
Run Code Online (Sandbox Code Playgroud)

在这种情况下,#{!complexbean.heavyoperation()}会被评估两次.

我的问题是,是否有类似if-else语句可以在页面中使用以避免对同一个EL进行多次评估(我希望避免使用JSP的东西,即%<%if ...% >%)?

谢谢!

java seam richfaces

2
推荐指数
1
解决办法
155
查看次数

当原型在外面使用$时,如何在domready中使用$ for jQuery?

我无法从JSF框架中删除原型(RichFaces 3.3.3).如果我尝试noConflict并试图接管$它会破坏我的应用程序框架,因为它与原型紧密结合.

那么有没有办法可以做到这一点:

jQuery(function() {
    /*
        some code that within this domready function 
        allows me to use $() within this function
        and not interfere with $ being used for prototype
        outside?
    */
});
Run Code Online (Sandbox Code Playgroud)

javascript jquery richfaces

2
推荐指数
1
解决办法
517
查看次数

如何在modalpanel中添加滚动?

我有一个模态面板,其中包含动态包含的页面.该页面包含搜索表单.单击搜索按钮后,它会显示内容.

页面高度最初小于300px.搜索后页面高度超过600px.所以我无法静态设置高度.在搜索时,模板面板部分内容隐藏在浏览器中.所以我需要在页面大于浏览器时放置滚动条.

我怎样才能实现这一目标?

java ajax jsf richfaces

2
推荐指数
1
解决办法
6695
查看次数

在呈现响应后非法尝试设置ViewHandler

我在登录页面上收到以下错误.在呈现响应后非法尝试设置ViewHandler.

我正在使用Richfaces 3.3.3和facelets以及jsf和tomcat

web.xml中

<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5" 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/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
    <context-param>
        <param-name>javax.faces.PROJECT_STAGE</param-name>
        <param-value>Development</param-value>
    </context-param>
    <!-- Start - Richfaces Configuration-->
    <!-- Plugging the "Blue Sky" skin into the project -->
    <context-param>
        <param-name>org.richfaces.SKIN</param-name>
        <param-value>blueSky</param-value>
    </context-param>
    <!-- Making the RichFaces skin spread to standard HTML controls -->
    <context-param>
        <param-name>org.richfaces.CONTROL_SKINNING</param-name>
        <param-value>enable</param-value>
    </context-param>
    <context-param>
        <param-name>javax.faces.DISABLE_FACELET_JSF_VIEWHANDLER</param-name>
        <param-value>true</param-value>
    </context-param>
    <filter>
        <display-name>RichFaces Filter</display-name>
        <filter-name>richfaces</filter-name>
        <filter-class>org.ajax4jsf.Filter</filter-class>
    </filter>
    <filter-mapping>
        <filter-name>richfaces</filter-name>
        <servlet-name>Faces Servlet</servlet-name>
        <dispatcher>REQUEST</dispatcher>
        <dispatcher>FORWARD</dispatcher>
        <dispatcher>INCLUDE</dispatcher>
    </filter-mapping>
    <!-- End - Richfaces Configuration-->
    <servlet>
        <servlet-name>Faces Servlet</servlet-name>
        <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
    </servlet>
    <servlet-mapping> …
Run Code Online (Sandbox Code Playgroud)

jsf richfaces facelets

2
推荐指数
1
解决办法
7194
查看次数

JSF:将richModal面板的宽度适合内容宽度

rich:modalPanel面板组件:

<rich:modalPanel id="pnl" zindex="10000"  height="510" width="400" style="overflow: scroll"  onresize="return false;">
Run Code Online (Sandbox Code Playgroud)

此面板的内容以宽度显示不完整,因此显示滚动ID.

如何适应宽度以避免水平滚动?

尝试:

style="overflow: auto" -
style="overflow: visible"透明背景,没有正确显示

jsf richfaces modal-dialog panel width

2
推荐指数
1
解决办法
5212
查看次数

RichFaces fileupload和h:message问题

我正在使用RichFaces 4.我的问题是该消息根本没有出现.如果我使用rich:message,则消息会短暂显示然后消失.

这是控制器:

public void uploadListener(final FileUploadEvent event) throws IOException
{
    final UploadedFile item = event.getUploadedFile();

    final FacesContext context = FacesContext.getCurrentInstance();
    final Application application = context.getApplication();
    final String messageBundleName = application.getMessageBundle();
    final Locale locale = context.getViewRoot().getLocale();
    final ResourceBundle resourceBundle = ResourceBundle.getBundle(messageBundleName, locale);

    final String msg = resourceBundle.getString("upload.failed");
    final String detailMsgPattern = resourceBundle.getString("upload.failed_detail");

    try
    {
        CSVImporter.doImport(item.getInputStream(), registry, item.getName());
    }
    catch (ParseException e)
    {
        final Object[] params = {item.getName(), e.getMessage()};
        final String detailMsg = MessageFormat.format(detailMsgPattern, params);
        final FacesMessage facesMsg = new FacesMessage(FacesMessage.SEVERITY_ERROR, …
Run Code Online (Sandbox Code Playgroud)

file-upload richfaces jsf-2

2
推荐指数
1
解决办法
5730
查看次数

如何使用rich:dataTable生成包含动态列的表?

我必须使用JSF生成动态表.我有一个包含标题的arraylist和另一个包含用于保存实际数据的字符串列表的列表 - 主列表中的每个条目代表一行.是否可以使用rich:datatable生成动态表?富有:列是一个可以考虑的选项吗?

jsf richfaces dynamic-forms

2
推荐指数
1
解决办法
6175
查看次数

JSF 2.x + Spring 3.2集成?

很抱歉提出这个问题,它可能与Stack溢出中的其他类似线程重复.这种情况在我的情况下不起作用.

我有一个相当足够的知识,在春季3.2并完成了一个小项目的弹簧.

现在我是JSF的新手,我创建了一些基本的JSF示例.我想将这些JSF功能及其components用于我的新Spring + JSF项目.

我为JSF + Spring Integration出来的链接如下,

http://papweb.wordpress.com/2011/07/29/spring-mvc-3-jsf-2-with-maven-2-and-tomcat/

http://blog.terrencemiao.com/archives/spring-3-shacks-up-jsf-2-the-maverick-way

我发现的资源并没有帮助我,那是非常古老的帖子.

任何人都可以为我提供JSF 2.X + Spring 3.x MVC的示例集成,带有控制器和视图解析器,这将有助于许多真正寻求工作的用户.

希望我们的堆栈用户能帮助我.

java spring richfaces spring-mvc jsf-2

2
推荐指数
2
解决办法
8960
查看次数

JSF渲染弹出窗口是一个manegbean条件?

我发现错误时使用它来在登录时显示一条消息:

<a4j:region rendered="#{usuario.fail == 1}">
            <div class="alert alert-danger alert-dismissable"
                style="width: 470px; margin: 10px auto;">
                <button type="button" class="close" data-dismiss="alert"
                    aria-hidden="true">&times;</button>
                Invalid user or password.
            </div>
        </a4j:region>
Run Code Online (Sandbox Code Playgroud)

但是,我想显示一个弹出窗口,但是,这不起作用,我正在尝试这样的事情:

<h:outputScript rendered="#{usuario.fail == 1}">
            #{rich:component('popup')}.show();
        </h:outputScript>

        <rich:popupPanel id="popup" modal="false" autosized="true" resizeable="false">
                <f:facet name="header">
                    <h:outputText value="Simple popup panel" />
                </f:facet>
                <f:facet name="controls">
                    <h:outputLink value="#" onclick="#{rich:component('popup')}.hide(); return false;">
                        X
                    </h:outputLink>
                </f:facet>
                <p>Any content might be inside this panel.</p>

                <p>
                    The popup panel is open and closed from the javascript function of component client side object. The …
Run Code Online (Sandbox Code Playgroud)

jsf richfaces popup jsf-2

2
推荐指数
1
解决办法
743
查看次数