JSF 2.2 Dynamic View Id Problem

Splash Forums PrettyFaces Users JSF 2.2 Dynamic View Id Problem

This topic contains 6 replies, has 2 voices, and was last updated by  caglarturkurka 1 year, 3 months ago.

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #27105

    caglarturkurka
    Participant

    I want to use Pretty Faces for URL Mapping in my application and I have an MenuBean class which is used to redirect to another page and I want to use pretty faces dynaview according to openFormStr which is in MenuBean class.But Dynamic View not work.

    <url-mapping id="login">
        <pattern value="/bondcaglar" />
        <view-id value="#{formsprocess.getOpenFormStr}" />
    </url-mapping>
    
    Also @Named("menuBean")
    @SessionScoped
    public class MenuBean implements Serializable{
     @Inject private FormsProcess formsProcess;
    ......
    .....
    .....
    }
    
    Also @Named("formsprocess")
    @ViewScoped
    public class FormsProcess implements Serializable{
     @Inject private String openFormStr; //Also it has got setter/getter.
    .........................
    .........................
    .........................
    }
    #27115

    Could you explain “does not work” a bit more?

    #27116

    caglarturkurka
    Participant

    Hi ; I want to use PrettyFaces for url mapping.I have an application which has dynamic menu and when I click a menu item,it will redirect request for a form and I want to make url mapping over it using pretty-config.xml with dynamic view id.But Dynamic View id EL-Expression did not call related method in my bean.

    #27117

    caglarturkurka
    Participant

    It is my Bean and configuration files.

    @Named
    @ViewScoped
    public class FormsProcess implements Serializable {
    	private static final long serialVersionUID = 3451306433778243202L;
    	public String getNextUrl(){
    		return "/faces/bondaction/createBondAction.html";
    	}
    }
    #27118

    caglarturkurka
    Participant

    It is my Bean and configuration files.

    <url-mapping id="login">
    		<pattern value="/faces/bondaction_createBondAction" />
    		<view-id value="#{formsProcess.getNextUrl}" />
    	</url-mapping>
    
            <dependency>
        		<groupId>org.ocpsoft.rewrite</groupId>
        		<artifactId>rewrite-servlet</artifactId>
        		<version>2.0.12.Final</version>
    		</dependency>
    		<dependency>
        		<groupId>org.ocpsoft.rewrite</groupId>
       	 		<artifactId>rewrite-config-prettyfaces</artifactId>
        		<version>2.0.12.Final</version>
    		</dependency>
    #27119

    AFAIK you cannot use ViewScoped beans in this case because the processing of dynaview is done outside of the JSF lifecycle.

    #27120

    caglarturkurka
    Participant

    But I have changed ViewScoped to RequestScoped and still not call.

Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.

Comments are closed.