Re: Global validation messages translation

2012-03-04 Thread Donyee
the default FormValid message is in the package
org.apache.tapestry5.internal
you can add same package in your resource file, add a new file
ValidationMessage.properties
this will override the default one.
it works in my project!


2012/3/1 Markus Grell 

> Greetings!
>
> I need to translate the messages of the standard validators. The Tapestry
> documentation reads:
>
> -
> Each validator (such as "required" or "minlength") has a default message
> used (on the client side and the server side) when the constraint is
> violated; that is, when the user input is not valid.
>
> The message can be customized by adding an entry to the page's message
> catalog (or the containing component's message catalog). As with any
> localized property, this can also go into the application's message
> catalog.
> -
>
> Since it is quite uncomfortable to add a property file for every page that
> uses a standard validator ("You must provide a value for XY"):
>
> Is it possible to override the default message with a translation? I
> didn't find info on that (or just did misunderstand existing documentation
> ;))
>
> Markus
>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


-- 
Yet Another Java EE Developer!


Re: [ANN] Tapestry Bootstrap Module

2011-11-01 Thread Donyee
Great Idea!

2011/10/30 Barry Books 

> I'm working on a couple of projects that will use Twitter Bootstrap
> http://twitter.github.com/bootstrap/ templates so I decided to create
> a Tapestry Module for this. The project is on GitHub
> https://github.com/trsvax/tapestry-bootstrap and I've been working on
> it about a week. It contains wrappers for the various Bootstrap items
> such as alerts, popups etc.
>
> Perhaps the most interesting component is the MediaGrid. The idea is
> to create a component that supports pagination as well as javascript
> scrolling on demand. It's somewhat like the Tapestry Grid but built in
> a completely different way. It uses a subcomponents controlled through
> the environment setup by a mixin. The presentation is in the
> components and the mixin is the controller. There are interfaces
> between the parts and each one is pluggable. The components receive
> the parameters like this:
>
> @Parameter(value="prop:alert?.type",defaultPrefix="literal")
> private String type;
>
> @SuppressWarnings("unused")
> @Environmental(false)
> @Property
> private AlertEnvironment alert;
>
> and the controller looks something like this
>
> https://github.com/trsvax/tapestry-bootstrap/blob/master/src/main/java/com/trsvax/bootstrap/mixins/Pager.java
>
> There is also a javascript mixin
>
> https://github.com/trsvax/tapestry-bootstrap/blob/master/src/main/java/com/trsvax/bootstrap/mixins/InfiniteScroll.java
> that hides the pagination component and adds items to the grid
> dynamically as the user scrolls.
>
> I've been trying for a while to figure out a way to set component
> parameter defaults without success and this is the first
> implementation I'm happy with. I've also included a mixin to push
> objects into the environment
>
> https://github.com/trsvax/tapestry-bootstrap/blob/master/src/main/java/com/trsvax/bootstrap/mixins/PushEnvironment.java
>
> There is an example page that uses most of the components.
>
>
> https://github.com/trsvax/tapestry-bootstrap/blob/master/src/test/resources/com/trsvax/bootstrap/pages/Index.tml
>
> and can be run with mvn jetty:run
>
> I would say the current code is mostly usable but the Media Grid needs
> some work. Since that's the main reason I created the module it will
> be improved shortly.
>
> I've already had some very useful feedback and would appreciate more.
> Code is also welcome.
>
> Lastly I've created a blog to chronicle this project. It also used
> Bootstrap and is written in Tapestry.
>
> http://trsvax.com/blog/
>
> Thanks
> Barry
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


-- 
Yet Another Java EE Developer!


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

2011-10-31 Thread Donyee
Both rc-1 and rc-2, I got this " Invalid byte 1 of 1-byte UTF-8 sequence."
but works fine with beta-26
is there any new changes??



2011/11/1 Howard Lewis Ship 

