Re: 5.1.0.1-SNAPSHOT submit context not workin in a loop

2009-03-10 Thread Ville Virtanen

Still struggling with submit context, but found out that if something is
wrong with template, then T5 doesn't show the exception page anymore under
certain circumstances: Browser only shows various error messages: Chrome
says: Error 2 (net::ERR_FAILED): Unknown error, FireFox shows 
/body
/html

and IE says that the page is currently unavailable.

I can reproduce by just adding t:input t:id=someid
t:value=non-existent-value / to the page and navigating to it. Normally
T5 of course says that the value doesn't exist, but now it shows the various
error msg and there is a stack trace (Shown below.)

Can someone try on their environment to reproduce whether this occurs or
not, to rule out my environment? Currently I use 5.1.0.1-20090305.090208-13.

at
org.apache.tapestry5.internal.services.ComponentClassResolverImpl$6.invoke(ComponentClassResolverImpl.java:459)
at
org.apache.tapestry5.internal.services.ComponentClassResolverImpl$6.invoke(ComponentClassResolverImpl.java:455)
at
org.apache.tapestry5.ioc.internal.util.ConcurrentBarrier.withRead(ConcurrentBarrier.java:85)
at
org.apache.tapestry5.internal.services.ComponentClassResolverImpl.resolveComponentTypeToClassName(ComponentClassResolverImpl.java:453)
at
$ComponentClassResolver_11feeecf7f2.resolveComponentTypeToClassName($ComponentClassResolver_11feeecf7f2.java)
at
org.apache.tapestry5.internal.pageload.PageLoaderImpl.startComponent(PageLoaderImpl.java:609)
... 135 more
[2009-03-10 07:52:29,374] INFO 
(fi.hy.toiminnanohjaus.tapestry5.services.HYOperationManagementModule.TimingFilter:40)
- Request time 1343  ms for GET-/fundshare. Request was made by Test
aaja, Testi (test).
[2009-03-10 07:52:29,374] ERROR
(org.apache.tapestry5.internal.services.InternalModule.PagePool:111) - Page
Page[FundShare fi_FI] is dirty, and will be discarded (rather than returned
to the
 page pool).
2009-03-10 07:52:29.374::WARN:  /fundshare
java.lang.ArrayIndexOutOfBoundsException: 4096
at org.mortbay.io.ByteArrayBuffer.poke(ByteArrayBuffer.java:268)
at org.mortbay.io.AbstractBuffer.put(AbstractBuffer.java:456)
at org.mortbay.jetty.HttpFields$Field.put(HttpFields.java:1403)
at
org.mortbay.jetty.HttpGenerator.completeHeader(HttpGenerator.java:523)
at
org.mortbay.jetty.HttpConnection.commitResponse(HttpConnection.java:610)
at
org.mortbay.jetty.HttpConnection$Output.flush(HttpConnection.java:945)
at java.io.FilterOutputStream.flush(FilterOutputStream.java:123)
at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:124)
at java.io.FilterOutputStream.close(FilterOutputStream.java:140)
at
org.apache.tapestry5.internal.gzip.BufferedGZipOutputStream.close(BufferedGZipOutputStream.java:131)
at sun.nio.cs.StreamEncoder.implClose(StreamEncoder.java:301)
at sun.nio.cs.StreamEncoder.close(StreamEncoder.java:130)
at java.io.OutputStreamWriter.close(OutputStreamWriter.java:216)
at java.io.BufferedWriter.close(BufferedWriter.java:248)
at java.io.PrintWriter.close(PrintWriter.java:295)
at
org.apache.tapestry5.internal.services.PageResponseRendererImpl.renderPageResponse(PageResponseRendererImpl.java:80)
at
$PageResponseRenderer_11feeecf820.renderPageResponse($PageResponseRenderer_11feeecf820.java)
at
org.apache.tapestry5.internal.services.DefaultRequestExceptionHandler.handleRequestException(DefaultRequestExceptionHandler.java:77)
at
fi.cerion.t5f.tapestry5.services.AppModule$1.handleRequestException(AppModule.java:134)
at
$RequestExceptionHandler_11feeecf80a.handleRequestException($RequestExceptionHandler_11feeecf80a.java)
at
org.apache.tapestry5.internal.services.RequestErrorFilter.service(RequestErrorFilter.java:42)
at
$RequestHandler_11feeecf80c.service($RequestHandler_11feeecf80c.java)
at
org.apache.tapestry5.services.TapestryModule$4.service(TapestryModule.java:765)
at
$RequestHandler_11feeecf80c.service($RequestHandler_11feeecf80c.java)
at
org.apache.tapestry5.services.TapestryModule$3.service(TapestryModule.java:755)
at
$RequestHandler_11feeecf80c.service($RequestHandler_11feeecf80c.java)
at
org.apache.tapestry5.internal.services.StaticFilesFilter.service(StaticFilesFilter.java:85)
at
$RequestHandler_11feeecf80c.service($RequestHandler_11feeecf80c.java)
at
fi.hy.toiminnanohjaus.tapestry5.services.HYOperationManagementModule$1.service(HYOperationManagementModule.java:420)
at
$RequestFilter_11feeecf808.service($RequestFilter_11feeecf808.java)
at
$RequestHandler_11feeecf80c.service($RequestHandler_11feeecf80c.java)
at
org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:90)
at
org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:81)
at

actionlink pass combobox value.

2009-03-10 Thread Tan cyb...@n
Hi all,

I have my a combo box. getCombovalue() always get null value when i clicked
on actionlink button.
( This is due to the form no post back that cause it retrieved a null
value.)

*remark this is using zone and block.
@injectpage
private SecondPage secondpage;

Object onActionFrombtnClick()
{
 secondpage.setHeaderID(my combo value);
 return secondpage
}

how am i going to get the combobox value when i click on actionlink button
without post back the form?
Thank you.

Regards,
Tan


5.1 Parameter namespacePrefix was null

2009-03-10 Thread Joachim Van der Auwera
Does anybody know where the following Parameter namespacePrefix was 
null error comes from (and better, how to fix).


I upgrading my application from 5.0.18 to 5.1.0.0 and now get this error.

What is extremely wierd is that the template did indeed contain

html xmlns=http://www.w3.org/1999/xhtml; 
xmlns:t=http://tapestry.apache.org/schema/tapestry_5_0_0.xsd;


(which seems perfectly valid to me) but changing that to

html xmlns:t=http://tapestry.apache.org/schema/tapestry_5_0_0.xsd;

and a clean build didn't even seem to make a difference...
Now there is no http://www.w3.org/1999/xhtml; anywhere in my code, so I 
don't know where it comes from...


Any ideas?

Thanks,
Joachim


