Re: Rendering cache

2012-07-30 Thread dh ning
Hi, one of my simple implementation, hope it helps. public abstract class StaticCacheComponent { private final static int CACHE_EXPIRED = 60; @Inject private ComponentResources componentResources; @Inject private CacheService cacheService; @Inject private TypeCoerc

Re: Howto render a block and put it into a JSON reply?

2012-02-16 Thread dh ning
Hi, To render block as html markup, I did like this: public String renderMarkup(RenderCommand renderCommand) { MarkupWriter markupWriter = new MarkupWriterImpl(); // validation track ValidationDecorator decorator = new DefaultValidationDecorator(environment, assetSource.g

Re: T5.1 locale switch back to default english after navigate to other page

2011-11-17 Thread dh ning
Hi, If you switch locale by PersistentLocale service, I think the locale will be persisted. Thanks, DH 2011/11/18 wesleywj2 > hi there, > > i successfully switch the locale between english and chinese "zh_CN" within > a page, but encountered a problem where once i switch to chinese and > navig

Re: [ANNOUNCE] Apache Tapestry preview 5.3-rc-1

2011-11-01 Thread dh ning
A pleasure! Done. https://issues.apache.org/jira/browse/TAP5-1741 Thanks, DH 2011/11/1 Howard Lewis Ship > It is possible, can you open up a JIRA issue and attach your template? > > On Tue, Nov 1, 2011 at 3:01 AM, dh ning wrote: > > Me too where tml contains Chinese words. &g

Re: [ANNOUNCE] Apache Tapestry preview 5.3-rc-1

2011-11-01 Thread dh ning
Me too where tml contains Chinese words. Should be caused by the html5 doc type changes? Caused by: java.io.UTFDataFormatException: Invalid byte 3 of 3-byte UTF-8 sequence. at org.apache.xerces.impl.io.UTF8Reader.invalidByte(Unknown Source) at org.apache.xerces.impl.io.UTF8Reader.

T5: Critial security of t:formdata

2009-03-07 Thread dh ning
Hi, These days I always think of security of t:formdata, just now I have a test to hack the t:formdata and find there is some serious damages. 1. First I change source code of Form component and store a component action in Form and build my own tapestry-core.jar. static final ComponentAction

Why Grid component fetches data one more time in form submit

2009-02-19 Thread dh ning
Hi, When Grid is in a form, even though 'volatile' parameter is set to 'false' (by default), I can see the datasource provider method is called during form submit. My understanding is that, if 'volatile' is false, it should not be called in form submitted, am I missing something? Object setupRen

stylesheet processing in ajax response doesn't work in firefox3.0

2009-02-12 Thread dh ning
Hi, Environment: tapestry 5.0.18, firefox3.0, maven jetty:run Whenever there is new stylesheet link in ajax response in firefox3.0 (both 3.0.5&3.0.6), then there is an ajax error shown in top of page "Client exception processing response: TypeError: existing is null". But IE 6&7, firefox 2.0 wor

Re: [T5] 5.0.16 Spanish special characters

2008-12-03 Thread dh ning
That's true, native2ascii is unnecessarily any more. Try to locate the issue whether it is caused at server side or by html page encoding. What's that value in tapestry page.java level? If it is correct, then this should be the html encoding problem. 2008/12/4 Thiago H. de Paula Figueiredo <[EMAIL

Re: [T5] Page naigation using submit

2008-10-17 Thread dh ning
You don't want the component rely on page, but you do (rely on outer form, right?), so if you want your component handle event independently, set the form in the component is a must. btw, onSelect's signature should only be Void type. DH 2008/10/17 Ville Virtanen <[EMAIL PROTECTED]> > > Yep, th

An exception at jetty starts up while using classNameLocator

2008-08-15 Thread dh ning
Hi, I got an exception when Jetty starts up after my maven repository updates to the latest tapestry 5.0.15-snapshot(I haven't update my repository for about 3 weeks), the latest 5.0.14-snapshot can't work too. The exception is: [ERROR] ClassNameLocator Construction of service ClassNameLocator fa

Re: Problem wuth internacionalization

2008-05-12 Thread dh ning
Hi, What's your tapestry version? If is the latest version, you should not put the start.tml, start.properties in WEB-INF. They should be in parent level of WEB-INF(src/main/webapp/) or in /src/main/resources/com/igno/bookStore/pages/. And for app.properties, it should be always in WEB-INF. Thank

Is it possible to prevent the render method in parent component from being invoked?

2008-04-23 Thread dh ning
Hi, First I know it is a feature that parent method is prior to child's. I need to extend GridPager component because the action link in GridPager doesn't have a context parameter, so the context info of the link is very limited(only the page No.). And I don't like to persist context in session.