> Uh, yes. It's been a trying afternoon.
>
> On Mon, Oct 31, 2011 at 3:26 PM, Muhammad Gelbana 
> wrote:
> > You mean 5.3-rc-2 I suppose.
> >
> > On Mon, Oct 31, 2011 at 11:32 PM, Howard Lewis Ship  >wrote:
> >
> >> FYI: I found a minor problem in Tapestry 5.2-rc-1 and am
> >> building/uploading Tapestry 5.2-rc-2 right now.
> >>
> >> On Mon, Oct 31, 2011 at 11:05 AM, Howard Lewis Ship 
> >> wrote:
> >> > We are very pleased to announce the first release candidate preview of
> >> > Tapestry 5.3.
> >> >
> >> > Tapestry 5.3 is significantly faster than Tapestry 5.2, and is more
> >> > memory efficient ... a long with tons of significant new features,
> >> > improvements, and bug fixes.
> >> >
> >> > Details here:
> >>
> http://tapestry.apache.org/2011/10/31/tapestry-53-release-candidate.html
> >> >
> >> > This is still a preview release, but we encourage the Tapestry
> >> > community to upgrade to this release. With positive feedback (and no
> >> > show-stopping negative feedback) we should progress to a final release
> >> > of 5.3 in a few weeks.
> >> >
> >> > For most users, the upgrade path is simply changing the version
> >> > number, and performing a clean compile.
> >> >
> >> > Note that with each new release, we get a slew of panicked messages
> >> > that Tapestry is broken in bizarre ways. These ALMOST ALWAYS turn out
> >> > to be prior-release JARs still on the classpath, either in the
> >> > developer's working directory, or in a servlet container deployment
> >> > directory. Please carefully clean up your environment as part of the
> >> > upgrade!
> >> >
> >> > There are some cases where Tapestry 5.3 performs more rigorous checks
> >> > than Tapestry 5.2; for example, 5.3 ensures that event handler methods
> >> > that reference a component id ("onSuccessFromLogin") correspond to an
> >> > actual component ("login"); in Tapestry 5.2, this was not checked for,
> >> > and the event handler method would never fire ... it likely has a typo
> >> > in its name, or is related to a component that was removed from the
> >> > template.  This particular check can be disabled:
> >> >
> >>
> http://tapestry.apache.org/configuration.html#Configuration-tapestry.compatibility.unknowncomponentidcheck
> .
> >> ..
> >> >
> >> > It would be wise to start up your application under 5.3, then use the
> >> > new PageCatalog page (http://localhost:8080/pagecatalog) and click
> the
> >> > "load all" link, to force all pages to be loaded. This will quickly
> >> > identify any coding problems in your application.
> >> >
> >> > --
> >> > Howard M. Lewis Ship
> >> >
> >> > Creator of Apache Tapestry
> >> >
> >> > The source for Tapestry training, mentoring and support. Contact me to
> >> > learn how I can get you up and productive in Tapestry fast!
> >> >
> >> > (971) 678-5210
> >> > http://howardlewisship.com
> >> >
> >>
> >>
> >>
> >> --
> >> Howard M. Lewis Ship
> >>
> >> Creator of Apache Tapestry
> >>
> >> The source for Tapestry training, mentoring and support. Contact me to
> >> learn how I can get you up and productive in Tapestry fast!
> >>
> >> (971) 678-5210
> >> http://howardlewisship.com
> >>
> >> -
> >> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> >> For additional commands, e-mail: users-h...@tapestry.apache.org
> >>
> >>
> >
> >
> > --
> > *Regards,*
> > *Muhammad Gelbana
> > Java Developer*
> >
>
>
>
> --
> Howard M. Lewis Ship
>
> Creator of Apache Tapestry
>
> The source for Tapestry training, mentoring and support. Contact me to
> learn how I can get you up and productive in Tapestry fast!
>
> (971) 678-5210
> http://howardlewisship.com
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


-- 
Yet Another Java EE Developer!


Re: Tapestry5 Form submit Encoding (Chinese)!!

2010-09-09 Thread Donyee
T5, I don't use the UTF8 filter. and my tml page is GBK,eclipse project
encoding is GBK,
works fine!
what is your page charset???



-- 
Yet Another Java EE Developer!


Can't get the prototype.js????

2010-01-30 Thread Donyee
Hi all,My app is using T5.1.0.5, and tomcat 6.0.18,jdk6,deployed as a war
file.
when app works fine some days, then it blocked when the brower request the
prototype.js.
I use the firebug to find that the blocked request is
*/assets/virtual/H4sIAIXNQQrCMBCF4XGhXkREhE500QNN41SqlYS86aKeyat5B4mQgJu6$002ffl47$002fWm9Z
NotSWiDR2dAGpw8GmIJn4awwTX8plP3LqYggWbo$002fINxMv2p2Z$002fWPba9$002brtK3dFmkSFpbmiErLaF9WN4u$002fdkC6V1ZJd83eteSggV83nHzax7d8QAQAA.js



after I restart the tomcat,the app works fine againe.
It happens often.
And the other apps in the same tomcat work fine all the time.

any msg will be great.


-- 
Yet Another Java EE Developer!


Is webflow ready?

2009-07-16 Thread Donyee
I found there is a t5-webflow,is there any example or docs?

-- 
Yet Another Java EE Developer!


Re: where can i find java api

2008-10-26 Thread Donyee
You can find T5 javadoc here http://tapestry.apache.org/tapestry5/apidocs/

2008/10/27 Muralidhar Y <[EMAIL PROTECTED]>

> Hi all where can I find tapestry's java API ? I could not see that on site.
>
>
>
> Warm regards,
>
> Muralidhar Y
>
> [EMAIL PROTECTED]
>
>
>
> US Main: 877 KENSIUM (536.7486)
> India Main:  +91 9949495511
>
> India Fax:   +91 9949495522
>
> Kensium
>
> 200 S Wacker Dr, Suite 3100
>
> Chicago, IL 60606
>
>
>
>
>
> Confidentiality Note:
> -
> The information contained in this e-mail is strictly confidential and for
> the intended use of the addressee only. Any disclosure, use or copying of
> the information by anyone other than the intended recipient is prohibited.
> If you have received this message in error, please notify the sender
> immediately by return e-mail and securely discard this message.
>
>
>
>  _
>
>
>
>


-- 
Yet Another Java EE Developer!


Re: [ANNOUNCE] Tapestry 5.0.15

2008-09-21 Thread Donyee
Great!

2008/9/22 Howard Lewis Ship <[EMAIL PROTECTED]>

> Tapestry 5.0.15 is now available for download or via Maven.
>
> We've squeezed a whole lot of last minute improvements and fixes into
> (what was supposed to be) the released candidate.  Alas, we missed a
> couple so the release candidate will be 5.0.16, due out in early
> October.
>
> We recommend users upgrade to this release in preparation for the
> release candidate.
>
> Release notes: http://tapestry.apache.org/tapestry5/release-notes.html
>
> Upgrade notes: http://tapestry.apache.org/tapestry5/upgrade.html
>
> Download: http://tapestry.apache.org/download.html
>
> Enjoy!
>
> --
> Howard M. Lewis Ship
>
> Creator Apache Tapestry and Apache HiveMind
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Yet Another Java EE Developer!


Re: T5: applicationStateObject strage behaviour

2008-08-23 Thread Donyee
The first error is because T5 try to init your appState with a default
constructor,but doesn't match, so init got error!
The second error is a wrong use of appState.
Maybe you need a AppStateCreater, you can find here
http://tapestry.apache.org/tapestry5/guide/appstate.html
There is a example.

2008/8/23 Argo Vilberg <[EMAIL PROTECTED]>

> But if i use
> @Inject
> @ApplicationState
>
>
> Then i got another error!
>
>
> An unexpected application exception has occurred.
>
>- org.apache.tapestry5.internal.services.RenderQueueExceptionRender
> queue
>   error in BeginRender[Home:border.pagelink]:
>   java.lang.ClassNotFoundException: caught an exception while obtaining a
>   class file for ee.softpro.pages.Kontaktisikud
>   activeComponents
>  - Home (class ee.softpro.pages.Home)
>  - Home:border (class ee.softpro.components.Border)
>  classpath:ee/softpro/pages/Home.tml, line 1, column 861  t:type="Border" xmlns:t="
>  http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";>2
>  3 4
>  5  This is the start page for this application, a good place to
>  start your modifications.6 Just to prove this is live: 
>  - Home:border.if_2 (class org.apache.tapestry5.corelib.components.If)
>  classpath:ee/softpro/components/Border.tml, line 93, column 3088
>  89
>  90
>  91
>  92 93  94 95
> 96  onclick="javascript:submenu(1);">Kontaktisikud 97   class="menu" href="#"
>  onclick="javascript:submenu(2);">Lepingupartnerid98   class="menu" href="#"
>  onclick="javascript:submenu(3);">Lepinguprojektid
>  - Home:border.pagelink (class
>  org.apache.tapestry5.corelib.components.PageLink)
>  classpath:ee/softpro/components/Border.tml, line 106, column
> 81101
>  102 103   href="#">otsi kontaktisikut104 lisa kontaktisik105   class="submenu iconlink folderedit" href="#">Seo kontaktisik
>  106   t:page="Kontaktisikud">Seo kontaktisik 107
>  108
>  109 
>  t:page="Partnerid">lepingupartnerid110 class="submenu iconlink folderedit" t:page="Seopartner">seo
>  lepingupartnerid111 
>   locationclasspath:ee/softpro/components/Border.tml, line 106, column 81
>   - java.lang.ClassNotFoundExceptioncaught an exception while obtaining a
>   class file for ee.softpro.pages.Kontaktisikud
>   exceptionorg.apache.tapestry5.internal.services.TransformationException:
>   Error obtaining injected value for field
>   ee.softpro.pages.Kontaktisikud.appCurrentRole: No service implements the
>   interface ee.softpro.data.Role.
>   - org.apache.tapestry5.internal.services.TransformationExceptionError
>   obtaining injected value for field
>   ee.softpro.pages.Kontaktisikud.appCurrentRole: No service implements the
>   interface ee.softpro.data.Role.
>   transformation
>
>   InternalClassTransformation[
>   public ee.softpro.pages.Kontaktisikud extends
> ee.softpro.pages.DigiBasePage
>
>
>
>
>
>
>   ]
>
>   - java.lang.RuntimeExceptionNo service implements the interface
>ee.softpro.data.Role.
>
>
>
> 2008/8/23 Filip S. Adamsen <[EMAIL PROTECTED]>
>
> > Hi Argo,
> >
> > Tapestry is trying to invoke the constructor in your ASO class that has
> the
> > most parameters. While doing, it is looking for services. It can't find a
> > service matching Long, so it fails.
> >
> > You'll need to put @Inject on the constructor Tapestry should use to
> > instantiate your ASO class with, that should solve it.
> >
> >
> >
> http://tapestry.apache.org/tapestry5/apidocs/org/apache/tapestry5/ioc/annotations/Inject.html
> >
> > -Filip
> >
> > On 2008-08-22 23:51, Argo Vilberg wrote:
> >
> >> I use application State object in one java file
> >>@ApplicationState
> >>private Role appCurrentRole;
> >>
> >> I fill this class with data.
> >>
> >> And now i want access some Role class in other java class.
> >>
> >> I add also
> >>
> >> @ApplicationState
> >>private Role appCurrentRole;
> >>
> >>
> >> But if i first time access this class i got following error!!!
> >>
> >>
> >> Why?
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >> Here ise the error log.
> >> An unexpected application exception has occurred.
> >>
> >>   - org.apache.tapestry5.runtime.ComponentEventExceptionError invoking
> >>   constructor ee.softpro.data.Role(long, String, String, boolean,
> String,
> >>   String, String) (at Role.java:20) (for service
> >> 'ApplicationStateManager'):
> >>   No service implements the interface long.
> >>   context
> >>   eventTypeactivate
> >>   - java.lang.RuntimeExceptionNo service implements the interface long.
> >>
> >>   Stack trace
> >>  -
> >>
> >>
>  
> org.apache.tapestry5.ioc.internal.RegistryImpl.getService(RegistryImpl.java:518)
> >>  -
> >>
> >>
>  
> org.apache.tapestry5.ioc.internal.services.MasterObjectProviderImpl.provide(MasterObjectProviderImpl.java:46)
> >>  -
> >>
> >>
>  
> org.apache.tapestry5.ioc.internal.RegistryImpl.getObject(RegistryImpl.java:622)
> >>  -
> >>
> >>
>  
> org.apache.tapestry5.ioc.internal.RegistryImp

Re: About the ApplicationState??

2008-08-23 Thread Donyee
I know the answer, my impl does not recache the appState when it changes.
I'm thinking about other way to implement.

2008/8/23 Argo Vilberg <[EMAIL PROTECTED]>

> My experience show that only one applicationState object work fine.
>
> With two applicationState object i have this error;
>
>
> Error invoking constructor ee.softpro.data.Role(long, String, String,
> boolean, String, String, String) (at Role.java:20) (for service
> 'ApplicationStateManager'): No service implements the interface long.
>
>
> I dont know yet why!
>
>
>
>
> 2008/8/22 Donyee <[EMAIL PROTECTED]>
>
> > I tried to implement a ApplicationStatePersistenceStrategy using
> Memcached.
> > but in my page Start.java:
> >
> > @ApplicationState
> >private AppState appState;
> >@ApplicationState
> >private SessionAppState session;
> >
> >@Inject
> >private Logger log;
> >
> >void onActivate() {
> >
> >log.info("cache :"+appState.toString());
> >
> >log.info("session :"+session.toString());
> >
> >}
> > ##AppModule.java
> > public void contributeApplicationStateManager(
> >MappedConfiguration
> > configuration) {
> >ApplicationStateCreator creator = new
> > ApplicationStateCreator() {
> >public AppState create() {
> >return new AppState(new Date());
> >}
> >};
> >configuration.add(AppState.class, new
> ApplicationStateContribution(
> >"memcached", creator));
> >ApplicationStateCreator creator2 = new
> > ApplicationStateCreator() {
> >public SessionAppState create() {
> >return new SessionAppState(new Date());
> >}
> >};
> >configuration.add(SessionAppState.class, new
> > ApplicationStateContribution(
> >"session", creator2));
> >}
> >
> > 
> > the appState didn't get the right info, and the sessionAppState works
> fine!
> > *the question is when i change my sessionAppState, who writes the changed
> > sessionAppState to  the Session again??
> > *I search the T5 source,but i didn't find.
> > Is there a proxy impl?
> > Any tips will be great!
> >
> > --
> > Yet Another Java EE Developer!
> >
>



-- 
Yet Another Java EE Developer!


About the ApplicationState??

2008-08-21 Thread Donyee
I tried to implement a ApplicationStatePersistenceStrategy using Memcached.
but in my page Start.java:

@ApplicationState
private AppState appState;
@ApplicationState
private SessionAppState session;

@Inject
private Logger log;

void onActivate() {

log.info("cache :"+appState.toString());

log.info("session :"+session.toString());

}
##AppModule.java
public void contributeApplicationStateManager(
MappedConfiguration
configuration) {
ApplicationStateCreator creator = new
ApplicationStateCreator() {
public AppState create() {
return new AppState(new Date());
}
};
configuration.add(AppState.class, new ApplicationStateContribution(
"memcached", creator));
ApplicationStateCreator creator2 = new
ApplicationStateCreator() {
public SessionAppState create() {
return new SessionAppState(new Date());
}
};
configuration.add(SessionAppState.class, new
ApplicationStateContribution(
"session", creator2));
}


the appState didn't get the right info, and the sessionAppState works fine!
*the question is when i change my sessionAppState, who writes the changed
sessionAppState to  the Session again??
*I search the T5 source,but i didn't find.
Is there a proxy impl?
Any tips will be great!

-- 
Yet Another Java EE Developer!


Re: Tapestry5Chinaforum(中文论坛欢迎大家加入)and some words to Howard Lewis Ship

2008-08-20 Thread Donyee
Where is the link???

2008/8/20 Angelo Chen <[EMAIL PROTECTED]>

>
> [EMAIL PROTECTED]
> (let's talk only about tapestry 5 in this forum, in English too)
>
>
> 孟凡振 wrote:
> >
> > Firstly,thank u for your suggestion!!
> >
> > 学习是一个过程,不管你现在多牛x,你也是从中国式的英语过度过来的吧,呵呵。况且,俺还不知道您的英语如何。
> > 我只是一个刚毕业的学生,有了想法,所以提出来,没有掺杂任何社会上的肮脏的思想。
> > 也许你是前辈,经历的事情比较多,没有高调成功,所以说要低调。呵呵
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Tapestry5Chinaforum%EF%BC%88%E4%B8%AD%E6%96%87%E8%AE%BA%E5%9D%9B%E6%AC%A2%E8%BF%8E%E5%A4%A7%E5%AE%B6%E5%8A%A0%E5%85%A5%EF%BC%89and-some-words-to-Howard-Lewis-Ship-tp19042909p19063139.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Yet Another Java EE Developer!


How to use FormInjector?

2008-08-14 Thread Donyee
any demos about the FormInjector?
Some link will be great!
I check the apache svn,but it seems not the FormInjector example.


-- 
Yet Another Java EE Developer!


Re: [ANNOUNCE] Tapestry 5.0.14

2008-08-11 Thread Donyee
Great!

2008/8/11 Howard Lewis Ship <[EMAIL PROTECTED]>

>  The latest release of Tapestry, Tapestry 5.0.14 , is now available.
>
> Tapestry 5.0.14 is just about feature complete and can be considered a
> beta release. A release candidate is expected in the near future.
>
> 5.0.14 addresses a large number of bugs,, including a specific bug
> related to using Tapestry with Groovy. The version of Javassist has
> changed, which resolves a number of nonsensical errors using JDK 1.6.
> The approach to localization has simplified.
>
> See the release notes for more details:
>
> http://tapestry.apache.org/tapestry5/release-notes.html
>
> Download Tapestry 5.0.14 from:
>
> http://tapestry.apache.org/download.html
>
> --
> Howard M. Lewis Ship
>
> Creator Apache Tapestry and Apache HiveMind
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Yet Another Java EE Developer!


Log error????

2008-07-14 Thread Donyee
I use the tapestry-spring, and
org.apache.tapestry5.spring.TapestrySpringFilter,
then my app get nothing log from tapestry, but the spring boot log and
hibernate sql log.
Is there any other config i miss?
It seems my log4j file doesn't work!



-- 
Yet Another Java EE Developer!


Re: 答复: Chinese can not display correctly

2008-06-25 Thread Donyee
There is a eclipse plugin,
propedit
It can eidt the prop file!
Enjoy it!

2008/6/25 Korben Zhang <[EMAIL PROTECTED]>:

> Is there any ways  doesn't need native2ascii?
>
> 2008/6/25 滕训华 <[EMAIL PROTECTED]>:
>
> > Yes,chinese display correctly after compile by native tool,thanks very
> much
> >
> > -邮件原件-
> > 发件人: dhning [mailto:[EMAIL PROTECTED]
> > 发送时间: 2008年6月25日 14:38
> > 收件人: Tapestry users
> > 主题: Re: Chinese can not display correctly
> >
> > Hi,
> >  You should first utilize native2ascii(in jdk/bin) to convert the
> > appname_zh_CN.properties to asc, then it should solve your probelem.
> >  I don't know why T5 deal with internationalization differently from T4.
> In
> > T4, we developer don't have to convert the resource files, we just need
> > input Chinese and it displays correctly.
> >
> >  And if your IDE is eclipse, you can find some plugin to help you convert
> > encoding automatically.
> >
> > Thanks!
> >
> > DH
> >
> >
> > - Original Message -
> > From: "滕训华" <[EMAIL PROTECTED]>
> > To: "'Tapestry users'" 
> > Sent: Wednesday, June 25, 2008 8:44 AM
> > Subject: Chinese can not display correctly
> >
> >
> > >I use the ${message:labelKey} in the tml and define the labelKey in the
> > > properties with Chinese characters,but when the page display ,the
> Chinese
> > > can not display correctly.
> > >
> > >
> > >
> > > By the way,my properties file is define with UTF-8
> > >
> > >
> >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
>
> --
> Korben Zhang
> Blog: http://korben-zhang.blogspot.com | http://korbenzh.spaces.live.com
>



-- 
Yet Another Java EE Developer!


Re: T5 UTF encoding

2008-06-09 Thread Donyee
*1*.add this in your tml file.
http://www.w3.org/TR/html4/strict.dtd";>
*2*.in the AppModule.java, add
public static void contributeApplicationDefaults(
MappedConfiguration configuration) {
configuration.add("tapestry.supported-locales", "zh_CN");
...others...
}

of course you should change the "zh_CN" to your country code;
*3*.and your eclipse-project encoding should be utf-8 or something supports.

Mine works fine!

2008/6/10 maxthesecond <[EMAIL PROTECTED]>:

>
> Thanks for the answer, finally I noticed that I was using a FileUpload
> component, after changing the utf8encoding filter everything turned right.
>
> But still if in my template a label or any text contains an extra character
> tapestry will not render the page I will get  "Invalid byte 2 of 4-byte
> UTF-8 sequence."
> If I try to use an entity Á  á  I'll get "The entity "Aacute" was
> referenced, but not declared."
>
>
> Now if I try to modify the layout component to encompas the language
> setings
>
>
> 
>  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"; >
>
>
> http://www.w3.org/1999/xhtml";  xml:lang="es"
>   xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd"; >
> 
>
>
> Then I get: Namespace prefix for URI 'http://www.w3.org/XML/1998/namespace
> '
> is not defined.
>
>
> Wich is odd ,I don't know where the 1998 cames from.
>
> Thanks.
>
>
>
>
> --
> View this message in context:
> http://www.nabble.com/T5-UTF-encoding-tp17739633p17747818.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Yet Another Java EE Developer!


[T5] StreamResponse causes java.lang.IllegalStateException

2008-05-29 Thread Donyee
when i click to submit the form, i got java.lang.IllegalStateException.
I search the web and found that wes because the wrong use of
response.getOutputStream(); and response.getWriter();
Is this a bug?
how to fix this?

In my java code:
StreamResponse onSuccess() {

return new TextStreamResponse("text/json", "{key:'"+test+"'}");
}
In my page .tml:
 



test






submit





var processForm = function(){
alert('click');
ele = jQuery('#testForm');
var options = {
dataType: 'json',
success: function(data){
alert(data.key);
}
};
ele.ajaxSubmit(options);

};



-- 
Yet Another Java EE Developer!


[T5-12snapshot] How to write a ajaxform?

2008-05-28 Thread Donyee
I use the form component,and the form code: JSONStreamResponse onSuccess();
The json is like {'url':'loginpage'}.
how can i get this json data in my javascript method?
Is there a form submit callback method?


-- 
Yet Another Java EE Developer!


Re: help in index page cache tapestry5.11

2008-05-22 Thread Donyee
Hi, i got some ideas.
you can cache the index page as a static html page.
then use the static html page to response to the client.
you can extend tapestry to generate a static html page, just write the index
to a real html file.
then rewrite the client request, the apache httpd docs may help.

2008/5/22 Filip S. Adamsen <[EMAIL PROTECTED]>:

> Hi,
>
> Nope, you'll have to work something out yourself, as nothing like this is
> built into Tapestry.
>
> -Filip
>
> 孟凡振 skrev:
>
>  Hi all,
>>I encounter a problem , in my index page a lots of query happens
>> each time when i reload the it.
>> so my question here is that is there some cache strategy to cache my index
>> page?
>>
>>thanks in advance!!
>>
>>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Yet Another Java EE Developer!


Re: T5 (5.0.11) - ready for production deployment

2008-03-27 Thread Donyee
I had developed a crud system using tapestry-5-0-5, it works fine!
and i will upgrade to the latest version.

2008/3/27, Martin Grotzke <[EMAIL PROTECTED]>:
>
> Hi,
>
> we also have a production app running T5 http://www.smatch.com, very
> stable, up and running.
>
> Cheers,
>
> Martin
>
>
>
> On Wed, 2008-03-26 at 21:14 +0100, Jan Vissers wrote:
> > Hi,
> >
> > I have an opportunity to use T5 (5.0.11) in an assignment. My question
> is;
> > is it safe for me to do so? The application is quite simple in that not
> > many UI components/forms have to be created. There will be a requirement
> > to have google suggest like functionality, along with a small other Ajax
> > component. The deployment platform will be tomcat.
> >
> > What do you think - 'is it safe' ?
> >
> > Thanks for any feedback,
> > -J.
> >
> >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
>
>


-- 
Yet Another Java EE Developer!


How about a PERSESSION_SCOPE?

2008-01-10 Thread Donyee
T5 now supports singleton and per-thread scope;
in the webapps the per-session is also a good way!

Any tips?


-- 
Yet Another Java EE Developer!


Re: Add a DOCTYPE?

2008-01-09 Thread Donyee
T5.07 works fine!
T5.08-SANPSHOT turns wrong!

2008/1/10, Donyee <[EMAIL PROTECTED]>:
>
> I use T5.08-SNAPSHOT.
> my page:
> 
>  " http://www.w3.org/TR/html4/strict.dtd";>
> http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";>
> ...
>



-- 
徐 依伟


Re: Add a DOCTYPE?

2008-01-09 Thread Donyee
I use T5.08-SNAPSHOT.
my page:

http://www.w3.org/TR/html4/strict.dtd";>
http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";>
...


Add a DOCTYPE?

2008-01-09 Thread Donyee
How to add a DOCTYPE in the tapestry tml page.
I put "
http://www.w3.org/TR/html4/strict.dtd";>
" in the page.

Error:
java.lang.RuntimeException Namespace prefix for URI '
http://www.w3.org/XML/1998/namespace' is not defined.

and in http://tapestry.apache.org/tapestry5/tapestry-core/guide/dom.html
I see *TODO: Support for doctypes, content type, processing instructions,
and top-level comments.


Does tapestry support this?


*


Re: How to create PERTHREAD_SCOPE object?

2008-01-03 Thread Donyee
In AppModule.java
@Scope(IOCConstants.PERTHREAD_SCOPE)
public Encoder buildEncoder() {
System.out.println("new Encoder()...*");

   return new Encoder();
   }

in my page class:
@Inject
private Encoder encoder;


2008/1/3, Massimo Lusetti <[EMAIL PROTECTED]>:
>
> On Jan 3, 2008 10:49 AM, Donyee <[EMAIL PROTECTED]> wrote:
>
> > is there anything wrong with my code?
>
> You actually didn't show your code.
>
> --
> Massimo
> http://meridio.blogspot.com
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
徐 依伟


How to create PERTHREAD_SCOPE object?

2008-01-03 Thread Donyee
I want to create a new  object per request, and my code is like:

@Scope(IOCConstants.PERTHREAD_SCOPE)
public Encoder buildEncoder() {
System.out.println("new Encoder()...*");
   return new Encoder();
   }

when i request my page with IE and FireFox,
the output is "new Encoder()...*", only print
once!
is there anything wrong with my code?


[T5] A Hibernate question?

2007-11-22 Thread Donyee
I use tapestry-hibernate in my apps,
in one page:


删除
更新



in editpage.java
void onActivate(String id) {

page = (Page) session.createCriteria(Page.class).add(
Restrictions.eq("pageId", id)).uniqueResult();
}

void onSuccess() {
session.saveOrUpdate(page);
}


when i submit the editpage, i got a error:
Illegal attempt to associate a collection with two open sessions
...

anyone helps?


Re: [T5.06] component action context does not support utf8!

2007-11-04 Thread Donyee
I got the answer from the sources, because the
ComponentActionDispatcher.java
decode the url with a default charset which doesn't support utf-8!
I'm now trying to create a new dispatcher to solve this question.

2007/11/4, Filip S. Adamsen <[EMAIL PROTECTED]>:
>
> Hi Donyee,
>
> Have a look at this, it *might* help:
> http://wiki.apache.org/tapestry/Tapestry5Utf8Encoding
>
> -Filip
>
> Donyee skrev:
> > I use the actionLink, and the context contains utf8 string,
> > and the onUpdate(string str)...
> > the str is ???, encoding wrong!
> >
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
徐 依伟


[T5.06] component action context does not support utf8!

2007-11-01 Thread Donyee
I use the actionLink, and the context contains utf8 string,
and the onUpdate(string str)...
the str is ???, encoding wrong!


Re: T5 book: update

2007-10-31 Thread Donyee
Where is the book?
Can someone give me a copy? or the download url ?


2007/11/1, Eko S.W. <[EMAIL PROTECTED]>:
>
> I am sorry, but How can we use DateField in 5.0.6?
> I am so late on 5.0.6
>
> Thanks
>
> 2007/10/26, Ted Steen <[EMAIL PROTECTED]>:
> >
> > Very nice!
> > Dont forget to update the part about the DatePicker. It is now
> > obsolete. T5.0.6 now includes a DateField as a part of the core.
> >
>
> --
> Best wishes,
> Eko SW
> http://swdev.blogs.friendster.com/my_blog/
>



-- 
徐 依伟


Re: DateField format

2007-10-28 Thread Donyee
Try this: format="%Y%m%d", you will get "mmdd"
also you can use :format="%Y-%m-%d", then you will get "-mm-dd"
Do you need this?


2007/10/28, T. Papke <[EMAIL PROTECTED]>:
>
> Hi,
>
> i have tried the new Tapestry 5 DateField Component. If i setup a
> Dateformat for rendering, the component itself behave not as espected.
> Could anyone confirm this as a bug or do i something wrong with that
> component?
>
>  t:format="dd.MM."/>
>
>
> Thank you,
> Thomas Papke
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
徐 依伟


Re: T5.06 The tapestry-hibernate problem? resoloved!

2007-10-26 Thread Donyee
in my appModule.java, i changed :

public void contributeHibernateSessionSource(
OrderedConfiguration configuration) {
configuration.add("my", "org.ts.domain.bo");
    }




2007/10/26, Donyee <[EMAIL PROTECTED]>:
>
>
>
> I got errors when i use T5.06-hibernate, and my app works fine when i use
> T5.05!
> Also i changed the html to tml, sl4j...
> Error:
> No service implements the interface org.apache.tapestry.ioc.Configuration.
> Error invoking service builder method
> org.apache.tapestry.hibernate.HibernateModule.build(HibernateSessionSource,
> ThreadCleanupHub) (at HibernateModule.java:73) (for service
> 'HibernateSessionManager'): Exception constructing service
> 'HibernateSessionSource': Error invoking service builder method
> org.apache.tapestry.hibernate.HibernateModule.build(Logger, List) (at
> HibernateModule.java:111) (for service 'HibernateSessionSource'): Error
> invoking service contribution method
>



-- 
徐 依伟


T5.06 The tapestry-hibernate problem?

2007-10-26 Thread Donyee
I got errors when i use T5.06-hibernate, and my app works fine when i use
T5.05!
Also i changed the html to tml, sl4j...
Error:
No service implements the interface org.apache.tapestry.ioc.Configuration.
Error invoking service builder method
org.apache.tapestry.hibernate.HibernateModule.build(HibernateSessionSource,
ThreadCleanupHub) (at HibernateModule.java:73) (for service
'HibernateSessionManager'): Exception constructing service
'HibernateSessionSource': Error invoking service builder method
org.apache.tapestry.hibernate.HibernateModule.build(Logger, List) (at
HibernateModule.java:111) (for service 'HibernateSessionSource'): Error
invoking service contribution method


Re: T5.07 SNAPSHOT! Where is the Inject Annotation??

2007-10-24 Thread Donyee
Thanks all!

2007/10/24, Robin Helgelin <[EMAIL PROTECTED]>:
>
> On 10/24/07, lasitha <[EMAIL PROTECTED]> wrote:
> > https://issues.apache.org/jira/browse/TAPESTRY-1800
> >
> > Its a good idea to keep an eye on jira or the developer mailing list
> > for some forewarning of such chanages :).
>
> Or just check the release notes :)
> 
>
> --
> regards,
> Robin
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
徐 依伟


T5.07 SNAPSHOT! Where is the Inject Annotation??

2007-10-23 Thread Donyee
I tried the t5.07 snapshot today, the Inject Annotation is not found in the
src.
the doc is not mentioned, Is there anything new?



徐 依伟


[T5.06snap] access the Tap webapp from other webapp?

2007-10-17 Thread Donyee
The tap webapp's index page can response json to client!
StreamResponse onUpdateMsg()...url:localhost:8080/bobo/index:updatemsg
I wonder if i can get the json data from another webapp?
I tried to request the url"localhost:8080/bobo/index:updatemsg" in a ajax
request!
but i didn't get the json data!
Is there a good way???



徐 依伟


Re: [T5.06snap] About PERTHREAD_SCOPE?

2007-10-17 Thread Donyee
I use IE and Firefox to request the index page, the index page read data
from the BoboCachestate, and got defferent data!
They should be same!

2007/10/17, Howard Lewis Ship <[EMAIL PROTECTED]>:
>
> What makes you think that it builds a singleton?
>
> You will get a single proxy instance; internal to the proxy it
> finds/creates
> the per-thread instance.
>
> You need to be careful about the notification you have there; that will
> probably cause a leak of BoboCacheState instances.
>
> @Scope(PERTHREAD_SCOPE)
> public BoboCacheState buildCacheState(ThreadCleanupHub
> threadCleanupHub,
> @InjectService
> >
> > ("Cache")
> > Cache cache) {
> > final BoboCacheState state = new BoboCacheState();
> > cache.getCacheEventNotificationService
> ().registerListener(state);
>
>
>threadCleanupHub.addThreadCleanupListener(new
> ThreadCleanupListener() {
> public void threadDidCleanup() {
>   cache.getCacheEventNotificationService
> ().unregisterListener(state);
>});
>
>
>
> return state;
> > }
>
>
>
>
> On 10/17/07, Donyee <[EMAIL PROTECTED]> wrote:
> >
> > I use "@Scope(PERTHREAD_SCOPE)" on build method  in my AppModule.java.
> > It will create new instance in every new request, but it seems the
> method
> > build a singleton!
> > I use IE and FireFox request the page!
> > my code: in AppModule.java
> > @EagerLoad
> > @Scope(PERTHREAD_SCOPE)
> > public BoboCacheState buildCacheState(@InjectService("Cache")
> > Cache cache) {
> > BoboCacheState state = new BoboCacheState();
> > cache.getCacheEventNotificationService
> ().registerListener(state);
> > return state;
> > }
> > in page index.java:
> > @Inject
> > private BoboCacheState state;
> >
> >
> >
> > 徐 依伟
> >
>
>
>
> --
> Howard M. Lewis Ship
> Partner and Senior Architect at Feature50
>
> Creator Apache Tapestry and Apache HiveMind
>



-- 
徐 依伟


[T5.06snap] About PERTHREAD_SCOPE?

2007-10-17 Thread Donyee
I use "@Scope(PERTHREAD_SCOPE)" on build method  in my AppModule.java.
It will create new instance in every new request, but it seems the method
build a singleton!
I use IE and FireFox request the page!
my code: in AppModule.java
@EagerLoad
@Scope(PERTHREAD_SCOPE)
public BoboCacheState buildCacheState(@InjectService("Cache")
Cache cache) {
BoboCacheState state = new BoboCacheState();
cache.getCacheEventNotificationService().registerListener(state);
return state;
}
in page index.java:
@Inject
private BoboCacheState state;



徐 依伟


Re: [T5] Got a wrong uri from createActionLink!

2007-10-12 Thread Donyee
Thanks, I changed to onUpdateMsg()!
works fine!

2007/10/12, lasitha <[EMAIL PROTECTED]>:
>
> I might still not be getting it, but i'll try again :)
>
> Preamble... (see below for a possible solution):
>
> Tapestry uses the following convention for an action link:
> /page.component:action
> Periods represent nested components and colons prefix a named action.
>
> So, '/index.updatemsg' points to an 'updatemsg' component on the 'index'
> page.
> That link doesn't specify an action, but i'm guessing it'll invoke
> your 'onActionFromUpdateMsg' handler (the 'onAction' convention means
> it will fire on any action for this component), as long as Index
> contains such a component.
>
> '/index:updatemsg' signifies an action named 'updatemsg' directly on
> the 'index' page.  Again, if you don't have a handler for this action
> on the index page, then it'll probably behave similiar to a simple
> page render request - hence you're return just '/index'.
>
>
> Solution (perhaps):
>
> If i understand what you're trying to do, i think you can just change:
> onActionFromUpdateMsg()
> to
> onUpdateMsg()
> in Index.java.
>
> If you do this and keep the createActionLink() code the same, the URI
> will be '/index:updatemsg' and clicking it will invoke onUpdateMsg().
>
> Is that what you're looking for?
>
> Cheers,
> lasitha.
>
>
> On 10/12/07, Donyee <[EMAIL PROTECTED]> wrote:
> > I request the /index.updatemsg and get a json data, the
> > onActionFromUpdateMsg() method works fine!
> > but i request the /index:updatemsg, it response as /index!
> > Is this new in t5.06?
> > How can i get a url like /index.updatemsg??
> > Thanks!
> >
> > 2007/10/12, lasitha <[EMAIL PROTECTED]>:
> > >
> > > AFAIK, there's nothing wrong with using a colon within the path of a
> URI.
> > > Do you know of any problems with this?  Its been working so far...
> > > Perhaps i'm missing the point?
> > >
> > > On 10/12/07, Donyee <[EMAIL PROTECTED]> wrote:
> > > > The colon (:) "/index:updatemsg" is not a uri,
> > > > how could  i get a "/index.updatemsg"?
> > > >
> > > > 2007/10/12, lasitha <[EMAIL PROTECTED]>:
> > > > >
> > > > > Umm, looks fine to me...
> > > > >
> > > > > According to the createActionLink javadoc[1], it  creates "... a
> > > > > component action request link as a callback for this
> component."  So
> > > > > in this case, your component is the Index page, and your action is
> > > > > 'updateMsg'.  Tapestry uses a colon (:) to indicate an action as
> > > > > opposed to a nested component (designated by the period (.)).
> > > > >
> > > > > What problems are you having with the generated link?
> > > > >
> > > > > Cheers,
> > > > > lasitha.
> > > > >
> > > > > [1]
> > > > >
> > >
> http://tapestry.apache.org/tapestry5/tapestry-core/apidocs/org/apache/tapestry/ComponentResourcesCommon.html#createActionLink(java.lang.String,%20boolean,%20java.lang.Object...)
> > > > >
> > > > >
> > > > > On 10/12/07, Donyee <[EMAIL PROTECTED]> wrote:
> > > > > > I use T5.06 snapshot !
> > > > > >
> > > > > > 2007/10/12, Donyee <[EMAIL PROTECTED]>:
> > > > > > >
> > > > > > >
> > > > > > > Here is my code:
> > > > > > > Index.java
> > > > > > > @Inject
> > > > > > > private ComponentResources resource;
> > > > > > > public String getUpdateLink() {
> > > > > > > Link link = resource.createActionLink("updateMsg", true);
> > > > > > > return link.toURI();
> > > > > > > }
> > > > > > >
> > > > > > > and in Index.tml:
> > > > > > > ${updateLink}...
> > > > > > >
> > > > > > > It displays "/index:updateMsg", it should be
> "/index.updateMsg"!
> > > > > > > Is this a bug? or I made wrong?
> > > > > > >
> > > > > > > 徐 依伟
> > > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > --
> > > > > > 徐 依伟
> > > > > >
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > 徐 依伟
> > > >
> > >
> >
> >
> >
> > --
> > 徐 依伟
> >
>



-- 
徐 依伟


Re: [T5] Got a wrong uri from createActionLink!

2007-10-11 Thread Donyee
I request the /index.updatemsg and get a json data, the
onActionFromUpdateMsg() method works fine!
but i request the /index:updatemsg, it response as /index!
Is this new in t5.06?
How can i get a url like /index.updatemsg??
Thanks!

2007/10/12, lasitha <[EMAIL PROTECTED]>:
>
> AFAIK, there's nothing wrong with using a colon within the path of a URI.
> Do you know of any problems with this?  Its been working so far...
> Perhaps i'm missing the point?
>
> On 10/12/07, Donyee <[EMAIL PROTECTED]> wrote:
> > The colon (:) "/index:updatemsg" is not a uri,
> > how could  i get a "/index.updatemsg"?
> >
> > 2007/10/12, lasitha <[EMAIL PROTECTED]>:
> > >
> > > Umm, looks fine to me...
> > >
> > > According to the createActionLink javadoc[1], it  creates "... a
> > > component action request link as a callback for this component."  So
> > > in this case, your component is the Index page, and your action is
> > > 'updateMsg'.  Tapestry uses a colon (:) to indicate an action as
> > > opposed to a nested component (designated by the period (.)).
> > >
> > > What problems are you having with the generated link?
> > >
> > > Cheers,
> > > lasitha.
> > >
> > > [1]
> > >
> http://tapestry.apache.org/tapestry5/tapestry-core/apidocs/org/apache/tapestry/ComponentResourcesCommon.html#createActionLink(java.lang.String,%20boolean,%20java.lang.Object...)
> > >
> > >
> > > On 10/12/07, Donyee <[EMAIL PROTECTED]> wrote:
> > > > I use T5.06 snapshot !
> > > >
> > > > 2007/10/12, Donyee <[EMAIL PROTECTED]>:
> > > > >
> > > > >
> > > > > Here is my code:
> > > > > Index.java
> > > > > @Inject
> > > > > private ComponentResources resource;
> > > > > public String getUpdateLink() {
> > > > > Link link = resource.createActionLink("updateMsg", true);
> > > > > return link.toURI();
> > > > > }
> > > > >
> > > > > and in Index.tml:
> > > > > ${updateLink}...
> > > > >
> > > > > It displays "/index:updateMsg", it should be "/index.updateMsg"!
> > > > > Is this a bug? or I made wrong?
> > > > >
> > > > > 徐 依伟
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > 徐 依伟
> > > >
> > >
> >
> >
> >
> > --
> > 徐 依伟
> >
>



-- 
徐 依伟


Re: [T5] Got a wrong uri from createActionLink!

2007-10-11 Thread Donyee
The colon (:) "/index:updatemsg" is not a uri,
how could  i get a "/index.updatemsg"?

2007/10/12, lasitha <[EMAIL PROTECTED]>:
>
> Umm, looks fine to me...
>
> According to the createActionLink javadoc[1], it  creates "... a
> component action request link as a callback for this component."  So
> in this case, your component is the Index page, and your action is
> 'updateMsg'.  Tapestry uses a colon (:) to indicate an action as
> opposed to a nested component (designated by the period (.)).
>
> What problems are you having with the generated link?
>
> Cheers,
> lasitha.
>
> [1]
> http://tapestry.apache.org/tapestry5/tapestry-core/apidocs/org/apache/tapestry/ComponentResourcesCommon.html#createActionLink(java.lang.String,%20boolean,%20java.lang.Object...)
>
>
> On 10/12/07, Donyee <[EMAIL PROTECTED]> wrote:
> > I use T5.06 snapshot !
> >
> > 2007/10/12, Donyee <[EMAIL PROTECTED]>:
> > >
> > >
> > > Here is my code:
> > > Index.java
> > > @Inject
> > > private ComponentResources resource;
> > > public String getUpdateLink() {
> > > Link link = resource.createActionLink("updateMsg", true);
> > > return link.toURI();
> > > }
> > >
> > > and in Index.tml:
> > > ${updateLink}...
> > >
> > > It displays "/index:updateMsg", it should be "/index.updateMsg"!
> > > Is this a bug? or I made wrong?
> > >
> > > 徐 依伟
> > >
> >
> >
> >
> > --
> > 徐 依伟
> >
>



-- 
徐 依伟


Re: [T5] Got a wrong uri from createActionLink!

2007-10-11 Thread Donyee
I use T5.06 snapshot !

2007/10/12, Donyee <[EMAIL PROTECTED]>:
>
>
> Here is my code:
> Index.java
> @Inject
> private ComponentResources resource;
> public String getUpdateLink() {
> Link link = resource.createActionLink("updateMsg", true);
> return link.toURI();
> }
>
> and in Index.tml:
> ${updateLink}...
>
> It displays "/index:updateMsg", it should be "/index.updateMsg"!
> Is this a bug? or I made wrong?
>
> 徐 依伟
>



-- 
徐 依伟


[T5] Got a wrong uri from createActionLink!

2007-10-11 Thread Donyee
Here is my code:
Index.java
@Inject
private ComponentResources resource;
public String getUpdateLink() {
Link link = resource.createActionLink("updateMsg", true);
return link.toURI();
}

and in Index.tml:
${updateLink}...

It displays "/index:updateMsg", it should be "/index.updateMsg"!
Is this a bug? or I made wrong?

徐 依伟


Re: T5: A simple Ajax need(JQuery)

2007-10-06 Thread Donyee
Try this!
 
LoadMore 

2007/10/6, Angelo Chen <[EMAIL PROTECTED]>:
>
> Hi,
>
> I have a very simple Ajax need, here is the situation:
>
> My page will display a blog, when user click 'more comments', I'd like to
> load a T5 page into a DIV provided, so basically, the page is like this:
>
> my blog's text goes here
> 
>
> the js will be like this:
>
> $('#more_comments').click(function() {
>$('#comments').load('/getcomment');
>
> got some questions: 1. simply passing the url '/getcomment' to load is
> enough? how to pass blog ID as parameters? 2. if above steps not correct,
> any other way to achive this? Thanks,
> A.C.
>
>
>
> --
> View this message in context: 
> http://www.nabble.com/T5%3A-A-simple-Ajax-need%28JQuery%29-tf4580040.html#a13074090
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
徐 依伟


[T5] May I get a full filePath in the appModule?

2007-08-13 Thread Donyee
I try to get a full filepath of one file, i try the
resquestGlobal.getHTTPServletRequest().getSession().getServletContext().getRealPath("/")...

but the server report errors!


-- 
徐 依伟


Re: Tapestry5.0.5 Chinese Firefox can show normal, and in IE6 or not.

2007-08-10 Thread Donyee
Looks here!
http://groups.google.com/group/t5hrm/web/tapestry-5?hl=zh-CN


2007/8/11, sun58224 <[EMAIL PROTECTED]>:
> sun58224  sina.com> writes:
>
> >
> > Tapestry5.0.5 Chinese Firefox can show normal, and in IE6 or not.
> >
> > -
> > To unsubscribe, e-mail: users-unsubscribe  tapestry.apache.org
> > For additional commands, e-mail: users-help  tapestry.apache.org
> >
> >
> RequestGlobals.getHTTPServletRequest (). SetCharacterEncoding ( "UTF-8") into
> which packets?
>
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
徐 依伟


Re: [T5] Integration of Guice in the domain model?

2007-08-09 Thread Donyee
Thanks, I got the idea!

2007/8/9, Nick Westgate <[EMAIL PROTECTED]>:
> I haven't looked into it, but search this list.
> Back in April "Leon Pennings" posted about it.
>
> Cheers,
> Nick.
>
>
> Donyee wrote:
> > Hi all, I want to use the guice in my t5 app?
> > does anyone got ideas to use it like  tapestry-spring?
> >
> >
> >
> > 徐 依伟
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
徐 依伟


[T5] Integration of Guice in the domain model?

2007-08-08 Thread Donyee
Hi all, I want to use the guice in my t5 app?
does anyone got ideas to use it like  tapestry-spring?



徐 依伟


Re: [T5] The pattle doesn't work fine with IE!

2007-08-02 Thread Donyee
Is this a bug?

在 07-8-1,小司<[EMAIL PROTECTED]> 写道:
> Yes, My pallete does not work ,Button is disabled.only submit button works 
> well
>
> 2007/8/1, Donyee <[EMAIL PROTECTED]>:
> > I use the pattle component in my pages, it works fine in the firefox,
> > but in the IE the
> > (select)buttons were disabled!
> > Does anyone meet this problem?
> >
> >
> > 徐 依伟
> >
>
>
> --
> 得与失都是生活
>


-- 
徐 依伟


[T5] The pattle doesn't work fine with IE!

2007-08-01 Thread Donyee
I use the pattle component in my pages, it works fine in the firefox,
but in the IE the
(select)buttons were disabled!
Does anyone meet this problem?


徐 依伟


Re: [T5]How to submit a hidden value?

2007-07-19 Thread Donyee

The new code works fine!

public class HiddenField extends AbstractField {
@Parameter(required = true, principal = true)
private String _value;

@Inject
private Request _request;

final void afterRender(MarkupWriter writer) {
writer.end(); // input
}

@Override
protected void processSubmission(FormSupport formSupport, String 
elementName) {
// TODO Auto-generated method stub

_value = _request.getParameter(elementName);
}

void beginRender(MarkupWriter writer) {
writer.element("input", "type", "hidden", "name", 
getElementName(),
"id", getClientId(), "value","");
}


}

2007/7/19, Nick Westgate <[EMAIL PROTECTED]>:

Sure. It should be pretty simple. First, please define "doesn't work".
Does anything get written into the html?

Also, you probably want to extend AbstractField, not AbstractTextField.

Cheers,
Nick.


Donyee wrote:
> I need to submit a hidden value, so i write like this:(copy from this
> TextField)
>
> public class HiddenField extends AbstractTextField {
> @Override
> protected final void writeFieldTag(MarkupWriter writer, String value) {
> writer.element("input", "type", "hidden", "name",
> getElementName(), "id",
> getClientId(), "value", value);
> }
>
> final void afterRender(MarkupWriter writer) {
> writer.end(); // input
> }
>
> }
> but it doesn't works!
> Can anyone help??
>
>
> 徐 依伟

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





--
徐 依伟


[T5]How to submit a hidden value?

2007-07-19 Thread Donyee

I need to submit a hidden value, so i write like this:(copy from this TextField)

public class HiddenField extends AbstractTextField {
@Override
protected final void writeFieldTag(MarkupWriter writer, String value) {
writer.element("input", "type", "hidden", "name", getElementName(), 
"id",
getClientId(), "value", value);
}

final void afterRender(MarkupWriter writer) {
writer.end(); // input
}

}
but it doesn't works!
Can anyone help??


徐 依伟


Re: T5: Can I redirect to another page in setupRender()?

2007-07-17 Thread Donyee

I do this in the beforeRenderTemplate(),and works fine!

boolean beforeRenderTemplate() throws IOException, ServletException {
if (!isLogined()) {

if (appState == null) {
appState = new AppState();
}

appState.setErrCode("00100");
appState.setPrePage("index");
global.getResponse().sendRedirect(

global.getHTTPServletRequest().getContextPath()
+ "/errorMessage");
}

return true;
}


2007/7/18, Nick Westgate <[EMAIL PROTECTED]>:

No, I'm pretty sure you can't.

Read the documentation again, and look at:
ComponentPageElementImpl.RenderPhaseEventHandler.handleResult()

It seems to confirm that returning a component will render that
component and then _continue_ with the rendering phases for the
current component.

Render phase methods are completely separate from the event handlers
for page navigation events. All options are on the page I linked to:
http://tapestry.apache.org/tapestry5/tapestry-core/guide/pagenav.html

Cheers,
Nick.


Korben Zhang wrote:
> Yes, you can.
> See T5 core components, such as 'If'.
>
> use
> Object setupRender() {...}
>
> See page
> http://tapestry.apache.org/tapestry5/tapestry-core/guide/rendering.html
>
> remember boolean is an object too.
>
>
>
> On 7/17/07, Nick Westgate <[EMAIL PROTECTED]> wrote:
>>
>> Access validation should be done in onActivate():
>> http://tapestry.apache.org/tapestry5/tapestry-core/guide/pagenav.html
>>
>> Cheers,
>> Nick.
>>
>>
>> dtrebbien wrote:
>> > I have two pages: ListRepositories and ViewRepository. ListRepositories
>> is
>> > supposed to give ViewRepository an id number by calling
>> ViewRepository's
>> > init() method. ViewRepository tracks whether it has been inited via a
>> > boolean value. The problem is, I want to redirect back to
>> ListRepositories
>> > if a devious user just types in the URL for ViewRepository which would
>> > bypass ListRepositories's call to ViewRepository's init().
>> >
>> > Currently I just return false, but this causes Tapestry to complain
>> with
>> > something like "root component not defined".
>> >
>> > Does anyone know how to redirect to another page in the setupRender()
>> > method?
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>
>

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





--
徐 依伟


Re: properties file does not support UTF8

2007-07-14 Thread Donyee

你要是用Eclipse的话,最好安装个属性文件插件,因为Eclipse本身的好像不好用
http://propedit.sourceforge.jp/eclipse/updates/

You'd better install a plugin for eclipse if you're using it.
http://propedit.sourceforge.jp/eclipse/updates/

2007/7/14, sun58224 <[EMAIL PROTECTED]>:

1.properties file does not support UTF8.
2.Sort BeanForms can not be changed.


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





--
徐 依伟


Re: T5 : How to assign Form component with an id ?

2007-07-14 Thread Donyee

Which version do you use? T5.05 works fine!

2007/7/15, Shing Hing Man <[EMAIL PROTECTED]>:

The exception for

with

@Component(id = "myForm")
private Form form;

in the page java class works.

Thanks!

Shing


--- Eugene Lozovan <[EMAIL PROTECTED]> wrote:

>  Hello again,
>
> as far as I understand, you'd like to have "form"
> component with
> id="myForm", right?
> So,  try this:
>
> ...
> 
>
>  E.L.
>
>
> On 14/07/07, Shing Hing Man <[EMAIL PROTECTED]>
> wrote:
> >
> >
> >  and 
> >
> > both give rendered id="form".
> >
> >
> >  gives me the
> same
> > exception as .
> >
> > Shing
> >
> >
> >
> >
> > --- Eugene Lozovan <[EMAIL PROTECTED]>
> wrote:
> >
> > > Hello,
> > >
> > > try to use  something like:
> > >
> > > 
> > > ...
> > > 
> > >
> > > E.L.
> > >
> > >
> > >
> > > On 14/07/07, Shing Hing Man <[EMAIL PROTECTED]>
> > > wrote:
> > > >
> > > > When I have
> > > >   
> > > >
> > > > in my html template, the rendered id is still
> > > "form".
> > > >
> > > >
> > > > When  I have ,
> > > >
> > > > I got the following exception.
> > > > Component test/Sum does not contain an
> embedded
> > > > component with id 'form'.
> > > >
> > > > Stack trace
> > > >
> > > > *
> > > >
> > > >
> > >
> >
> >
>
org.apache.tapestry.internal.structure.ComponentPageElementImpl.getEmbeddedElement
> > > > (ComponentPageElementImpl.java:831)
> > > > *
> > > >
> > > >
> > >
> >
> >
>
org.apache.tapestry.internal.structure.InternalComponentResourcesImpl.getEmbeddedComponent
> > > > (InternalComponentResourcesImpl.java:97)
> > > > *
> > > >
> > >
> >
>
com.man.testTapestry5.pages.test.Sum.containingPageDidLoad(Sum.java)
> > > > *
> > > >
> > >
> >
>
org.apache.tapestry.internal.structure.ComponentPageElementImpl$3.run(
> > > > ComponentPageElementImpl.java:92)
> > > > *
> > > >
> > >
> >
>
org.apache.tapestry.internal.structure.ComponentPageElementImpl.invoke(
> > > > ComponentPageElementImpl.java:923)
> > > > *
> > > >
> > > >
> > >
> >
> >
>
org.apache.tapestry.internal.structure.ComponentPageElementImpl.containingPageDidLoad
> > > > (ComponentPageElementImpl.java:772)
> > > > *
> > > >
> > >
> >
>
org.apache.tapestry.internal.structure.PageImpl.loaded(PageImpl.java:139)
> > > > *
> > > >
> > >
> >
>
org.apache.tapestry.internal.services.PageLoaderProcessor.loadPage(
> > > > PageLoaderProcessor.java:399)
> > > > *
> > > >
> > >
> >
>
org.apache.tapestry.internal.services.PageLoaderImpl.loadPage(
> > > > PageLoaderImpl.java:59)
> > > > *
> > > >
> > >
> >
>
org.apache.tapestry.internal.services.PagePoolImpl.checkout(
> > > > PagePoolImpl.java:70)
> > > > *
> > > >
> > >
> >
>
org.apache.tapestry.internal.services.RequestPageCacheImpl.get(
> > > > RequestPageCacheImpl.java:44)
> > > > *
> > > >
> > >
> >
>
org.apache.tapestry.internal.services.PageLinkHandlerImpl.handle(
> > > > PageLinkHandlerImpl.java:57)
> > > > *
> > > >
> > >
> >
>
org.apache.tapestry.internal.services.PageLinkHandlerImpl.handle(
> > > > PageLinkHandlerImpl.java:49)
> > > >
> > > >
> > > > Thanks in advance for any assistance!
> > > >
> > > > Shing
> > > >
> > > > Home page : http://uk.geocities.com/matmsh/
> > > >
> > > >
> > > >
> > > >
> > >
> >
>
___
> > > > To help you stay safe and secure online, we've
> > > developed the all new
> > > > Yahoo! Security Centre.
> > > http://uk.security.yahoo.com
> > > >
> > > >
> > >
> >
>
-
> > > > To unsubscribe, e-mail:
> > > [EMAIL PROTECTED]
> > > > For additional commands, e-mail:
> > > [EMAIL PROTECTED]
> > > >
> > > >
> > >
> >
> >
> > Home page : http://uk.geocities.com/matmsh/
> >
> >
> >
>
___
> > Yahoo! Mail is the world's favourite email. Don't
> settle for less, sign up
> > for
> > your free account today
> >
>
http://uk.rd.yahoo.com/evt=44106/*http://uk.docs.yahoo.com/mail/winter07.html
> >
> >
>
-
> > To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> > For additional commands, e-mail:
> [EMAIL PROTECTED]
> >
> >
>
=== message truncated ===


Home page : http://uk.geocities.com/matmsh/





___
New Yahoo! Mail is the ultimate force in competitive emailing. Find out more at 
the Yahoo! Mail Championships. Plus: play games and win prizes.
http://uk.rd.yahoo.com/evt=44106/*http://mail.yahoo.net/uk

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





--
徐 依伟


Re: T5: Architecture Overview

2007-07-12 Thread Donyee

I'm looking for it too!

2007/7/13, Adam Zimowski <[EMAIL PROTECTED]>:

Well, for instance sample request flow diagram demonstrating core
components involved when Tap 5 is at work. Something similar to
component render states diagram.

Perhaps discussion about Tapestry page cache and point out classes and
interfaces that implement it. On that note, maybe a list of most
important classes/interfaces and what they're responsible for would be
a good start about such "Tap 5 architecture overview" document.

Discussion about dependencies, which are the most important and how
they're used.

Setting up T5 developement environment.

Those are just few topics, but I think they'd be a good start.

Thanks

On 7/12/07, Renat Zubairov <[EMAIL PROTECTED]> wrote:
> Hi
>
> What kind of document you would like to see? What should be the
> content of such document?
>
> Renat
>
> On 12/07/07, Adam Zimowski <[EMAIL PROTECTED]> wrote:
> > Is there any documentation in general on how T5 is architected that
> > would help somebody begin studying T5 source code?
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
>
> --
> Best regards,
> Renat Zubairov
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

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





--
徐 依伟


Re: T5: How to retrieve message from default Errors.properties

2007-07-11 Thread Donyee

@Inject
private Messages _errorMessages;
Try this!

2007/7/11, Adam Zimowski <[EMAIL PROTECTED]>:

Thanks, but I've seen that. It's not what I've been trying to do.
Rather than overriding the message I simply want my application to
read Errors.properties just like tapestry does it.

On 7/11/07, Donyee <[EMAIL PROTECTED]> wrote:
> You can find it here!
> 
http://wiki.apache.org/tapestry/Tapestry5HowToOverrideTheDefaultErrorMessageBanner
>
> 2007/7/11, Adam Zimowski <[EMAIL PROTECTED]>:
> > Okay, I still don't know a "Tap5" way of doing this, so this works,
> > although that's an ugly hack:
> >
> > Template:
> >
> > 
> >
> > Page Class:
> >
> > public String getBanner() {
> > if(_unknownError) {
> > return "Unknown Error";
> > }
> > else {
> > return getDefaultBanner();
> > }
> > }
> >
> > private String getDefaultBanner() {
> > try {
> > Properties props = new Properties();
> > InputStream in =
> > 
getClass().getResourceAsStream("/org/apache/tapestry/corelib/components/Errors.properties");
> > props.load(in);
> > String banner = props.getProperty("default-banner");
> > in.close();
> > return banner;
> > }
> > catch(Exception e) {
> > return e.getMessage();
> > }
> > }
> >
> > However, wouldn't this be much simpler? (It doesn't work though).
> >
> > @Inject
> > @Path("classpath:org/apache/tapestry/corelib/components/Errors.properties")
> > private Messages _errorMessages;
> >
> > public String getBanner() {
> > if(_unknownError) {
> > return "Unknown Error";
> > }
> > else {
> > return _errorMessages.get("default-banner");
> > }
> > }
> >
> > I know that documentation for @Path annotation states it can only be
> > used in conjunction with Assets. But wouldn't this be a good case as
> > well? What am I missing?
> >
> > On 7/9/07, Adam Zimowski <[EMAIL PROTECTED]> wrote:
> > > Hi,
> > >
> > > In my page class I'd like to retrieve the original value for
> > > default-banner ("You must correct the following errors before you may
> > > continue.") which is stored in Errors.properties in tapestry-core.jar.
> > > I'd like to have this String accessible to my page class as a
> > > property. Is there a field annotation for this or should I just use
> > > standard property file read mechanism to get at that?
> > >
> > > Thanks
> > >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
>
> --
> 徐 依伟
>




--
徐 依伟


Re: T5: How to retrieve message from default Errors.properties

2007-07-11 Thread Donyee

You can find it here!
http://wiki.apache.org/tapestry/Tapestry5HowToOverrideTheDefaultErrorMessageBanner

2007/7/11, Adam Zimowski <[EMAIL PROTECTED]>:

Okay, I still don't know a "Tap5" way of doing this, so this works,
although that's an ugly hack:

Template:



Page Class:

public String getBanner() {
if(_unknownError) {
return "Unknown Error";
}
else {
return getDefaultBanner();
}
}

private String getDefaultBanner() {
try {
Properties props = new Properties();
InputStream in =
getClass().getResourceAsStream("/org/apache/tapestry/corelib/components/Errors.properties");
props.load(in);
String banner = props.getProperty("default-banner");
in.close();
return banner;
}
catch(Exception e) {
return e.getMessage();
}
}

However, wouldn't this be much simpler? (It doesn't work though).

@Inject
@Path("classpath:org/apache/tapestry/corelib/components/Errors.properties")
private Messages _errorMessages;

public String getBanner() {
if(_unknownError) {
return "Unknown Error";
}
else {
return _errorMessages.get("default-banner");
}
}

I know that documentation for @Path annotation states it can only be
used in conjunction with Assets. But wouldn't this be a good case as
well? What am I missing?

On 7/9/07, Adam Zimowski <[EMAIL PROTECTED]> wrote:
> Hi,
>
> In my page class I'd like to retrieve the original value for
> default-banner ("You must correct the following errors before you may
> continue.") which is stored in Errors.properties in tapestry-core.jar.
> I'd like to have this String accessible to my page class as a
> property. Is there a field annotation for this or should I just use
> standard property file read mechanism to get at that?
>
> Thanks
>

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





--
徐 依伟


Re: T5 Tutorial

2007-07-09 Thread Donyee

I change 5.05 to 5.04,then it works fine.

2007/7/10, Howard Lewis Ship <[EMAIL PROTECTED]>:

What version of Maven are you using?

On 7/9/07, Nazmul Bhuiyan <[EMAIL PROTECTED]> wrote:
>
> Hello,
>
> I'm following the T5 tutorial and getting the following error. I've ran this
> at my work pc. Is there any proxy issue here or some thing else?
>
> C:\tmp>mvn archetype:create -DarchetypeGroupId=org.apache.tapestry
> -DarchetypeArtifactId=quickstart -DarchetypeVersion=5.0.5
> -DgroupId=org.apache.tapestry -DartifactId=tapestry-tutorial1
> -DpackageName=org.apache.tapestry.tutorial
> [INFO] Scanning for projects...
> [INFO] Searching repository for plugin with prefix: 'archetype'.
> [INFO]
> 
> [ERROR] BUILD ERROR
> [INFO]
> 
> [INFO] The plugin 'org.apache.maven.plugins:maven-archetype-plugin' does not
> exist or no valid version could be found
> [INFO]
> 
> [INFO] For more information, run Maven with the -e switch
> [INFO]
> 
> [INFO] Total time: < 1 second
> [INFO] Finished at: Tue Jul 10 11:38:50 NZST 2007
> [INFO] Final Memory: 1M/2M
> [INFO]
> 
> --
> View this message in context: 
http://www.nabble.com/T5-Tutorial-tf4053179.html#a11513000
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


--
Howard M. Lewis Ship
TWD Consulting, Inc.
Independent J2EE / Open-Source Java Consultant
Creator and PMC Chair, Apache Tapestry
Creator, Apache HiveMind

Professional Tapestry training, mentoring, support
and project work.  http://howardlewisship.com

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





--
徐 依伟


Re: How to override the default validate message?

2007-07-06 Thread Donyee

Cool, I should try this first!
It works fine!

2007/7/6, Erik Vullings <[EMAIL PROTECTED]>:

Hi Donyee,

Please have a look here:
http://wiki.apache.org/tapestry/Tapestry5HowToOverrideTheDefaultErrorMessageBanner

Cheers
Erik


On 7/6/07, Malin Ljungh <[EMAIL PROTECTED]> wrote:
>
> No, sorry, I use T4.
> Don't know how it works in T5, unfortunately.
>
> Malin
>
>
> On 7/6/07, Donyee <[EMAIL PROTECTED]> wrote:
> >
> > Do you use the T5? I am using t5!
> > Thanks !
> >
> > 2007/7/6, Malin Ljungh <[EMAIL PROTECTED]>:
> > > You can use the following syntax for example:
> > >
> > > 
> > >
> > > /Malin
> > >
> > > On 7/6/07, Donyee <[EMAIL PROTECTED]> wrote:
> > > >
> > > > Hello everyone!
> > > > I want to change the default validate message,such as "You must
> > > > provide a value for ... ",
> > > > To change the source file maybe not grace! is there another way?
> > > >
> > > >
> > > >
> > > >
> > > > 徐 依伟
> > > >
> > >
> >
> >
> > --
> > 徐 依伟
> >
>




--
徐 依伟


Re: How to override the default validate message?

2007-07-06 Thread Donyee

Do you use the T5? I am using t5!
Thanks !

2007/7/6, Malin Ljungh <[EMAIL PROTECTED]>:

You can use the following syntax for example:



/Malin

On 7/6/07, Donyee <[EMAIL PROTECTED]> wrote:
>
> Hello everyone!
> I want to change the default validate message,such as "You must
> provide a value for ... ",
> To change the source file maybe not grace! is there another way?
>
>
>
>
> 徐 依伟
>




--
徐 依伟


How to override the default validate message?

2007-07-05 Thread Donyee

Hello everyone!
I want to change the default validate message,such as "You must
provide a value for ... ",
To change the source file maybe not grace! is there another way?




徐 依伟


May I use the tapestry-ioc other packages?

2007-05-20 Thread Donyee

I try to use the Tapestry-ioc  in the other packages,not just in the
.pages.* package.
Does it support this?
I try to use @Inject in my domain.service.Impl.AccountServiceImpl.java
code: @Inject  private AccountDao dao;
but it doesn't work!

Any suggestion?



徐 依伟


The webApp loading slowly? T5+Spring2

2007-05-19 Thread Donyee

Hi all, I am using T5.05 snapshot + Spring2 in my app. After I start
the server(Jetty or Tomcat5), when i click the pageLink (  ) in my
page sereral times ,then the app becomes slowly. The memory changes
not much.
The app is well before i  add the Spring to manage the Dao.
Does anyone meet this question?
Any idea is great!


徐 依伟


Re: Where is the Path annotation

2007-05-05 Thread Donyee

In T5.04 you can find it.



2007/5/2, Joshua Jackson <[EMAIL PROTECTED]>:

Dear all,

I wanted to try the guide on assets located here:
http://tapestry.apache.org/tapestry5/tapestry-core/guide/assets.html
But the problem is I can not find @Path anywhere in my tapestry library.
Currently I am using the latest tapestry5 (5.0.3) that is downloaded from
maven repo.
But then the javadoc is available here:
http://tapestry.apache.org/tapestry5/tapestry-core/apidocs/org/apache/tapestry/annotations/Path.html

Have I got something wrong here? Can somebody give me a hint on this?

Thanks in advance,
joshua




--
Chinese name:徐 依伟
English name: will


Where is the Date(java.util.Date) in the grid? T5

2007-04-25 Thread Donyee

I wrote a employee(pojo) with a  hiredate (Date type),
When it works with a grid, the grid didn't render the hiredate column.
Other types(int or string )  work fine!
Can anyone explain this?

thanks for any help!

--
Chinese name:徐 依伟
English name: will


Re: How to add a PageLink in a grid?

2007-04-24 Thread Donyee



更新
 

but how can i get a arg for the t:context?
I am new to T5!

2007/4/24, Eugene Lozovan <[EMAIL PROTECTED]>:

Yes, I also would like to know the way to have a grid with link on a page.
E.g. grid with users list and click on a row takes navigation to an
EditSpecifiedUser page.

Thanks in advance!

On 24/04/07, Donyee <[EMAIL PROTECTED]> wrote:
>
> Is there a simple way to add a pagelink in the row ?
>
> Some suggestion will be great!
> --
> Chinese name:徐 依伟
> English name: will
>




--
Chinese name:徐 依伟
English name: will


How to add a PageLink in a grid?

2007-04-24 Thread Donyee

Is there a simple way to add a pagelink in the row ?

Some suggestion will be great!
--
Chinese name:徐 依伟
English name: will


Re: Does the form support utf-8? (T5)

2007-04-23 Thread Donyee

Thank you so much! Nick!
I will try to dig the code!
Cheers!

2007/4/23, Nick Westgate <[EMAIL PROTECTED]>:

Hi Will.

This isn't in T5 yet, but it can be added with a RequestFilter.
In your AppModule.cpp add the code below.

There may already be a "contributeRequestFilters" method,
but it _must_ be renamed to "contributeRequestHandler".
Note that the TimingFilter is optional - it is something
already present from the maven archetype project.

 public void contributeRequestHandler(OrderedConfiguration 
configuration,
 @InjectService("TimingFilter")
 RequestFilter timingFilter,
 @InjectService("Utf8Filter")
 RequestFilter utf8Filter)
 {
 configuration.add("Utf8Filter", utf8Filter);
 configuration.add("Timing", timingFilter);
 }

 public RequestFilter buildUtf8Filter(
 @InjectService("RequestGlobals")
 final RequestGlobals requestGlobals)
 {
 return new RequestFilter()
 {
 public boolean service(Request request, Response response, 
RequestHandler handler)
 throws IOException
 {
 
requestGlobals.getHTTPServletRequest().setCharacterEncoding("UTF-8");
 return handler.service(request, response);
 }
 };
 }

Cheers,
Nick.


Donyee wrote:
> Hey , may  I ask  another  question? How to read  a utf-8 char from
> the form?  a TextField? I fill the form with a utf-8 char,then it
> couldn't display right!
>
>


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





--
Chinese name:徐 依伟
English name: will


Does the form support utf-8?

2007-04-23 Thread Donyee

Hey , may  I ask  another  question? How to read  a utf-8 char from
the form?  a TextField? I fill the form with a utf-8 char,then it
couldn't display right!


--
Chinese name:徐 依伟
English name: will


hello

2007-04-22 Thread Donyee

hello

--
Chinese name:徐 依伟
English name: will


[no subject]

2007-04-22 Thread Donyee

--
Chinese name:徐 依伟
English name: will


Re: Does T5.0.3 support chinese??

2007-04-16 Thread Donyee

Thank you Nick!
and I set  in the *.html file。

2007/4/16, Nick Westgate <[EMAIL PROTECTED]>:

> /*contributing a HttpServletRequestFilter  */
...
> doesn't work!
> Maybe something wrong!

I didn't check to see why it doesn't work, but I've been
looking into this issue too - for displaying Japanese.

The HttpServletRequestFilter approach is not the best way
to go about this, because it handles _all_ requests given
to Tapestry - we want to only alter page rendering ...

> Can anyone tell me a complete solution?

Yes! :-) Or at least, I think so. This solution was in a
Japanese Tapestry forum, and digging through the Tapestry
source code I think it's the best way - at least for now.

Just add this to your AppModule:

public static PageResponseRenderer decoratePageResponseRenderer(
@InjectService("PageMarkupRenderer")
final PageMarkupRenderer markupRenderer,
@InjectService("MarkupWriterFactory")
final MarkupWriterFactory markupWriterFactory, final Object delegate)
{

return new PageResponseRenderer()
{
public void renderPageResponse(Page page, Response response) throws 
IOException
{
MarkupWriter writer = markupWriterFactory.newMarkupWriter();
markupRenderer.renderPageMarkup(page, writer);
PrintWriter pw = response.getPrintWriter("text/html; 
charset=UTF-8");
writer.toMarkup(pw);
pw.flush();
}
};
}

Cheers,
Nick.


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





--
Chinese name:徐 依伟
English name: will


Re: [OT] mailing-list problems with GMail

2007-04-16 Thread Donyee

I got one lastnight!

2007/4/15, Jesse Kuhnert <[EMAIL PROTECTED]>:

Not sure, but if I were a spam blocking program I'd view your all numeric
email address as highly suspect.

On 4/15/07, Koka Kiknadze <[EMAIL PROTECTED]> wrote:
>
> Occasionally when trying to post reply I recieve
>
> Delivery to the following recipient failed permanently:
>
> users@tapestry.apache.org
>
> Technical details of permanent failure:
> PERM_FAILURE: SMTP Error (state 12): 552 spam score (5.1) exceeded
> threshold
>
>
> Does anyone have similar problem? In other words, WTF? :)
>
> TYA
>



--
Jesse Kuhnert
Tapestry/Dojo team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com




--
Chinese name:徐 依伟
English name: will