HockChai Lim
HockChai Lim

Reputation: 1713

Issue migrating from Richfaces 3.1.6 to 4.3.4

I'm in the process of migrating from jsf 1.1 (with richfaces 3.1.6) to 2.0 (with richfaces 4.3.4). I'm encountering some issues with richfaces 4.3.4 and couldn't quite be able to figure out. I've writen the following test.xhtml to better describe the issues that I'm having:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html 
    xmlns="http://www.w3.org/1999/xhtml"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:t="http://myfaces.apache.org/tomahawk"
    xmlns:a4j="http://richfaces.org/a4j"
    xmlns:ui="http://java.sun.com/jsf/facelets">
    <h:head>
    <title>My Account - View Device(s)</title>
    <script type="text/javascript" src="redesign/scripts/jquery.js?v=1.7.2"></script>
    <script type="text/javascript" src="redesign/scripts/jquery.filter_input.js"></script>

    <script type="text/javascript">
        //<![CDATA[
        $(document).ready(function(){
            $('#testForm:\\numField').filter_input({regex:'[0-9]'});
        });
        //]]>

    </script>
    </h:head>

    <h:body>
        <h:form id="testForm">
            <h:outputText value="User ID: " /><h:inputText id="numField" value="#{testBean.userID}"/>
            <h:commandLink action="#{testBean.updateUserID}" value="myfaces CommandButton"/>
            <h:outputText value=" | " />
            <a4j:commandLink reRender="testForm" value="A4J Command Link" action="#{testBean.updateUserID }" /> 
        </h:form>
    </h:body>
</html>

Below are issues that I'm seeing with this test.xhtml:

1) When the "a4j:commandLink" tag is present in test.xhtml page, all jquery plugin failed to load (getting $("#testForm\:numField").filter_input is not a function error in this case). If I removed "a4j:commandLink" tag from this test.xhtml page, all plugin work fine.

2) I get this error when click on the "a4j:commandLink": javax.el.PropertyNotFoundException: Property 'updateUserID' not found on type com.arch.myaccount.jsf.TestBean. The "h:commandLink", which binds to the same action, works just fine.

I would appreciate any help.

Upvotes: 1

Views: 527

Answers (1)

noone
noone

Reputation: 19786

<a4j:commandLink reRender="testForm" value="A4J Command Link" action="#{testBean.updateUserID }" />

reRender has changed to render from RichFaces 3 -> RichFaces 4. Change that, then it will be "rerendered" just fine.

Upvotes: 1

Related Questions