2009-03-10 10:32:43,613 ERROR 
[tapestry.render.be.synergetics.ca.gui.pages.Login] Render queue error 
in CompositeRenderCommand[Start[http://www.w3.org/1999/xhtml html], 
DefineNamespace[null http://www.w3.org/1999/xhtml], 
Start[http://www.w3.org/1999/xhtml head], 
Start[http://www.w3.org/1999/xhtml title]]: Parameter namespacePrefix 
was null.

java.lang.IllegalArgumentException: Parameter namespacePrefix was null.
   at 
org.apache.tapestry5.ioc.internal.util.Defense.notNull(Defense.java:37)

   at org.apache.tapestry5.dom.Element.defineNamespace(Element.java:519)
   at 
org.apache.tapestry5.internal.services.MarkupWriterImpl.defineNamespace(MarkupWriterImpl.java:221)
   at 
org.apache.tapestry5.internal.pageload.PageLoaderImpl$4.render(PageLoaderImpl.java:341)
   at 
org.apache.tapestry5.internal.pageload.CompositeRenderCommand.render(CompositeRenderCommand.java:68)
   at 
org.apache.tapestry5.internal.services.RenderQueueImpl.run(RenderQueueImpl.java:74)
   at 
org.apache.tapestry5.internal.services.PageRenderQueueImpl.render(PageRenderQueueImpl.java:121)
   at 
$PageRenderQueue_11fefb9a143.render($PageRenderQueue_11fefb9a143.java)
   at 
$PageRenderQueue_11fefb9a0a0.render($PageRenderQueue_11fefb9a0a0.java)
   at 
org.apache.tapestry5.internal.services.MarkupRendererTerminator.renderMarkup(MarkupRendererTerminator.java:37)
   at 
org.apache.tapestry5.services.TapestryModule$26.renderMarkup(TapestryModule.java:1676)
   at 
$MarkupRenderer_11fefb9a145.renderMarkup($MarkupRenderer_11fefb9a145.java)
   at 
org.apache.tapestry5.services.TapestryModule$25.renderMarkup(TapestryModule.java:1657)
   at 
$MarkupRenderer_11fefb9a145.renderMarkup($MarkupRenderer_11fefb9a145.java)
   at 
org.apache.tapestry5.services.TapestryModule$24.renderMarkup(TapestryModule.java:1639)
   at 
$MarkupRenderer_11fefb9a145.renderMarkup($MarkupRenderer_11fefb9a145.java)
   at 
org.apache.tapestry5.services.TapestryModule$23.renderMarkup(TapestryModule.java:1625)
   at 
$MarkupRenderer_11fefb9a145.renderMarkup($MarkupRenderer_11fefb9a145.java)
   at 
org.apache.tapestry5.services.TapestryModule$22.renderMarkup(TapestryModule.java:1611)
   at 
$MarkupRenderer_11fefb9a145.renderMarkup($MarkupRenderer_11fefb9a145.java)
   at 
org.apache.tapestry5.services.TapestryModule$21.renderMarkup(TapestryModule.java:1583)
   at 
$MarkupRenderer_11fefb9a145.renderMarkup($MarkupRenderer_11fefb9a145.java)
   at 
org.equanda.t5nav.internal.NavigationDispatcher.renderMarkup(NavigationDispatcher.java:94)
   at 
$MarkupRenderer_11fefb9a145.renderMarkup($MarkupRenderer_11fefb9a145.java)
   at 
$MarkupRenderer_11fefb9a142.renderMarkup($MarkupRenderer_11fefb9a142.java)
   at 
org.apache.tapestry5.internal.services.PageMarkupRendererImpl.renderPageMarkup(PageMarkupRendererImpl.java:64)
   at 
$PageMarkupRenderer_11fefb9a140.renderPageMarkup($PageMarkupRenderer_11fefb9a140.java)
   at 
org.apache.tapestry5.internal.services.PageResponseRendererImpl.renderPageResponse(PageResponseRendererImpl.java:61)
   at 
$PageResponseRenderer_11fefb9a0c3.renderPageResponse($PageResponseRenderer_11fefb9a0c3.java)
   at 
org.apache.tapestry5.internal.services.PageRenderRequestHandlerImpl.handle(PageRenderRequestHandlerImpl.java:63)
   at 
org.apache.tapestry5.services.TapestryModule$32.handle(TapestryModule.java:1876)
   at 
$PageRenderRequestHandler_11fefb9a0c4.handle($PageRenderRequestHandler_11fefb9a0c4.java)
   at 
be.synergetics.ca.gui.services.AppServerLoginFilter.handle(AppServerLoginFilter.java:48)
   at 
$PageRenderRequestHandler_11fefb9a0c4.handle($PageRenderRequestHandler_11fefb9a0c4.java)
   at 
org.chenillekit.access.services.impl.PageRenderAccessFilter.handle(PageRenderAccessFilter.java:86)
   at 
$PageRenderRequestFilter_11fefb9a0bf.handle($PageRenderRequestFilter_11fefb9a0bf.java)
   at 
$PageRenderRequestHandler_11fefb9a0c4.handle($PageRenderRequestHandler_11fefb9a0c4.java)
   at 
$PageRenderRequestHandler_11fefb9a0b7.handle($PageRenderRequestHandler_11fefb9a0b7.java)
   at 
org.apache.tapestry5.internal.services.RootPathDispatcher.dispatch(RootPathDispatcher.java:61)

   at $Dispatcher_11fefb9a0be.dispatch($Dispatcher_11fefb9a0be.java)
   at $Dispatcher_11fefb9a0b3.dispatch($Dispatcher_11fefb9a0b3.java)
   at 

Re: actionlink pass combobox value.

2009-03-10 Thread Tan cyb...@n
http://jumpstart.doublenegative.com.au:8080/jumpstart/examples/input/linksubmits1

On Tue, Mar 10, 2009 at 8:04 PM, Tan cyb...@n quesoft.cyber...@gmail.comwrote:

 hi DH,

 Do you have any example?
 Thank you

 Regards,
 Tan


 On Tue, Mar 10, 2009 at 7:50 PM, DH ningd...@gmail.com wrote:

 If you are not limited on actionlink, have a try with LinkSubmit
 component, it can post form.

 Or else you need js to help post the value back.

 Thanks

 DH

 Sent: Tuesday, March 10, 2009 4:47 PM
 Subject: actionlink pass combobox value.


  Hi all,
 
  I have my a combo box. getCombovalue() always get null value when i
 clicked
  on actionlink button.
  ( This is due to the form no post back that cause it retrieved a null
  value.)
 
  *remark this is using zone and block.
  @injectpage
  private SecondPage secondpage;
 
  Object onActionFrombtnClick()
  {
  secondpage.setHeaderID(my combo value);
  return secondpage
  }
 
  how am i going to get the combobox value when i click on actionlink
 button
  without post back the form?
  Thank you.
 
  Regards,
  Tan
 





Re: actionlink pass combobox value.

2009-03-10 Thread DH
Yes, that's it. I always learn from jumpstart.

Thanks

DH


- Original Message - 
From: Tan cyb...@n Sent: Tuesday, March 10, 2009 8:11 PM
Subject: Re: actionlink pass combobox value.


 http://jumpstart.doublenegative.com.au:8080/jumpstart/examples/input/linksubmits1
 
 On Tue, Mar 10, 2009 at 8:04 PM, Tan cyb...@n 
 quesoft.cyber...@gmail.comwrote:
 
 hi DH,

 Do you have any example?
 Thank you

 Regards,
 Tan


 On Tue, Mar 10, 2009 at 7:50 PM, DH ningd...@gmail.com wrote:

 If you are not limited on actionlink, have a try with LinkSubmit
 component, it can post form.

 Or else you need js to help post the value back.

 Thanks

 DH

 Sent: Tuesday, March 10, 2009 4:47 PM
 Subject: actionlink pass combobox value.


  Hi all,
 
  I have my a combo box. getCombovalue() always get null value when i
 clicked
  on actionlink button.
  ( This is due to the form no post back that cause it retrieved a null
  value.)
 
  *remark this is using zone and block.
  @injectpage
  private SecondPage secondpage;
 
  Object onActionFrombtnClick()
  {
  secondpage.setHeaderID(my combo value);
  return secondpage
  }
 
  how am i going to get the combobox value when i click on actionlink
 button
  without post back the form?
  Thank you.
 
  Regards,
  Tan
 





Re: T5: How to load image Asset from filesystem?

2009-03-10 Thread Thiago H. de Paula Figueiredo
Hi!

Search this mailing list archives because this was already asked here:
http://www.nabble.com/forum/Search.jtp?forum=340local=yquery=asset+filesystem.

-- 
Thiago

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: T5: How to load image Asset from filesystem?

2009-03-10 Thread Peter Kanze
Hello

I already searched the archive and found the question, but it is not clear
to me.
There are no examples in it with a dynamic path..




On Tue, Mar 10, 2009 at 1:45 PM, Thiago H. de Paula Figueiredo 
thiag...@gmail.com wrote:

 Hi!

 Search this mailing list archives because this was already asked here:

 http://www.nabble.com/forum/Search.jtp?forum=340local=yquery=asset+filesystem
 .

 --
 Thiago

 -
 To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
 For additional commands, e-mail: users-h...@tapestry.apache.org




Re: T5: How to load image Asset from filesystem?

2009-03-10 Thread Thiago H. de Paula Figueiredo
On Tue, Mar 10, 2009 at 9:51 AM, Peter Kanze peterka...@gmail.com wrote:
 I already searched the archive and found the question, but it is not clear
 to me.
 There are no examples in it with a dynamic path..

You'll use AssetSource for that.

-- 
Thiago

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: T5: How to load image Asset from filesystem?

2009-03-10 Thread Peter Kanze
Oke thank you.

But how do I map between the web http:// and the file D:/ urls?
Can you give me some (pseudo) code examples how to do this?

Thanks!
Peter



On Tue, Mar 10, 2009 at 1:56 PM, Thiago H. de Paula Figueiredo 
thiag...@gmail.com wrote:

 On Tue, Mar 10, 2009 at 9:51 AM, Peter Kanze peterka...@gmail.com wrote:
  I already searched the archive and found the question, but it is not
 clear
  to me.
  There are no examples in it with a dynamic path..

 You'll use AssetSource for that.

 --
 Thiago

 -
 To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
 For additional commands, e-mail: users-h...@tapestry.apache.org




Re: 5.1 Parameter namespacePrefix was null

2009-03-10 Thread Joachim Van der Auwera

Thanks for the help.
I have seen a note in jira, but that wasn't very helpful either.
What makes it strange is that I don't have the 
http://www.w3.org/1999/xhtml; anywhere in my project, or in my 
components. I am using chenillekit, but that only seems to contain such 
a namespace in a component I am not using. I honoustly don't know what I 
should try to change or rebuild to get rid of this error.


Joachim

Andy Pahne wrote:


There have been two separate threads dealing with this and a few users 
(including me) experiencing this. But as far as I remember, no 
solution has been found yet.


The problem disappeared for me, but I don't know how. What I did was a 
bit desperate: I had a feeling that one of my abstract base classes 
was causing this. So I rebuilt it from zero step by step, in order to 
find out what caused the problem. I ended up with the exact base class 
than before, but the error was never seen again.


I also played around with the configuration settings for production 
mode, reconfigured the used exception page and things like that.


Unfortunatly I don't think that this will help you much.

Andy



Joachim Van der Auwera schrieb:
Does anybody know where the following Parameter namespacePrefix was 
null error comes from (and better, how to fix).


I upgrading my application from 5.0.18 to 5.1.0.0 and now get this 
error.


What is extremely wierd is that the template did indeed contain

html xmlns=http://www.w3.org/1999/xhtml; 
xmlns:t=http://tapestry.apache.org/schema/tapestry_5_0_0.xsd;


(which seems perfectly valid to me) but changing that to

html xmlns:t=http://tapestry.apache.org/schema/tapestry_5_0_0.xsd;

and a clean build didn't even seem to make a difference...
Now there is no http://www.w3.org/1999/xhtml; anywhere in my code, 
so I don't know where it comes from...


Any ideas?

Thanks,
Joachim


2009-03-10 10:32:43,613 ERROR 
[tapestry.render.be.synergetics.ca.gui.pages.Login] Render queue 
error in CompositeRenderCommand[Start[http://www.w3.org/1999/xhtml 
html], DefineNamespace[null http://www.w3.org/1999/xhtml], 
Start[http://www.w3.org/1999/xhtml head], 
Start[http://www.w3.org/1999/xhtml title]]: Parameter namespacePrefix 
was null.

java.lang.IllegalArgumentException: Parameter namespacePrefix was null.
   at 
org.apache.tapestry5.ioc.internal.util.Defense.notNull(Defense.java:37)

   at org.apache.tapestry5.dom.Element.defineNamespace(Element.java:519)
   at 
org.apache.tapestry5.internal.services.MarkupWriterImpl.defineNamespace(MarkupWriterImpl.java:221) 

   at 
org.apache.tapestry5.internal.pageload.PageLoaderImpl$4.render(PageLoaderImpl.java:341) 

   at 
org.apache.tapestry5.internal.pageload.CompositeRenderCommand.render(CompositeRenderCommand.java:68) 

   at 
org.apache.tapestry5.internal.services.RenderQueueImpl.run(RenderQueueImpl.java:74) 

   at 
org.apache.tapestry5.internal.services.PageRenderQueueImpl.render(PageRenderQueueImpl.java:121) 

   at 
$PageRenderQueue_11fefb9a143.render($PageRenderQueue_11fefb9a143.java)
   at 
$PageRenderQueue_11fefb9a0a0.render($PageRenderQueue_11fefb9a0a0.java)
   at 
org.apache.tapestry5.internal.services.MarkupRendererTerminator.renderMarkup(MarkupRendererTerminator.java:37) 

   at 
org.apache.tapestry5.services.TapestryModule$26.renderMarkup(TapestryModule.java:1676) 

   at 
$MarkupRenderer_11fefb9a145.renderMarkup($MarkupRenderer_11fefb9a145.java) 

   at 
org.apache.tapestry5.services.TapestryModule$25.renderMarkup(TapestryModule.java:1657) 

   at 
$MarkupRenderer_11fefb9a145.renderMarkup($MarkupRenderer_11fefb9a145.java) 

   at 
org.apache.tapestry5.services.TapestryModule$24.renderMarkup(TapestryModule.java:1639) 

   at 
$MarkupRenderer_11fefb9a145.renderMarkup($MarkupRenderer_11fefb9a145.java) 

   at 
org.apache.tapestry5.services.TapestryModule$23.renderMarkup(TapestryModule.java:1625) 

   at 
$MarkupRenderer_11fefb9a145.renderMarkup($MarkupRenderer_11fefb9a145.java) 

   at 
org.apache.tapestry5.services.TapestryModule$22.renderMarkup(TapestryModule.java:1611) 

   at 
$MarkupRenderer_11fefb9a145.renderMarkup($MarkupRenderer_11fefb9a145.java) 

   at 
org.apache.tapestry5.services.TapestryModule$21.renderMarkup(TapestryModule.java:1583) 

   at 
$MarkupRenderer_11fefb9a145.renderMarkup($MarkupRenderer_11fefb9a145.java) 

   at 
org.equanda.t5nav.internal.NavigationDispatcher.renderMarkup(NavigationDispatcher.java:94) 

   at 
$MarkupRenderer_11fefb9a145.renderMarkup($MarkupRenderer_11fefb9a145.java) 

   at 
$MarkupRenderer_11fefb9a142.renderMarkup($MarkupRenderer_11fefb9a142.java) 

   at 
org.apache.tapestry5.internal.services.PageMarkupRendererImpl.renderPageMarkup(PageMarkupRendererImpl.java:64) 

   at 
$PageMarkupRenderer_11fefb9a140.renderPageMarkup($PageMarkupRenderer_11fefb9a140.java) 

   at 
org.apache.tapestry5.internal.services.PageResponseRendererImpl.renderPageResponse(PageResponseRendererImpl.java:61) 

   at 

Re: T5: How to load image Asset from filesystem?

2009-03-10 Thread Peter Kanze
The documentation (http://tapestry.apache.org/tapestry5/guide/assets.html)
tells me to define a new AssetFactory and contribute it to the AssetSource
service configuration.
Yes okay, but how do I implement an AssetFactory? Is there any
documentation?

What do I need to do with public Resource getRootResource() and public Asset
createAsset(Resource resource);
I also looked at ClasspathAssetFactory but don't understand it. The comment
is too minimal.

Can someone help me with this?

Thanks,
Peter!

On Tue, Mar 10, 2009 at 1:59 PM, Peter Kanze peterka...@gmail.com wrote:

 Oke thank you.

 But how do I map between the web http:// and the file D:/ urls?
 Can you give me some (pseudo) code examples how to do this?

 Thanks!
 Peter




 On Tue, Mar 10, 2009 at 1:56 PM, Thiago H. de Paula Figueiredo 
 thiag...@gmail.com wrote:

 On Tue, Mar 10, 2009 at 9:51 AM, Peter Kanze peterka...@gmail.com
 wrote:
  I already searched the archive and found the question, but it is not
 clear
  to me.
  There are no examples in it with a dynamic path..

 You'll use AssetSource for that.

 --
 Thiago

 -
 To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
 For additional commands, e-mail: users-h...@tapestry.apache.org





Re: T5: How to load image Asset from filesystem?

2009-03-10 Thread Andy Pahne



There is a ClasspathAssetFactory and a ContextAssetFactory. A useful 
addition to the framework would be a FilesystemAssetFactory. I am going 
to fill an JIRA issue about it.


The way I did it for classpath resources was very simple, see below. 
Only the first two lines of renderIcon() are relevant for construction 
an asset.


  @BeginRender
   public void renderIcon(MarkupWriter writer) {

   Resource iconResource = new ClasspathResource(BASE_PATH + src);
  
  
   if(assetFactory == null) {

   LOG.warn(assertFactory is null);
   }
  
   if(iconResource == null) {

   LOG.warn(iconResource is null);
   }
   Asset icon = assetFactory.createAsset(iconResource);

   if(icon != null) {

   writer.element(img,
   src, icon.toClientURL(),
   alt, getAlt());

   resources.renderInformalParameters(writer);

   writer.end();

   } else {

   writer.writeRaw(getAlt());

   }

   }



   @Inject @ClasspathProvider
   private AssetFactory assetFactory;

   @BeginRender
   public void renderIcon(MarkupWriter writer) {

   Resource iconResource = new ClasspathResource(BASE_PATH + src);
  Asset icon = assetFactory.createAsset(iconResource);

   if(icon != null) {

   writer.element(img,
   src, icon.toClientURL(),
   alt, getAlt());

   resources.renderInformalParameters(writer);

   writer.end();

   } else {

   writer.writeRaw(getAlt());

   }

   }








Peter Kanze schrieb:

The documentation (http://tapestry.apache.org/tapestry5/guide/assets.html)
tells me to define a new AssetFactory and contribute it to the AssetSource
service configuration.
Yes okay, but how do I implement an AssetFactory? Is there any
documentation?

What do I need to do with public Resource getRootResource() and public Asset
createAsset(Resource resource);
I also looked at ClasspathAssetFactory but don't understand it. The comment
is too minimal.

Can someone help me with this?

Thanks,
Peter!

On Tue, Mar 10, 2009 at 1:59 PM, Peter Kanze peterka...@gmail.com wrote:

  

Oke thank you.

But how do I map between the web http:// and the file D:/ urls?
Can you give me some (pseudo) code examples how to do this?

Thanks!
Peter




On Tue, Mar 10, 2009 at 1:56 PM, Thiago H. de Paula Figueiredo 
thiag...@gmail.com wrote:



On Tue, Mar 10, 2009 at 9:51 AM, Peter Kanze peterka...@gmail.com
wrote:
  

I already searched the archive and found the question, but it is not


clear
  

to me.
There are no examples in it with a dynamic path..


You'll use AssetSource for that.

--
Thiago

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org


  


  



-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: T5: How to load image Asset from filesystem?

2009-03-10 Thread Thiago H. de Paula Figueiredo
On Tue, Mar 10, 2009 at 11:28 AM, Andy Pahne andy.pa...@googlemail.com wrote:
 There is a ClasspathAssetFactory and a ContextAssetFactory. A useful
 addition to the framework would be a FilesystemAssetFactory. I am going to
 fill an JIRA issue about it.

+1 to that. I guess we only have to decide if only one root directory
will be used or more than one.
By the way, nice example. :)

-- 
Thiago

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: T5: How to load image Asset from filesystem?

2009-03-10 Thread Andy Pahne


https://issues.apache.org/jira/browse/TAP5-567




Thiago H. de Paula Figueiredo schrieb:

On Tue, Mar 10, 2009 at 11:28 AM, Andy Pahne andy.pa...@googlemail.com wrote:
  

There is a ClasspathAssetFactory and a ContextAssetFactory. A useful
addition to the framework would be a FilesystemAssetFactory. I am going to
fill an JIRA issue about it.



+1 to that. I guess we only have to decide if only one root directory
will be used or more than one.
By the way, nice example. :)

  



-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: T5: How to load image Asset from filesystem?

2009-03-10 Thread Andy Pahne


The proposed solution in the issue is a bit different. Both is possible, 
I hope the developers pick up the issue and choose a nice solution.


Andy



Andy Pahne schrieb:


https://issues.apache.org/jira/browse/TAP5-567




Thiago H. de Paula Figueiredo schrieb:
On Tue, Mar 10, 2009 at 11:28 AM, Andy Pahne 
andy.pa...@googlemail.com wrote:
 

There is a ClasspathAssetFactory and a ContextAssetFactory. A useful
addition to the framework would be a FilesystemAssetFactory. I am 
going to

fill an JIRA issue about it.



+1 to that. I guess we only have to decide if only one root directory
will be used or more than one.
By the way, nice example. :)

  





-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: about T5 javascript

2009-03-10 Thread Michael Williamson

I'm having problems creating a ZoneManager.  Here are is my code.

Component tml

t:container xmlns:t=http://tapestry.apache.org/schema/tapestry_5_0_0.xsd;
t:zone t:id=vMessage class=errorDiv
p${message}/p
/t:zone
p Check /p
/t:container

container java

package roa.components;

import org.apache.tapestry5.ComponentResources;
import org.apache.tapestry5.Link;
import org.apache.tapestry5.MarkupWriter;
import org.apache.tapestry5.RenderSupport;
import org.apache.tapestry5.annotations.ApplicationState;
import org.apache.tapestry5.annotations.Environmental;
import org.apache.tapestry5.annotations.InjectComponent;
import org.apache.tapestry5.annotations.Parameter;
import org.apache.tapestry5.annotations.Persist;
import org.apache.tapestry5.annotations.Property;
import org.apache.tapestry5.corelib.components.Zone;
import org.apache.tapestry5.ioc.annotations.Inject;

import roa.business.AppObject;
import roa.business.AssemblyPart;
import roa.business.Validation;
import roa.data.VenderInworkAssyParts;


public class ValidateMessage
{
@Property
@Persist
private String message;

@Property
@Persist
private String currentValues;

@ApplicationState
private AppObject appObject;

@InjectComponent
private Zone vMessage;


@Inject
private ComponentResources resources;

@Environmental
private RenderSupport renderSupport;

void afterRender(MarkupWriter writer)
{
Link link = resources.createEventLink(actionFromCheck);
renderSupport.addScript(var validLink =  + link);
}

public Object onActionFromCheck()
{
this.message = New Message;

return vMessage.getBody();
}
}

JavaScript

var element = document.forms[0].all(check);
var zoneObject = Tapestry.findZoneManager(element); 
zoneObject.updateFromURL(validLink); 

the ZoneManager is null.  I have tried serval variations on this code based
on google search. I think I need to remove the ActionLink in the component
tml file and create a new ZoneManager from the zone element and the link but
I can't get that to work ether.


Fernando Padilla wrote:
 
 URL = a url you would build on the serverside using something like:
 resources.createEventLink(  );
 
 
 Let me review the background below.. I hope I don't confuse you too much..
 
 
 Normally:
 
 t:zone id=zoneId/
  activateZone 
 
 
 Generates:Html:
 
 div id=zoneId
 /div
 
  URL activateZone 
 
 
 Generates:Javascript:
 
 1) setup a ZoneManager against the div#zoneId
 2) setup a click listener on the actionlink.. to fetch actionlink URL 
 from tapestry, (which calls the event listener which returns a Block, 
 and then tapestry renders block.. ), once the URL returns, it squirts 
 the contents of the results into the appropriate div#zoneId.
 
 step 2 is basically what Tapestry.activateZone would replace.. so you 
 can do this without relying on an actionlink or form..
 
 
 mwilliam...@kcp.com wrote:
 I would like to use this feature but I can't figure out what url this is.  
 
 Fernando Padilla wrote:
 that said, any committers want to add a simple function for people to 
 use?? something like this:

 Tapestry.activateZone = function( zoneId, url ) {
 var zoneManager = Tapestry.findZoneManagerFromId( zoneId );
 zoneManager.updateFromURL( url );
 }


 Inge Solvoll wrote:
 var zoneObject = Tapestry.findZoneManager(elementConnectedToZone);

 zoneObject.updateFromURL(link);

 On Fri, Mar 6, 2009 at 8:16 AM, Andrea Chiumenti kium...@gmail.com
 wrote:

 Hi to avoid me to read all Tapestry js code, could you tell me waht
 is/are the js Class and method(s) that replace a zone on a xhr call ?

 Thanks,
 kiuma

 -
 To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
 For additional commands, e-mail: users-h...@tapestry.apache.org


 -
 To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
 For additional commands, e-mail: users-h...@tapestry.apache.org



 Quoted from: 
 http://www.nabble.com/about-T5-javascript-tp22367350p22400998.html
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
 For additional commands, e-mail: users-h...@tapestry.apache.org
 
 
 

-- 
View this message in context: 
http://www.nabble.com/about-T5-javascript-tp22367350p22436222.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



t5: lengthy process and hibernate connection with c3p0

2009-03-10 Thread Angelo Chen

Hi,

In my T5 app, I start a quartz job where I do following:

1) obtain info from database
2) do some lengthy thing here
3) update the database
4) if not end go back to 2
5) commit

This trigger some exceptions from Hibernate, it complains that a connection
is not valid as it might have been closed by c3p0. Now I'd like to change
this to something like this:

1) obtain info from database, close the connection
2) so some lengthy thing 
3) open a connection to update the database, close it
4) if not end go back to 2

