[jboss-user] [JBoss Seam] - Re: Combining list and all CRUD functionality on a single pa

tony.herstell@gmail.com do-not-reply at jboss.com
Mon Mar 5 18:41:46 EST 2007


I think what you want is to hack the conversation string...

See my CRUD pages below..

cRUDOrganisationController.mode

is visible in the conversation state which is either CREATE, READ, UPDATE, DELETE


  | public interface CRUDOrganisationController {
  | 	
  | 	public enum Mode {CREATE, READ, UPDATE, DELETE};
  | 
  | 	public Mode getMode();
  | 
  | 	public boolean getModeIsRead();
  | 	
  | 	public boolean getModeIsCreate();
  | 	
  | 	public boolean getModeIsUpdate();
  | 
  | 	public boolean getModeIsDelete();
  | 	
  | 	public String startCreate();
  | 
  | 	public String startRead(Organisation organisation);
  | 	
  | 	public String startUpdate(Organisation organisation);
  | 	
  | 	public String startDelete(Organisation organisation);
  | 
  | 	public String checkDetails();
  | 	
  | 	public String revise();
  | 	
  | 	public String create();
  | 	
  | 	public String update();
  | 
  | 	public String delete();
  | 	
  | 	public String switchToUpdate();
  | 
  | 	public String switchToDelete();
  | 
  | 	public String cancelCRUD();
  | 	
  | 	public String cancelConfirm();
  | 
  | 	public void destroy();
  | }
  | 
  | 


  | 
  | <pages no-conversation-view-id="/mainmenu.xhtml">
  | 	<page view-id="/userCRUD.xhtml" timeout="300000">
  | 		Reason: #{cRUDUserController.mode} User ( #{user.username} )
  | 	</page>
  | 	<page view-id="/userConfirm.xhtml" timeout="300000">
  | 		Reason: Confirm #{cRUDUserController.mode} User
  | 		(#{user.username} )
  | 	</page>
  | 	<page view-id="/userRegistration.xhtml" timeout="300000">
  | 		Reason: Registration of new User
  | 	</page>
  | 
  | 	<page view-id="/organisationCRUD.xhtml" timeout="300000">
  | 		Reason: #{cRUDOrganisationController.mode} Organisation (
  | 		#{organisation.name} )
  | 	</page>
  | 	<page view-id="/organisationConfirm.xhtml" timeout="300000">
  | 		Reason: Confirm #{cRUDOrganisationController.mode} Organisation
  | 		(#{organisation.name} )
  | 	</page>
  | 
  | 	<page view-id="/upload.xhtml" timeout="300000">
  | 		Reason: Upload Image
  | 	</page>
  | 
  | 	<!--  Security -->
  | 
  | 	<page view-id="/userRegistration.xhtml">
  | 		<restrict>#{!identity.loggedIn}</restrict>
  | 	</page>
  | 
  | 	<page view-id="/userFind.xhtml">
  | 		<restrict>#{identity.loggedIn}</restrict>
  | 	</page>
  | 	<page view-id="/userCRUD.xhtml">
  | 		<restrict>#{identity.loggedIn}</restrict>
  | 	</page>
  | 	<page view-id="/userConfirm.xhtml">
  | 		<restrict>#{identity.loggedIn}</restrict>
  | 	</page>
  | 
  | 	<page view-id="/organisationFind.xhtml">
  | 		<restrict>#{identity.loggedIn}</restrict>
  | 	</page>
  | 	<page view-id="/organisationCRUD.xhtml">
  | 		<restrict>#{identity.loggedIn}</restrict>
  | 	</page>
  | 	<page view-id="/organisationConfirm.xhtml">
  | 		<restrict>#{identity.loggedIn}</restrict>
  | 	</page>
  | 
  | 	<page view-id="/upload.xhtml">
  | 		<restrict>#{identity.loggedIn}</restrict>
  | 	</page>
  | 	
  | 	<exception class="org.jboss.seam.security.NotLoggedInException">
  | 		<end-conversation />
  | 		<redirect view-id="/securityError.xhtml">
  | 			<message>#{messages.security_not_logged_in}</message>
  | 		</redirect>
  | 	</exception>
  | 
  | 	<exception class="org.jboss.seam.security.AuthorizationException">
  | 		<end-conversation />
  | 		<redirect view-id="/securityError.xhtml">
  | 			<message>#{messages.security_permission}</message>
  | 		</redirect>
  | 	</exception>
  | 	
  | </pages>
  | 
  | 
  | 


Someone will have a better solution I am sure...

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4025245#4025245

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4025245



More information about the jboss-user mailing list