Announcement Announcement Module
Collapse
No announcement yet.
a4j:support + swf2 not working Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • a4j:support + swf2 not working

    Hi there,

    I am using

    SWF 2.0.8
    Richfaces 3.3.2.SR1
    Spring Security 2.0.5
    JSF (Mojarra 1.2_10-b01-FCS)
    Glassfish v3 prelude AS.

    and i m unable to have changes on
    a4j:support on h:selectOneMenu..

    Everything works fine with my project,
    but a4j:support is not working.

    xhtml code is as
    Code:
    <h:selectOneMenu id="courseInput" value="#{student.courseId}">
    						<f:selectItems  value="#{courseList}"/>
    						<a4j:support event="onchange" action="comboch" reRender="semesterInput,yearInput" />
    					</h:selectOneMenu>
    it's view n transition is as

    Code:
    <transition on="comboch">
    			<evaluate expression="studentDetailor.meroProperty()"/>
    		</transition>
    it's java code property is as

    Code:
    public void meroProperty(){
    		System.out.println("yeha chai aayo hai... :D");		
    	}
    this method is just printing message as, i want to see does this method hit's server on change due to a4j:support or not...

    I have mentioned everything on web.xml too

    Code:
    <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>
      <filter-mapping>
        <filter-name>richfaces</filter-name>
        <servlet-name>Spring MVC Dispatcher Servlet</servlet-name>
        <dispatcher>REQUEST</dispatcher>
        <dispatcher>FORWARD</dispatcher>
        <dispatcher>INCLUDE</dispatcher>
      </filter-mapping>
    <servlet>
        <servlet-name>Spring MVC Dispatcher Servlet</servlet-name>
        <servlet-class>com.asn.smis.common.ASNDispatcherServlet</servlet-class>
        <init-param>
          <param-name>contextConfigLocation</param-name>
          <param-value></param-value>
        </init-param>
        <load-on-startup>2</load-on-startup>
      </servlet>
    here i extended Spring's Dispatcher Servlet for error handling.

    I am still unable to find out why this a4j:support is not working on my project.

    Thanking in advance... Please help me

  • #2
    try to put:

    <render fragments="the ids you want to rerender"/>

    et the end of your transition...

    Comment


    • #3
      can i see your entire flow.xml?

      Comment


      • #4
        Hi jamesleouf,

        the complete flow.xml is as follow

        Code:
        <?xml version="1.0" encoding="UTF-8"?>
        <flow xmlns="http://www.springframework.org/schema/webflow"
        	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        	xsi:schemaLocation="http://www.springframework.org/schema/webflow
                                  http://www.springframework.org/schema/webflow/spring-webflow-2.0.xsd">
        	<on-start>
        		<evaluate expression="themeDetailor.getUsersSkin(currentUser.name)"
        			result="flowScope.userSkin" />
        		<evaluate expression="viewDetailor.isAdminView()" result="flowScope.isAdmin" />
        		<evaluate expression="viewDetailor.isLibraryView()" result="flowScope.isLibrary" />
        		<evaluate expression="userDetailor.isWriteAllowed()" result="flowScope.isWriteAllowed" />
        		<evaluate expression="theme.setSkin(userSkin)" />
        	</on-start>
        	<view-state id="intro" view="intro.xhtml" />
        	<view-state id="toHome" view="intro.xhtml" />
        
        	<view-state id="createRoles" view="/asn/admin/createRoles.xhtml">
        		<on-render>
        			<evaluate expression="roleDetailor.getViews()" result="viewScope.roleViews" />
        		</on-render>
        		<transition on="saves">
        			<evaluate expression="roleCreator.set2DB(role)" />
        		</transition>
        	</view-state>
        
        	<view-state id="toCreateStudent" view="/asn/admin/createStudent.xhtml">
        		<on-render>
        			<evaluate expression="studentDetailor.getCourseList()"
        				result="viewScope.courseList" />
        		</on-render>
        		<transition on="comboch">
        			<evaluate expression="studentDetailor.meroProperty()" />
        		</transition>
        		<transition on="saves">
        			<evaluate expression="studentCreator.set2DB(student)" />
        		</transition>
        	</view-state>
        
        	<global-transitions>
        
        		<transition on="toCreateStudent" to="toCreateStudent" />
        		<transition on="toHome" to="toHome" />
        		<transition on="toCreateRoles" to="createRoles" />
        	</global-transitions>
        </flow>
        Thanking in advance

        Comment


        • #5
          a4j:support + swf2 not working

          Hello mabimal,

          I am also facing the same problem. I am not able to use a4j:support events with spring web flow. The transition in the web flow corresponding to the a4j:support action is not triggered.

          If you have found the solution kindly share with me...

          Comment


          • #6
            a4j:support + swf2 working

            Hello suk8fe,

            Transition works like setting on view
            <a4j:support
            Code:
            event="onchange"
            action="someAction"
            reRender="someOutputPanel"/>

            on action you need to have the action on your webflow.
            and it will do it....This is my solution and it is working well enough.

            Thanks

            Comment

            Working...
            X