I'd like to use HibernateSessionManager, but it seems to me it still
maintain a transaction even I call commit or abort, any idea? THanks,

Angelo


-- 
View this message in context: 
http://www.nabble.com/t5%3A-lengthy-process-and-hibernate-connection-with-c3p0-tp22436516p22436516.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: T5: How to load image Asset from filesystem?

2009-03-10 Thread Andy Pahne



I don't know much about the details how you contribute your 
FilesystemAssetFactory. Never had time to take a briefer look at 
tapestry-ioc.


Please note: in the previous example the AssetFactory is injected like this:

@Inject @ClasspathProvider
private AssetFactory assetFactory;


The @ClasspathProvider is necessary, so that tapestry-ioc knows, which of the 
different implementations to inject.

Maybe, in order to make your solution work, you need to give a hint like that, 
too?


Andy










Peter Kanze schrieb:

Hi Andy,

Thanks for adding this to Jira.
See below my code what I have produced so far. The problem is that I now see
the complete filepath in my html source (img src=
C:/tmp/pictures/8/71/1001/thumb1.jpg alt=/)
I don't want the complete file url in my html source. How can I fix this.
And how do I map the html url to the file url?
The last problem is that the file url is correct, but the image is not shown
in my html page.
What am I doing wrong?


--Quick Example Code Below---

