-
1. Re: How to provide link back to my application in email
marcio.dantas Sep 6, 2010 2:01 PM (in response to vestnik)1) You can declare a factory in your components.xml with the base url.
Are you using Maven? If you are, then you could set the factory value depending on the used profile (development, production, ...).2) I didn't understand very well.. Are you concerned with the configurable extension .seam, .faces, .jsf?
You could use (again) a factory to get this.3)
In the e-mail body, you will have something like http://hostname/appname/login.seam?user=userId&nextOutcome=timeTableWhen the link is clicked, the user goes to a login page. Once authenticated, the application would use the
nextOutcome
parameter to know which view the user intends to go after login.Got the idea? This is a way to do it.
best regards.
-
2. Re: How to provide link back to my application in email
vestnik Sep 7, 2010 5:45 AM (in response to vestnik)No I'm not using maven. I've added property containing base url to the seam.properties and mapped it to one application scope component which holds all logical constants of my application. But I still interested in other solution used by other people maybe there are more elegant and flexible solutions.
Abut the 2nd issue: By default if I have some view like {project-root}/view/qwe/rty.xhtml I can access it by url qwe/rty.seam. It's simple to change suffix so the url to access this page will turn into qwe/rty.asd or something like this. At the same time one might add {project-root}/view/qwe/rty.page.xml and specify url rewriting so this page can be accessed only by something/meaningful url. There are several ways to change which url is used to access this certain page.
In my mail templates I'm using h:otputLink to generate link back to the system and I need to track such changes manually. It's not reliable way. You suggestion to use additional parameter to the login url is good since in this case I need to track only changes of login url but still it requires to modify every mail template in the application if login url is changed.
s:link handles this situation perfectly but it generates link. Is there any way to get part of the path in the url relative to the context root which should be used to access certain *.xhtml template?