T4 Redirect to external URL

2008-02-14 Thread Marnix Bindels
After logging out from my tapestry 4 app. I'd like to redirect to an 
arbitrary URL. I'm doing my usual Redirection exception thing but to no 
avail. Googling did not bring a solution either. Anyone care to give a 
suggestion?


My pageBeginRender concludes with:

setFinalTarget(http://www.google.com/;);

if (getFinalTarget()!=null) {
throw new RedirectException(getFinalTarget());
}


But then invoking the page yields:

org.apache.tapestry.RedirectException: redirectLocation: http://www.google.com/

Stack Trace:

nl.chess.meetingpoint.lgb.pages.LoggedOut.pageBeginRender(LoggedOut.java:77)

org.apache.tapestry.AbstractPage.firePageBeginRender(AbstractPage.java:409)
org.apache.tapestry.AbstractPage.renderPage(AbstractPage.java:244)
org.apache.tapestry.engine.RequestCycle.renderPage(RequestCycle.


Why?

Cheers,
  Marnix


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[T4] Log4J configuration outside of WAR

2007-11-06 Thread Marnix Bindels

Hi All,

I'd like to my web app to initialize the Log4J system using a log4j.xml 
file for which the location will be specified at server startup. In 
previous projects, using spring, this proved to be easily done by 
including some Log4jWebConfigurer instance. It's setup to refer to 
${my-app.config.dir}/log4j.xml and there you go. Does a HiveMind 
equivalent exist?


I've investigated HiveUtils giving me plain old properties files under 
HiveMind (thank you!) and a trapdoor to log4j.xml on  some absolute path 
location. The first is by adding a PropertyFileSources element to the 
hivermodule.xml and the second by adding a LoggingInitListener to the 
web.xml. However, I get the feeling that having the exact runtime path 
determined by a system property my-app.config.dir is not going to be 
achieved by these two. Or can it?


This is as far as I got in trying to solve my quest, being:
   - I'd keep app.properties and log4j.xml in directory 
C:\app\conf\production\
   - maybe I keep similar but different sets in conf\test-local and 
conf\...
   - before Tomcat startup, I add 
my-app.config.dir=C:\app\conf\production\ to the JAVA _OPTS env. setting


I'd be interested to hear from you,

Marnix


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



T4: LinkSubmit not working in IFRAME'd app caused by unavailable tapestry.form javascript

2007-10-03 Thread Marnix Bindels

Dear All,

I developed my tapestry 4.1.2 app top level in my browser. However, it 
is meant to run inside an IFRAME of some other application beyond my 
control.


I used LinkSubmit on some forms and they worked great, calling the 
JavaScript function tapestry.form.submit(), at toplevel in my browser. 
But when framed in that IFRAME, nothing happens as the package and hence 
function is not available.


The pageload yields an exception:

Error: [Exception... 'Permission denied to get property 
HTMLDocument._parentWindow' when calling method: 
[nsIDOMEventListener::handleEvent]  nsresult: 0x8057001e 
(NS_ERROR_XPC_JS_THREW_STRING)  location: unknown  data: no]


and clicking the link yields Tapestryform. has no properties.

People in my team tell me, it is because of 'cross site scripting' not 
being allowed. Is there a way around this limitation? Or some other way 
to get ImageSubmit and LinkSubmit like behaviour?


I tried fiddling with renderBaseTag in the @Shell. Browsing the Dojo 
site for a solution, but I wouldn't even know how to bring in a newer 
dojo version as 0.4.3. in seems to be packaged beyond mvn control.


tapestry/core.js seems to have been loaded fine, can I somehow force 
form.js to be loaded directly instead of by dojo?


Kind regards,
 Marnix

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]