img src=${ThumbnailPath} alt= /

public String getThumbnailPath() {
 Asset asset = assetSource.getAsset(null,
file:/8/71/1001/thumb1.jpg, null);
 return asset.toClientURL();
}

public class FileSystemResource extends AbstractResource {

private static final int PRIME = 37;

public FileSystemResource(String path) {
super(path);
}

@Override
protected Resource newResource(String path) {
return new FileSystemResource(path);
}

@Override
public URL toURL() {
String filePath = getPath();
File file = new File(filePath);

if (file != null  file.exists()) {
try {
return file.toURL();
}
catch (MalformedURLException ex) {
throw new RuntimeException(ex);
}
}
return null;
}
}

public class FileSystemAssetFactory implements AssetFactory {

private static final String assetPath = /images/;

public FileSystemAssetFactory() {

}

   @Override
public Resource getRootResource() {
return new FileSystemResource(C:/tmp/pictures/);
}

@Override
public Asset createAsset(final Resource resource) {
final String filePath =  resource.getPath();

return new Asset()
{
public Resource getResource()
{
return resource;
}

public String toClientURL()
{
return filePath;
}

/**
 * Returns the client URL, which is essiential to allow informal
parameters of type
 * Asset to generate a proper value.
 */
@Override
public String toString()
{
return toClientURL();
}
};
}



}

//In AppModule.java
public AssetFactory buildfileSystemAssetFactory() {
return new FileSystemAssetFactory();
}

public void contributeAssetSource(MappedConfigurationString,
AssetFactory configuration,
@InjectService(fileSystemAssetFactory) AssetFactory
fileSystemAssetFactory) {
configuration.add(file, fileSystemAssetFactory);
}



On Tue, Mar 10, 2009 at 3:28 PM, Andy Pahne andy.pa...@googlemail.comwrote:

  

There is a ClasspathAssetFactory and a ContextAssetFactory. A useful
addition to the framework would be a FilesystemAssetFactory. I am going to
fill an JIRA issue about it.

The way I did it for classpath resources was very simple, see below. Only
the first two lines of renderIcon() are relevant for construction an asset.

 @BeginRender
  public void renderIcon(MarkupWriter writer) {

  Resource iconResource = new ClasspathResource(BASE_PATH + src);
  if(assetFactory == null) {
  LOG.warn(assertFactory is null);
  }
if(iconResource == null) {
  LOG.warn(iconResource is null);
  }
  Asset icon = assetFactory.createAsset(iconResource);

  if(icon != null) {

  writer.element(img,
  src, icon.toClientURL(),
  alt, getAlt());

  resources.renderInformalParameters(writer);

  writer.end();

  } else {

  writer.writeRaw(getAlt());

  }

  }



  @Inject @ClasspathProvider
  private AssetFactory assetFactory;

  @BeginRender
  public void renderIcon(MarkupWriter writer) {

  Resource iconResource = new ClasspathResource(BASE_PATH + src);
 Asset icon = assetFactory.createAsset(iconResource);

  if(icon != null) {

  writer.element(img,
  src, icon.toClientURL(),
  alt, getAlt());

  resources.renderInformalParameters(writer);

  writer.end();

  } else {

  writer.writeRaw(getAlt());

  }

  }








Peter Kanze schrieb:

 The documentation (http://tapestry.apache.org/tapestry5/guide/assets.html


)
tells me to define a new AssetFactory and contribute it to the 

Re: T5: How to load image Asset from filesystem?

2009-03-10 Thread Andy Pahne


Anyway you are right: exposing the full path in the html source is 
certainly not a good idea.



Peter Kanze schrieb:

Hi Andy,

Thanks for adding this to Jira.
See below my code what I have produced so far. The problem is that I now see
the complete filepath in my html source (img src=
C:/tmp/pictures/8/71/1001/thumb1.jpg alt=/)
I don't want the complete file url in my html source. How can I fix this.
And how do I map the html url to the file url?
The last problem is that the file url is correct, but the image is not shown
in my html page.
What am I doing wrong?
  



-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



T5: Tabset and expired Sessions

2009-03-10 Thread olip

Hi everyone,

Is there a way to deal with expired sessions when you click on a tab from
the component Tabset and it has already expired?
It throws me some Rendering phase errors because all of the server-side data
is lost.
I am using the new tabset class from chenillekit.

I tried the tips from this forum to redirect to the login page in your
dispatcher but the dispatch() is not called/or called after the exception
was thrown (think this is ajax related).
Thank you for your help
Oliver
-- 
View this message in context: 
http://n2.nabble.com/T5%3A-Tabset-and-expired-Sessions-tp2456002p2456002.html
Sent from the Tapestry Users mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



[5.1.0.1]How to use multiple zone refresh

2009-03-10 Thread Yannick Martel
Hi!

I want to refresh two or more blocks in my UI. With the current stable
version, I have seen it is not possible, but it is fixed on 5.1.0.1
version [1].

In the issue ticket, there is a little example, but I don't understand
exactly how does it work in practical terms (with a tml).

Can somebody help me ?

[1] https://issues.apache.org/jira/browse/TAP5-108

-- 
Yannick mar...@codelutin.com

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: [5.1.0.1]How to use multiple zone refresh

2009-03-10 Thread Howard Lewis Ship
Did this documentation:

http://tapestry.formos.com/nightly/tapestry5/guide/ajax.html

help?

On Tue, Mar 10, 2009 at 8:54 AM, Yannick Martel mar...@codelutin.com wrote:
 Hi!

 I want to refresh two or more blocks in my UI. With the current stable
 version, I have seen it is not possible, but it is fixed on 5.1.0.1
 version [1].

 In the issue ticket, there is a little example, but I don't understand
 exactly how does it work in practical terms (with a tml).

 Can somebody help me ?

 [1] https://issues.apache.org/jira/browse/TAP5-108

 --
 Yannick mar...@codelutin.com

 -
 To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
 For additional commands, e-mail: users-h...@tapestry.apache.org





-- 
Howard M. Lewis Ship

Creator Apache Tapestry and Apache HiveMind

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Ranndom Exceptions

2009-03-10 Thread Tony Giaccone
Our application is deployed, and works most of the time flawlessly. However,
occasionally we throw exceptions. Usually I get the error
Message, “Unable to convert back into an object in If Component”

I’m really at a loss to understand how to diagnose and fix this problem.
The page displays data from a document. Usually  the data from the document
displays correctly. And I’ve been unable to determine what conditions cause
this error to occur.

I have a whole exception page, and it’s full of information. What is not
clear to me, is how to use that information to diagnose this problem.

Can anyone provide me with some insights?



Tony Giaccone
Lead Developer MIPR



Exception: Unable to convert back into an object in If component. 
https://mipr-dev/mipr/MiprDetail,miprForm.sdirect#
org.apache.hivemind.ApplicationRuntimeException
component:   $ifbean...@997d372c[miprdetail/$If_16]
location:context:/WEB-INF/MiprDetail.html, line 1225

1220 /tr
1221 /tbody
1222 /table
1223/td
1224   /tr
1225  span jwcid=@If condition=ognl:docHasFundCites 
1226   tr jwcid=FundCiteFor
1227td
1228 table border=0
1229 tbody
1230  TR

[ +/- ] Exception: Unable to convert back into a boolean in If component. 
https://mipr-dev/mipr/MiprDetail,miprForm.sdirect#
org.apache.hivemind.ApplicationRuntimeException
Stack Trace:
org.apache.tapestry.components.IfBean.readValue(IfBean.java:184)
org.apache.tapestry.components.IfBean.evaluateCondition(IfBean.java:143)
org.apache.tapestry.components.IfBean.renderComponent(IfBean.java:66)

 Reply

Forward


Re: about T5 javascript

2009-03-10 Thread Fernando Padilla

https://issues.apache.org/jira/browse/TAP5-569

here, this bug has more js that you should include.  Then you can just use:

Tapestry.activateZone( vMessage, validLink );


On 3/10/09 8:03 AM, Michael Williamson wrote:

I'm having problems creating a ZoneManager.  Here are is my code.

Component tml

t:container xmlns:t=http://tapestry.apache.org/schema/tapestry_5_0_0.xsd;
t:zone t:id=vMessage class=errorDiv
p${message}/p
/t:zone
p  Check/p
/t:container

container java

package roa.components;

import org.apache.tapestry5.ComponentResources;
import org.apache.tapestry5.Link;
import org.apache.tapestry5.MarkupWriter;
import org.apache.tapestry5.RenderSupport;
import org.apache.tapestry5.annotations.ApplicationState;
import org.apache.tapestry5.annotations.Environmental;
import org.apache.tapestry5.annotations.InjectComponent;
import org.apache.tapestry5.annotations.Parameter;
import org.apache.tapestry5.annotations.Persist;
import org.apache.tapestry5.annotations.Property;
import org.apache.tapestry5.corelib.components.Zone;
import org.apache.tapestry5.ioc.annotations.Inject;

import roa.business.AppObject;
import roa.business.AssemblyPart;
import roa.business.Validation;
import roa.data.VenderInworkAssyParts;


public class ValidateMessage
{
@Property
@Persist
private String message;

@Property
@Persist
private String currentValues;

@ApplicationState
private AppObject appObject;

@InjectComponent
private Zone vMessage;


@Inject
 private ComponentResources resources;

 @Environmental
 private RenderSupport renderSupport;

 void afterRender(MarkupWriter writer)
 {
 Link link = resources.createEventLink(actionFromCheck);
 renderSupport.addScript(var validLink =  + link);
 }

public Object onActionFromCheck()
{
this.message = New Message;

return vMessage.getBody();
}
}

JavaScript

var element = document.forms[0].all(check);
var zoneObject = Tapestry.findZoneManager(element);
zoneObject.updateFromURL(validLink);

the ZoneManager is null.  I have tried serval variations on this code based
on google search. I think I need to remove the ActionLink in the component
tml file and create a new ZoneManager from the zone element and the link but
I can't get that to work ether.


Fernando Padilla wrote:

URL = a url you would build on the serverside using something like:
resources.createEventLink(  );


Let me review the background below.. I hope I don't confuse you too much..


Normally:

t:zone id=zoneId/
  activateZone


Generates:Html:

div id=zoneId
/div

  URL activateZone


Generates:Javascript:

1) setup a ZoneManager against the div#zoneId
2) setup a click listener on the actionlink.. to fetch actionlink URL
from tapestry, (which calls the event listener which returns a Block,
and then tapestry renders block.. ), once the URL returns, it squirts
the contents of the results into the appropriate div#zoneId.

step 2 is basically what Tapestry.activateZone would replace.. so you
can do this without relying on an actionlink or form..


mwilliam...@kcp.com wrote:

I would like to use this feature but I can't figure out what url this is.

Fernando Padilla wrote:

that said, any committers want to add a simple function for people to
use?? something like this:

Tapestry.activateZone = function( zoneId, url ) {
var zoneManager = Tapestry.findZoneManagerFromId( zoneId );
zoneManager.updateFromURL( url );
}


Inge Solvoll wrote:

var zoneObject = Tapestry.findZoneManager(elementConnectedToZone);

zoneObject.updateFromURL(link);

On Fri, Mar 6, 2009 at 8:16 AM, Andrea Chiumentikium...@gmail.com
wrote:


Hi to avoid me to read all Tapestry js code, could you tell me waht
is/are the js Class and method(s) that replace a zone on a xhr call ?

Thanks,
kiuma

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org




Quoted from:
http://www.nabble.com/about-T5-javascript-tp22367350p22400998.html


-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org







-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: [5.1.0.0] Exception sorting a Grid with AJAX

2009-03-10 Thread Howard Lewis Ship
I'd love to know how to reproduce this!

On Tue, Mar 10, 2009 at 6:28 AM, Thiago H. de Paula Figueiredo
thiag...@gmail.com wrote:
 Hi!

 Trying 5.1.0.0, I've had a new exception (i.e. I couldn't find it on
 JIRA or in this mailing list) when clicking a sorting link in a Grid
 with inplace=true. I've tried with and without
 xmlns=http://www.w3.org/1999/xhtml; in the html tag. It also happens
 when I submit a form with AJAX.

 The stack trace is below.

 java.lang.NullPointerException
        at java.util.HashMap.init(HashMap.java:223)
        at 
 org.apache.tapestry5.ioc.internal.util.CollectionFactory.newMap(CollectionFactory.java:77)
        at org.apache.tapestry5.dom.MapHolder.getMutable(MapHolder.java:51)
        at org.apache.tapestry5.dom.MapHolder.putAll(MapHolder.java:60)
        at 
 org.apache.tapestry5.dom.Element.createNamespaceURIToPrefix(Element.java:584)
        at org.apache.tapestry5.dom.Element.toMarkup(Element.java:294)
        at org.apache.tapestry5.dom.Node.writeChildMarkup(Node.java:104)
        at org.apache.tapestry5.dom.Element.toMarkup(Element.java:348)
        at org.apache.tapestry5.dom.Node.writeChildMarkup(Node.java:104)
        at org.apache.tapestry5.dom.Element.toMarkup(Element.java:348)
        at org.apache.tapestry5.dom.Node.writeChildMarkup(Node.java:104)
        at org.apache.tapestry5.dom.Element.toMarkup(Element.java:348)
        at org.apache.tapestry5.dom.Node.writeChildMarkup(Node.java:104)
        at org.apache.tapestry5.dom.Element.toMarkup(Element.java:348)
        at org.apache.tapestry5.dom.Node.writeChildMarkup(Node.java:104)
        at org.apache.tapestry5.dom.Element.toMarkup(Element.java:348)
        at org.apache.tapestry5.dom.Node.writeChildMarkup(Node.java:104)
        at org.apache.tapestry5.dom.Node.getChildMarkup(Node.java:114)
        at 
 org.apache.tapestry5.internal.services.PageRenderQueueImpl.renderPartial(PageRenderQueueImpl.java:163)
        at 
 $PageRenderQueue_11ff088590c.renderPartial($PageRenderQueue_11ff088590c.java)
        at 
 $PageRenderQueue_11ff088590b.renderPartial($PageRenderQueue_11ff088590b.java)
        at 
 org.apache.tapestry5.internal.services.PartialMarkupRendererTerminator.renderMarkup(PartialMarkupRendererTerminator.java:39)

 --
 Thiago

 -
 To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
 For additional commands, e-mail: users-h...@tapestry.apache.org





-- 
Howard M. Lewis Ship

Creator Apache Tapestry and Apache HiveMind

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



img tag (src)

2009-03-10 Thread Luther Baker
If I am storing an image in the database - and would like to display it in
response to

   img src=images/get/01/

I've implemented the following examples:

http://wiki.apache.org/tapestry/Tapestry5HowToStreamAnExistingBinaryFile
http://wiki.apache.org/tapestry/Tapestry5HowToCreateADynamicPDF

and I've got that work fine with something like

Object onActionFromX()
{
}

but what about rendering this image inline? I think I would want to
implement a render lifecycle method ... ? Does that sound correct?

It seems that these all return boolean -
http://tapestry.apache.org/tapestry5/guide/rendering.html -

Am I'm looking for a render method that returns an Object - and stops the
rest of the lifecycle?

Thanks in advance,

-Luther


Re: @Meta(tapestry.persistence-strategy=client)

2009-03-10 Thread Borut Bolčina
Hi,

back to this...

Following your suggestion, this is the dump:

at
bb.test.session.MyHttpSessionListener.sessionCreated(MyHttpSessionListener.java:15)
at
org.mortbay.jetty.servlet.AbstractSessionManager.addSession(AbstractSessionManager.java:574)
at
org.mortbay.jetty.servlet.AbstractSessionManager.newHttpSession(AbstractSessionManager.java:415)
at org.mortbay.jetty.Request.getSession(Request.java:1115)
at
org.apache.tapestry5.internal.services.RequestImpl.getSession(RequestImpl.java:99)
at $Request_11ff20aaf14.getSession($Request_11ff20aaf14.java)
at $Request_11ff20aaee2.getSession($Request_11ff20aaee2.java)
at
org.apache.tapestry5.internal.services.AbstractSessionPersistentFieldStrategy.postChange(AbstractSessionPersistentFieldStrategy.java:124)
at
org.apache.tapestry5.internal.services.PersistentFieldManagerImpl.postChange(PersistentFieldManagerImpl.java:85)
at
$PersistentFieldManager_11ff20aaf1a.postChange($PersistentFieldManager_11ff20aaf1a.java)
at
org.apache.tapestry5.internal.structure.PageImpl.persistFieldChange(PageImpl.java:192)
at
org.apache.tapestry5.internal.structure.InternalComponentResourcesImpl.persistFieldChange(InternalComponentResourcesImpl.java:257)
at
org.apache.tapestry5.corelib.components.Form._$write_defaultTracker(Form.java)
at
org.apache.tapestry5.corelib.components.Form.getDefaultTracker(Form.java:222)
at $PropertyConduit_11ff20aaf42.get($PropertyConduit_11ff20aaf42.java)
at
org.apache.tapestry5.internal.bindings.PropBinding.get(PropBinding.java:53)
at
org.apache.tapestry5.internal.structure.InternalComponentResourcesImpl.readParameter(InternalComponentResourcesImpl.java:284)
at
org.apache.tapestry5.internal.structure.InternalComponentResourcesImpl.readParameter(InternalComponentResourcesImpl.java:315)
at
org.apache.tapestry5.corelib.components.Form._$read_parameter_tracker(Form.java)
at
org.apache.tapestry5.corelib.components.Form.beginRender(Form.java:256)
at org.apache.tapestry5.corelib.components.Form.beginRender(Form.java)
at
org.apache.tapestry5.internal.structure.ComponentPageElementImpl$11$1.run(ComponentPageElementImpl.java:352)
at
org.apache.tapestry5.internal.structure.ComponentPageElementImpl.invoke(ComponentPageElementImpl.java:925)
at
org.apache.tapestry5.internal.structure.ComponentPageElementImpl.access$200(ComponentPageElementImpl.java:50)
at
org.apache.tapestry5.internal.structure.ComponentPageElementImpl$11.render(ComponentPageElementImpl.java:356)
at
org.apache.tapestry5.internal.services.RenderQueueImpl.run(RenderQueueImpl.java:72)
at
org.apache.tapestry5.internal.services.PageRenderQueueImpl.render(PageRenderQueueImpl.java:121)
at
$PageRenderQueue_11ff20aaf52.render($PageRenderQueue_11ff20aaf52.java)
at
$PageRenderQueue_11ff20aaf4a.render($PageRenderQueue_11ff20aaf4a.java)
at
org.apache.tapestry5.services.TapestryModule$19.renderMarkup(TapestryModule.java:1200)
at
org.apache.tapestry5.services.TapestryModule$29.renderMarkup(TapestryModule.java:1580)
at
$MarkupRenderer_11ff20aaf56.renderMarkup($MarkupRenderer_11ff20aaf56.java)
at
org.apache.tapestry5.services.TapestryModule$28.renderMarkup(TapestryModule.java:1561)
at
$MarkupRenderer_11ff20aaf56.renderMarkup($MarkupRenderer_11ff20aaf56.java)
at
org.apache.tapestry5.services.TapestryModule$27.renderMarkup(TapestryModule.java:1543)
at
$MarkupRenderer_11ff20aaf56.renderMarkup($MarkupRenderer_11ff20aaf56.java)
at
org.apache.tapestry5.services.TapestryModule$26.renderMarkup(TapestryModule.java:1525)
at
$MarkupRenderer_11ff20aaf56.renderMarkup($MarkupRenderer_11ff20aaf56.java)
at
org.apache.tapestry5.services.TapestryModule$25.renderMarkup(TapestryModule.java:1495)
at
$MarkupRenderer_11ff20aaf56.renderMarkup($MarkupRenderer_11ff20aaf56.java)
at
$MarkupRenderer_11ff20aaf50.renderMarkup($MarkupRenderer_11ff20aaf50.java)
at
org.apache.tapestry5.internal.services.PageMarkupRendererImpl.renderPageMarkup(PageMarkupRendererImpl.java:64)
at
$PageMarkupRenderer_11ff20aaf4e.renderPageMarkup($PageMarkupRenderer_11ff20aaf4e.java)
at
org.apache.tapestry5.internal.services.PageResponseRendererImpl.renderPageResponse(PageResponseRendererImpl.java:57)
at
$PageResponseRenderer_11ff20aaf0f.renderPageResponse($PageResponseRenderer_11ff20aaf0f.java)
at
org.apache.tapestry5.internal.services.PageRenderRequestHandlerImpl.handle(PageRenderRequestHandlerImpl.java:59)
at
org.apache.tapestry5.services.TapestryModule$35.handle(TapestryModule.java:1779)
at
$PageRenderRequestHandler_11ff20aaf10.handle($PageRenderRequestHandler_11ff20aaf10.java)
at
$PageRenderRequestHandler_11ff20aaf03.handle($PageRenderRequestHandler_11ff20aaf03.java)
at
org.apache.tapestry5.internal.services.PageRenderDispatcher.process(PageRenderDispatcher.java:92)
at
org.apache.tapestry5.internal.services.PageRenderDispatcher.dispatch(PageRenderDispatcher.java:81)

Re: img tag (src)

2009-03-10 Thread Christine
Hi,
may I suggest that the tutorial on tapestry.apache.org (tutorial1) be
updated? The mvn create command doesn't work for me as it is now,
maven suggested I use generate, but then you need some additional info
to make it work properly. This would make life easier for newbies - like
me.
Maybe this has been suggested before, couldn't find it in the archives.
I'm willing to provide the new chunks of text.

dagdag
Christine


-- 
dagdag is just a two character rotation of byebye
www.christine.nl



smime.p7s
Description: S/MIME Cryptographic Signature


Random Exceptions continued....

2009-03-10 Thread Tony Giaccone
it was mentioned to me that I hadn't mentioned in my earlier post that this
was a Tapestry 4.1.5 problem.

Also further diagnosis shows that there seems to be a problem with the @IF
component.

Here's the code the If is bound to:

public boolean getDocHasFundCites()
{
boolean retValue= false;
if (getDetailFD() != null)
{
retValue = (getDetailFD().getFundCites() != null) 
(getDetailFD().getFundCites().size()  0);
}
return (retValue);
}


In the page from the exception there's the HttpServletRequest  stanza,

among the many IF statements that are called out, well here I'll just copy
the significant lines.

If_14_0 T
If_15_0 T
If_16_0
If_18   F
If_1_0  F
If_20   F
If_22   T

Notice on the line that start If_16_0, there is no boolean value, no T or F.


I'm guessing that is what's causing this exception:

[ +/- ] Exception: Unable to convert back into a boolean in If component. 
https://mipr-dev/mipr/MiprDetail,miprForm.sdirect#
org.apache.hivemind.ApplicationRuntimeException
Stack Trace:
org.apache.tapestry.components.IfBean.readValue(IfBean.java:184)
org.apache.tapestry.components.IfBean.evaluateCondition(IfBean.java:143)
org.apache.tapestry.components.IfBean.renderComponent(IfBean.java:66)
org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:724)


This code works the vast majority of the time. These exceptions seem to be
thrown randomly. Of course I'm sure that it's not
random, I just don't know what set of circumstances cause it to occur.
Here's the code from the Tapestry Frameworks that's
throwing the exception:

Object valueObject =
getDataSqueezer().unsqueeze(submittedValue);
if (!(valueObject instanceof Boolean))
throw new
ApplicationRuntimeException(Tapestry.format(If.invalid-condition-type,
submittedValue));
return ((Boolean) valueObject).booleanValue();

I haven't gone deep enough in the process to know if the unsqueeze is
throwing the exception or if it's the exception
thrown after the if instanceof.


Any suggestions or ideas??


Tony Giaccone


Re: 5.1 Parameter namespacePrefix was null

2009-03-10 Thread Joachim Van der Auwera

I seem to have found the cause of the problem.
This application is also using CXF, and this brought with it an older 
version of the woodstoc library. Replacing that with tapestry's 
preferred version seems to have fixed it.


Thanks,
Joachim


Joachim Van der Auwera wrote:

Thanks for the help.
I have seen a note in jira, but that wasn't very helpful either.
What makes it strange is that I don't have the 
http://www.w3.org/1999/xhtml; anywhere in my project, or in my 
components. I am using chenillekit, but that only seems to contain 
such a namespace in a component I am not using. I honoustly don't know 
what I should try to change or rebuild to get rid of this error.


Joachim

Andy Pahne wrote:


There have been two separate threads dealing with this and a few 
users (including me) experiencing this. But as far as I remember, no 
solution has been found yet.


The problem disappeared for me, but I don't know how. What I did was 
a bit desperate: I had a feeling that one of my abstract base classes 
was causing this. So I rebuilt it from zero step by step, in order to 
find out what caused the problem. I ended up with the exact base 
class than before, but the error was never seen again.


I also played around with the configuration settings for production 
mode, reconfigured the used exception page and things like that.


Unfortunatly I don't think that this will help you much.

Andy



Joachim Van der Auwera schrieb:
Does anybody know where the following Parameter namespacePrefix was 
null error comes from (and better, how to fix).


I upgrading my application from 5.0.18 to 5.1.0.0 and now get this 
error.


What is extremely wierd is that the template did indeed contain

html xmlns=http://www.w3.org/1999/xhtml; 
xmlns:t=http://tapestry.apache.org/schema/tapestry_5_0_0.xsd;


(which seems perfectly valid to me) but changing that to

html xmlns:t=http://tapestry.apache.org/schema/tapestry_5_0_0.xsd;

and a clean build didn't even seem to make a difference...
Now there is no http://www.w3.org/1999/xhtml; anywhere in my code, 
so I don't know where it comes from...


Any ideas?

Thanks,
Joachim


2009-03-10 10:32:43,613 ERROR 
[tapestry.render.be.synergetics.ca.gui.pages.Login] Render queue 
error in CompositeRenderCommand[Start[http://www.w3.org/1999/xhtml 
html], DefineNamespace[null http://www.w3.org/1999/xhtml], 
Start[http://www.w3.org/1999/xhtml head], 
Start[http://www.w3.org/1999/xhtml title]]: Parameter 
namespacePrefix was null.

java.lang.IllegalArgumentException: Parameter namespacePrefix was null.
   at 
org.apache.tapestry5.ioc.internal.util.Defense.notNull(Defense.java:37)
   at 
org.apache.tapestry5.dom.Element.defineNamespace(Element.java:519)
   at 
org.apache.tapestry5.internal.services.MarkupWriterImpl.defineNamespace(MarkupWriterImpl.java:221) 

   at 
org.apache.tapestry5.internal.pageload.PageLoaderImpl$4.render(PageLoaderImpl.java:341) 

   at 
org.apache.tapestry5.internal.pageload.CompositeRenderCommand.render(CompositeRenderCommand.java:68) 

   at 
org.apache.tapestry5.internal.services.RenderQueueImpl.run(RenderQueueImpl.java:74) 

   at 
org.apache.tapestry5.internal.services.PageRenderQueueImpl.render(PageRenderQueueImpl.java:121) 

   at 
$PageRenderQueue_11fefb9a143.render($PageRenderQueue_11fefb9a143.java)
   at 
$PageRenderQueue_11fefb9a0a0.render($PageRenderQueue_11fefb9a0a0.java)
   at 
org.apache.tapestry5.internal.services.MarkupRendererTerminator.renderMarkup(MarkupRendererTerminator.java:37) 

   at 
org.apache.tapestry5.services.TapestryModule$26.renderMarkup(TapestryModule.java:1676) 

   at 
$MarkupRenderer_11fefb9a145.renderMarkup($MarkupRenderer_11fefb9a145.java) 

   at 
org.apache.tapestry5.services.TapestryModule$25.renderMarkup(TapestryModule.java:1657) 

   at 
$MarkupRenderer_11fefb9a145.renderMarkup($MarkupRenderer_11fefb9a145.java) 

   at 
org.apache.tapestry5.services.TapestryModule$24.renderMarkup(TapestryModule.java:1639) 

   at 
$MarkupRenderer_11fefb9a145.renderMarkup($MarkupRenderer_11fefb9a145.java) 

   at 
org.apache.tapestry5.services.TapestryModule$23.renderMarkup(TapestryModule.java:1625) 

   at 
$MarkupRenderer_11fefb9a145.renderMarkup($MarkupRenderer_11fefb9a145.java) 

   at 
org.apache.tapestry5.services.TapestryModule$22.renderMarkup(TapestryModule.java:1611) 

   at 
$MarkupRenderer_11fefb9a145.renderMarkup($MarkupRenderer_11fefb9a145.java) 

   at 
org.apache.tapestry5.services.TapestryModule$21.renderMarkup(TapestryModule.java:1583) 

   at 
$MarkupRenderer_11fefb9a145.renderMarkup($MarkupRenderer_11fefb9a145.java) 

   at 
org.equanda.t5nav.internal.NavigationDispatcher.renderMarkup(NavigationDispatcher.java:94) 

   at 
$MarkupRenderer_11fefb9a145.renderMarkup($MarkupRenderer_11fefb9a145.java) 

   at 
$MarkupRenderer_11fefb9a142.renderMarkup($MarkupRenderer_11fefb9a142.java) 

   at 
org.apache.tapestry5.internal.services.PageMarkupRendererImpl.renderPageMarkup(PageMarkupRendererImpl.java:64) 

   at 

problem with Secure configuration

2009-03-10 Thread Joachim Van der Auwera
I am upgrading to from 5.0.18 to 5.1.0.0 and have a problem with secure 
pages.


My application is configured to run entirely on https. This was done by 
adding the following in my application module:


   public static void contributeMetaDataLocator( 
MappedConfigurationString, String configuration )

   {
   configuration.add( MetaDataConstants.SECURE_PAGE, true );
   }

However, all links, forms etc want to redirect to http instead of https.
I have tried both using no configuration and using both
-Dtapestry.production-mode=false -Dtapestry.secure-enabled=true

But it doesn't seem to make a difference.

Any ideas what I am doing wrong?

Thanks,
Joachim

--
Joachim Van der Auwera
PROGS bvba, progs.be


-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



T5: how to add tuckey url rewrite filter to Tapestry Context

2009-03-10 Thread Britske

I saw a recent post about setting up Tuckey url-rewrite filter to set up some
url rewriting in conjuction with Tapestry so decided to try it out. 

All works fine when using 'redirects':
rule
   from/test/from
to type=redirect/zoeken/to
/rule


However the real power (in my opinion) comes with forwarding url's so that
the url's in the browser window do not change, like so:
rule
   from/test/from
to/zoeken/to
/rule

localhost:8080/zoeken maps to a page 'zoeken' in Tapestry.

When setting a rewrite rule from redirect to forward (which is the default)
the filter can't find the resource to rewrite to anymore. 

According to the rewrite manual at: http://tuckey.org/urlrewrite/manual/2.6/
this happens when: the to URL is not in the same context as
UrlRewriteFilter.

So I'm guessing that's what causing the problems here. The problem is that I
don't have a clue where to put the UrlRewriteFilter so it is included in the
same context as my tapestry app. 


Currently, UrlRewriteFilter is supplied as a .jar in a /lib folder within
the WEB-INF folder (which is the correct place according to the rewrite
manual) Web.xml correctly locates and initalizes the filter so that part
works fine. 

SO I'm left with the question: were do I put this .jar file so it will be
included in the 'Tapestry' web context?

I'm using Tomcat 5.5 btw since this might be related to that as well. I'm
just not sure. Probably usless info: the context of this tapestry app is
ROOT (which maps to the default in Tomcat) 

Anyone?

Thanks, 
Britske


-- 
View this message in context: 
http://www.nabble.com/T5%3A-how-to-add-tuckey-url-rewrite-filter-to-Tapestry-Context-tp22443644p22443644.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: 5.1 Parameter namespacePrefix was null

2009-03-10 Thread Andy Pahne



Nice catch. In deed my application is using woodstox, too. But I did not 
change anything about my dependencies.


Andy



Joachim Van der Auwera schrieb:

I seem to have found the cause of the problem.
This application is also using CXF, and this brought with it an older 
version of the woodstoc library. Replacing that with tapestry's 
preferred version seems to have fixed it.


Thanks,
Joachim


Joachim Van der Auwera wrote:

Thanks for the help.
I have seen a note in jira, but that wasn't very helpful either.
What makes it strange is that I don't have the 
http://www.w3.org/1999/xhtml; anywhere in my project, or in my 
components. I am using chenillekit, but that only seems to contain 
such a namespace in a component I am not using. I honoustly don't 
know what I should try to change or rebuild to get rid of this error.


Joachim

Andy Pahne wrote:


There have been two separate threads dealing with this and a few 
users (including me) experiencing this. But as far as I remember, no 
solution has been found yet.


The problem disappeared for me, but I don't know how. What I did was 
a bit desperate: I had a feeling that one of my abstract base 
classes was causing this. So I rebuilt it from zero step by step, in 
order to find out what caused the problem. I ended up with the exact 
base class than before, but the error was never seen again.


I also played around with the configuration settings for production 
mode, reconfigured the used exception page and things like that.


Unfortunatly I don't think that this will help you much.

Andy



Joachim Van der Auwera schrieb:
Does anybody know where the following Parameter namespacePrefix 
was null error comes from (and better, how to fix).


I upgrading my application from 5.0.18 to 5.1.0.0 and now get this 
error.


What is extremely wierd is that the template did indeed contain

html xmlns=http://www.w3.org/1999/xhtml; 
xmlns:t=http://tapestry.apache.org/schema/tapestry_5_0_0.xsd;


(which seems perfectly valid to me) but changing that to

html xmlns:t=http://tapestry.apache.org/schema/tapestry_5_0_0.xsd;

and a clean build didn't even seem to make a difference...
Now there is no http://www.w3.org/1999/xhtml; anywhere in my code, 
so I don't know where it comes from...


Any ideas?

Thanks,
Joachim


2009-03-10 10:32:43,613 ERROR 
[tapestry.render.be.synergetics.ca.gui.pages.Login] Render queue 
error in CompositeRenderCommand[Start[http://www.w3.org/1999/xhtml 
html], DefineNamespace[null http://www.w3.org/1999/xhtml], 
Start[http://www.w3.org/1999/xhtml head], 
Start[http://www.w3.org/1999/xhtml title]]: Parameter 
namespacePrefix was null.
java.lang.IllegalArgumentException: Parameter namespacePrefix was 
null.
   at 
org.apache.tapestry5.ioc.internal.util.Defense.notNull(Defense.java:37) 

   at 
org.apache.tapestry5.dom.Element.defineNamespace(Element.java:519)
   at 
org.apache.tapestry5.internal.services.MarkupWriterImpl.defineNamespace(MarkupWriterImpl.java:221) 

   at 
org.apache.tapestry5.internal.pageload.PageLoaderImpl$4.render(PageLoaderImpl.java:341) 

   at 
org.apache.tapestry5.internal.pageload.CompositeRenderCommand.render(CompositeRenderCommand.java:68) 

   at 
org.apache.tapestry5.internal.services.RenderQueueImpl.run(RenderQueueImpl.java:74) 

   at 
org.apache.tapestry5.internal.services.PageRenderQueueImpl.render(PageRenderQueueImpl.java:121) 

   at 
$PageRenderQueue_11fefb9a143.render($PageRenderQueue_11fefb9a143.java)
   at 
$PageRenderQueue_11fefb9a0a0.render($PageRenderQueue_11fefb9a0a0.java)
   at 
org.apache.tapestry5.internal.services.MarkupRendererTerminator.renderMarkup(MarkupRendererTerminator.java:37) 

   at 
org.apache.tapestry5.services.TapestryModule$26.renderMarkup(TapestryModule.java:1676) 

   at 
$MarkupRenderer_11fefb9a145.renderMarkup($MarkupRenderer_11fefb9a145.java) 

   at 
org.apache.tapestry5.services.TapestryModule$25.renderMarkup(TapestryModule.java:1657) 

   at 
$MarkupRenderer_11fefb9a145.renderMarkup($MarkupRenderer_11fefb9a145.java) 

   at 
org.apache.tapestry5.services.TapestryModule$24.renderMarkup(TapestryModule.java:1639) 

   at 
$MarkupRenderer_11fefb9a145.renderMarkup($MarkupRenderer_11fefb9a145.java) 

   at 
org.apache.tapestry5.services.TapestryModule$23.renderMarkup(TapestryModule.java:1625) 

   at 
$MarkupRenderer_11fefb9a145.renderMarkup($MarkupRenderer_11fefb9a145.java) 

   at 
org.apache.tapestry5.services.TapestryModule$22.renderMarkup(TapestryModule.java:1611) 

   at 
$MarkupRenderer_11fefb9a145.renderMarkup($MarkupRenderer_11fefb9a145.java) 

   at 
org.apache.tapestry5.services.TapestryModule$21.renderMarkup(TapestryModule.java:1583) 

   at 
$MarkupRenderer_11fefb9a145.renderMarkup($MarkupRenderer_11fefb9a145.java) 

   at 
org.equanda.t5nav.internal.NavigationDispatcher.renderMarkup(NavigationDispatcher.java:94) 

   at 
$MarkupRenderer_11fefb9a145.renderMarkup($MarkupRenderer_11fefb9a145.java) 

   at 

Re: img tag (src)

2009-03-10 Thread Thiago H. de Paula Figueiredo
Em Tue, 10 Mar 2009 16:57:11 -0300, Luther Baker lutherba...@gmail.com  
escreveu:



Am I'm looking for a render method that returns an Object - and stops the
rest of the lifecycle?


I would try to create a component instead. It is a more reusable solution.

--
Thiago H. de Paula Figueiredo
Independent Java consultant, developer, and instructor
http://www.arsmachina.com.br/thiago

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: Random Exceptions continued....

2009-03-10 Thread Andreas Andreou
Probably
Object valueObject = getDataSqueezer().unsqueeze(submittedValue);
returns null

That hidden value that you mention (If_16_0), is it always with no value?
or just only when the exception is thrown?

BTW, you can give names to your If components so that's it's easier to track
which is which - something like span jwcid=ifcit...@if ...

So, I was thinking perhaps getDocHasFundCites() encounters problems
while rendering
in those random cases, but you'd get excpetions if that was the case...


On Tue, Mar 10, 2009 at 10:51 PM, Tony Giaccone tgiacc...@gmail.com wrote:
 it was mentioned to me that I hadn't mentioned in my earlier post that this
 was a Tapestry 4.1.5 problem.

 Also further diagnosis shows that there seems to be a problem with the @IF
 component.

 Here's the code the If is bound to:

    public boolean getDocHasFundCites()
    {
        boolean retValue= false;
        if (getDetailFD() != null)
        {
            retValue = (getDetailFD().getFundCites() != null) 
                        (getDetailFD().getFundCites().size()  0);
        }
        return (retValue);
    }


 In the page from the exception there's the HttpServletRequest  stanza,

 among the many IF statements that are called out, well here I'll just copy
 the significant lines.

 If_14_0 T
 If_15_0 T
 If_16_0
 If_18   F
 If_1_0  F
 If_20   F
 If_22   T

 Notice on the line that start If_16_0, there is no boolean value, no T or F.


 I'm guessing that is what's causing this exception:

 [ +/- ] Exception: Unable to convert back into a boolean in If component. 
 https://mipr-dev/mipr/MiprDetail,miprForm.sdirect#
 org.apache.hivemind.ApplicationRuntimeException
 Stack Trace:
 org.apache.tapestry.components.IfBean.readValue(IfBean.java:184)
 org.apache.tapestry.components.IfBean.evaluateCondition(IfBean.java:143)
 org.apache.tapestry.components.IfBean.renderComponent(IfBean.java:66)
 org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:724)


 This code works the vast majority of the time. These exceptions seem to be
 thrown randomly. Of course I'm sure that it's not
 random, I just don't know what set of circumstances cause it to occur.
 Here's the code from the Tapestry Frameworks that's
 throwing the exception:

            Object valueObject =
 getDataSqueezer().unsqueeze(submittedValue);
            if (!(valueObject instanceof Boolean))
                throw new
 ApplicationRuntimeException(Tapestry.format(If.invalid-condition-type,
 submittedValue));
            return ((Boolean) valueObject).booleanValue();

 I haven't gone deep enough in the process to know if the unsqueeze is
 throwing the exception or if it's the exception
 thrown after the if instanceof.


 Any suggestions or ideas??


 Tony Giaccone




-- 
Andreas Andreou - andy...@apache.org - http://blog.andyhot.gr
Tapestry / Tacos developer
Open Source / JEE Consulting

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: T5ï¼s getting new Hibernate session in a lengthy t hread

2009-03-10 Thread DH
Maybe you can directly use HibernateSessionSource service instead of 
HibernateSessionManager.
HibernateSessionSource.create() creates a new session always, and do remember 
to commit and close the session by yourself.

Thanks,
DH


- Original Message - 
From: Angelo Chen angelochen...@yahoo.com.hk
To: users@tapestry.apache.org
Sent: Wednesday, March 11, 2009 11:16 AM
Subject: T5ï¼s getting new Hibernate session in a lengthy thread


 
 Hi,
 
 I need to run a lengthy thread where some database update happens, is there
 a way to minimize the time when a Hibernate Session is used? something
 similar to:
 
 do while not done
 
 // do some processing here
 obtain a session
 use the session
 release the session
 
 enddo
 
 If I use HibernateSessionManager, it seems there is no way to release and
 obtain a new session, any idea?
 -- 
 View this message in context: 
 http://www.nabble.com/T5%EF%BC%9A-getting-new-Hibernate-session-in-a-lengthy-thread-tp22448134p22448134.html
 Sent from the Tapestry - User mailing list archive at Nabble.com.
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
 For additional commands, e-mail: users-h...@tapestry.apache.org
 


Re: T5ï¼s getting new Hiberna te session in a lengthy thread

2009-03-10 Thread Angelo Chen

Hi DH,

That sounds doable, we will inject the HibernateSessionSource then call
create() to obtain the session?

Angelo


dh ning wrote:
 
 Maybe you can directly use HibernateSessionSource service instead of
 HibernateSessionManager.
 HibernateSessionSource.create() creates a new session always, and do
 remember to commit and close the session by yourself.
 
 Thanks,
 DH
 
 
 - Original Message - 
 From: Angelo Chen angelochen...@yahoo.com.hk
 To: users@tapestry.apache.org
 Sent: Wednesday, March 11, 2009 11:16 AM
 Subject: T5ï¼s getting new Hibernate session in a lengthy thread
 
 
 
 Hi,
 
 I need to run a lengthy thread where some database update happens, is
 there
 a way to minimize the time when a Hibernate Session is used? something
 similar to:
 
 do while not done
 
 // do some processing here
 obtain a session
 use the session
 release the session
 
 enddo
 
 If I use HibernateSessionManager, it seems there is no way to release and
 obtain a new session, any idea?
 -- 
 View this message in context:
 http://www.nabble.com/T5%EF%BC%9A-getting-new-Hibernate-session-in-a-lengthy-thread-tp22448134p22448134.html
 Sent from the Tapestry - User mailing list archive at Nabble.com.
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
 For additional commands, e-mail: users-h...@tapestry.apache.org
 

 

-- 
View this message in context: 
http://www.nabble.com/T5%EF%BC%9A-getting-new-Hibernate-session-in-a-lengthy-thread-tp22448134p22448992.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: T5ï¼s getting new Hibernate session in a lengthy thread

2009-03-10 Thread DH
I haven't tried it yet because now my application is out of tapestry-hibernate.
But from source code of tapestry-hibernate, it should be doable.

But I still doubt how you close the session created by HibernateSessionManager 
(thread scope). 
If you don't close it manually, the session still last fro the whole request 
process.
If close manually, maybe 'session has closed' exception is thrown by 
tapestry-hibernate because at the end tapestry would try to close the session 
of HibernateSessionManager, but it has been closed manually.

Thanks,
DH


- Original Message - 
From: Angelo Chen To: users@tapestry.apache.org
Sent: Wednesday, March 11, 2009 1:17 PM
Subject: Re: T5ï¼s getting new Hibernate session in a lengthy thread



Hi DH,

That sounds doable, we will inject the HibernateSessionSource then call
create() to obtain the session?

Angelo


dh ning wrote:
 
 Maybe you can directly use HibernateSessionSource service instead of
 HibernateSessionManager.
 HibernateSessionSource.create() creates a new session always, and do
 remember to commit and close the session by yourself.
 
 Thanks,
 DH
 
 
 - Original Message - 
 From: Angelo Chen angelochen...@yahoo.com.hk
 To: users@tapestry.apache.org
 Sent: Wednesday, March 11, 2009 11:16 AM
 Subject: T5ï¼s getting new Hibernate session in a lengthy thread
 
 
 
 Hi,
 
 I need to run a lengthy thread where some database update happens, is
 there
 a way to minimize the time when a Hibernate Session is used? something
 similar to:
 
 do while not done
 
 // do some processing here
 obtain a session
 use the session
 release the session
 
 enddo
 
 If I use HibernateSessionManager, it seems there is no way to release and
 obtain a new session, any idea?
 -- 
 View this message in context:
 http://www.nabble.com/T5%EF%BC%9A-getting-new-Hibernate-session-in-a-lengthy-thread-tp22448134p22448134.html
 Sent from the Tapestry - User mailing list archive at Nabble.com.
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
 For additional commands, e-mail: users-h...@tapestry.apache.org
 

 

-- 
View this message in context: 
http://www.nabble.com/T5%EF%BC%9A-getting-new-Hibernate-session-in-a-lengthy-thread-tp22448134p22448992.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: T5ï¼s getting new Hiberna te session in a lengthy thread

2009-03-10 Thread Angelo Chen

that will be a thread trigger by Quartz, create the session, close the
session repeat this until thread is over, i don't know any impact from
Tapestry-Hibernate.


dh ning wrote:
 
 I haven't tried it yet because now my application is out of
 tapestry-hibernate.
 But from source code of tapestry-hibernate, it should be doable.
 
 But I still doubt how you close the session created by
 HibernateSessionManager (thread scope). 
 If you don't close it manually, the session still last fro the whole
 request process.
 If close manually, maybe 'session has closed' exception is thrown by
 tapestry-hibernate because at the end tapestry would try to close the
 session of HibernateSessionManager, but it has been closed manually.
 
 Thanks,
 DH
 
 
 - Original Message - 
 From: Angelo Chen To: users@tapestry.apache.org
 Sent: Wednesday, March 11, 2009 1:17 PM
 Subject: Re: T5ï¼s getting new Hibernate session in a lengthy thread
 
 
 
 Hi DH,
 
 That sounds doable, we will inject the HibernateSessionSource then call
 create() to obtain the session?
 
 Angelo
 
 
 dh ning wrote:
 
 Maybe you can directly use HibernateSessionSource service instead of
 HibernateSessionManager.
 HibernateSessionSource.create() creates a new session always, and do
 remember to commit and close the session by yourself.
 
 Thanks,
 DH
 
 
 - Original Message - 
 From: Angelo Chen angelochen...@yahoo.com.hk
 To: users@tapestry.apache.org
 Sent: Wednesday, March 11, 2009 11:16 AM
 Subject: T5ï¼s getting new Hibernate session in a lengthy thread
 
 
 
 Hi,
 
 I need to run a lengthy thread where some database update happens, is
 there
 a way to minimize the time when a Hibernate Session is used? something
 similar to:
 
 do while not done
 
 // do some processing here
 obtain a session
 use the session
 release the session
 
 enddo
 
 If I use HibernateSessionManager, it seems there is no way to release
 and
 obtain a new session, any idea?
 -- 
 View this message in context:
 http://www.nabble.com/T5%EF%BC%9A-getting-new-Hibernate-session-in-a-lengthy-thread-tp22448134p22448134.html
 Sent from the Tapestry - User mailing list archive at Nabble.com.
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
 For additional commands, e-mail: users-h...@tapestry.apache.org
 

 
 
 -- 
 View this message in context:
 http://www.nabble.com/T5%EF%BC%9A-getting-new-Hibernate-session-in-a-lengthy-thread-tp22448134p22448992.html
 Sent from the Tapestry - User mailing list archive at Nabble.com.
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
 For additional commands, e-mail: users-h...@tapestry.apache.org
 
 
 

-- 
View this message in context: 
http://www.nabble.com/T5%EF%BC%9A-getting-new-Hibernate-session-in-a-lengthy-thread-tp22448134p22449240.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org