Unit Test Cannot run correctly!

2007-08-30 Thread
My Application use spring2+tapestry5+hibernate3 ,it can work well in me
IE or  FF

so,I want to use Unit Test with testNG .I followed
http://tapestry.apache.org/tapestry5/tapestry-core/guide/unit-testing-pages.html

configrate spring with
http://wiki.apache.org/tapestry/Tapestry5SpringIntegration

I want to test a tapestry page, but I got Exception .IPublicDAO is my spring
class

I didnot know wrong where I make. can anybody help me  thanks a lot.

Caused by: java.lang.RuntimeException: Error obtaining injected value for
field cn.crc.pjblog.pages.BlogPostOne.pdao: No service implements the
interface cn.crc.model.impl.IPublicDAO.
at org.apache.tapestry.internal.services.InjectWorker.inject(
InjectWorker.java:84)
at org.apache.tapestry.internal.services.InjectWorker.transform(
InjectWorker.java:53)
at
$ComponentClassTransformWorker_114ba61b606.transform($ComponentClassTransformWorker_114ba61b606.java)
at
$ComponentClassTransformWorker_114ba61b603.transform($ComponentClassTransformWorker_114ba61b603.java)
at
org.apache.tapestry.internal.services.ComponentClassTransformerImpl.transformComponentClass
(ComponentClassTransformerImpl.java:131)
... 48 more
Caused by: java.lang.RuntimeException: No service implements the interface
cn.crc.model.impl.IPublicDAO.
at org.apache.tapestry.ioc.internal.RegistryImpl.getService(
RegistryImpl.java:447)
at org.apache.tapestry.ioc.internal.ObjectLocatorImpl.getService(
ObjectLocatorImpl.java:45)
at org.apache.tapestry.ioc.services.TapestryIOCModule$2.provide(
TapestryIOCModule.java:132)
at $ObjectProvider_114ba61b5d4.provide($ObjectProvider_114ba61b5d4.java)
at $ObjectProvider_114ba61b5ce.provide($ObjectProvider_114ba61b5ce.java)
at org.apache.tapestry.internal.services.InjectWorker.inject(
InjectWorker.java:80)
... 52 more
... Removed 22 stack frames




-- 
得与失都是生活


Re: [T5] SelectObject component added to the Wiki

2007-08-29 Thread
I user it it works well


select component's html source is
option value=IndexIndex

no /option

how to rectify it??

if i want to get this style ,how to modify the source
select size=1
   opiton value=1 IT department/option
/select
 the value and display value is defferent.

2007/8/29, Marcelo lotif [EMAIL PROTECTED]:
 or update the wiki, whatever... use a built in service looks more
 appropriate
 :]

 2007/8/29, Marcelo lotif [EMAIL PROTECTED]:
 
  Hi Davor,
  Can you send it to me?
 
  2007/8/29, Davor Hrg [EMAIL PROTECTED]:
  
   thnx,
   very nice example,
  
   I've liked it and modified it to use Tapestry builtin service:
   PropertyAccess
   instead of beanutils. If you like I can update the wiki..
  
   Davor Hrg
  
   On 8/28/07, Marcelo lotif  [EMAIL PROTECTED] wrote:
   
http://wiki.apache.org/tapestry/Tapestry5SelectObject
   
--
Atenciosamente,
Marcelo Lotif
   
  
 
 
 
  --
  Atenciosamente,
  Marcelo Lotif




 --
 Atenciosamente,
 Marcelo Lotif



-- 
得与失都是生活


Re: T5 Retriving the Client IP Address

2007-08-26 Thread
:-)it's happened to me.

2007/8/24, César Les [EMAIL PROTECTED]:
 I added this tip to the wiki (Tapestry5ObtainingHttpServletRequest),
 because is exactly that happened to me too. :)

 Regards

 Cesar.

 On 8/23/07, Charles Mason [EMAIL PROTECTED] wrote:
  On 8/23/07, César Les [EMAIL PROTECTED] wrote:
   may be you need to add the servlet-api.jar to your class path
 
  Thanks for that. It wouldn't compile because servlet-api.jar wasn't in
  my class path.
 
  The reason I thought it had been removed was because I was using
  eclipses auto complete drop down list box to see what methods were
  available. For what ever reason Eclipse decides to not to show any
  entry at all for methods that use classes it can't find. That will
  teach me to rely on Eclipses Auto complete too much.
 
  Thanks all for the help.
 
  Charlie M
 
  -
  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: FYI T5.0.5 Tree Component based on DHTMLgoodies.com drag 'n drop folder tree

2007-08-16 Thread
yeah! I will give my attention to it.

2007/8/15, Erik Vullings [EMAIL PROTECTED]:
 I've just created a simple T5 tree component:
 http://wiki.apache.org/tapestry/Tapestry5TreeComponent based on
 http://www.dhtmlgoodies.com/index.html?whichScript=drag-drop-folder-tree.
 Comments are welcome.

 Cheers
 Erik



-- 
得与失都是生活


Re: [ANN]T5 book: reviewers are needed

2007-08-03 Thread
I am looking forward to reading it.

2007/8/3, Nick Westgate [EMAIL PROTECTED]:
 This is great news, BTW. Good luck with it!

 Cheers,
 Nick.


 Kolesnikov, Alexander GNI wrote:
  I am writing a book on T5 and the publisher is looking for technical
  reviewers for this book.
  Please contact me directly if you want to review the book or if you have
  any questions.
 
  Cheers,
 
  Alexander
 
  --
  CONFIDENTIALITY NOTICE: If you have received this email in error, please 
  immediately notify the sender by e-mail at the address shown.  This email 
  transmission may contain confidential information.  This information is 
  intended only for the use of the individual(s) or entity to whom it is 
  intended even if addressed incorrectly.  Please delete it from your files 
  if you are not the intended recipient.  Thank you for your compliance.  
  Copyright 2007 CIGNA
  ==
 

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




-- 
得与失都是生活


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

2007-08-01 Thread
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?


 徐 依伟



-- 
得与失都是生活


Re: Is T5.0.6 in progress

2007-07-30 Thread
Yes adasal,you are great.I'm a terminal user.I am unable to do what
one hopes to do
until now.I  only learned how to use form in T5.

2007/7/31, adasal [EMAIL PROTECTED]:
 I think this is a question from moonfly2004.
 The way to help, I think, would be to work up examples in the wiki and as
 you hit features that aren't implemented, suggest implementations and
 workarounds. This will flesh out the functionality of T5 and provide
 starting points for committers. You may then take part in the discussion as
 to how the feature should be implemented. There is a more formal Apache
 process for this too, I think. But, if so it would be up to others to
 clarify.
 Adam

 On 27/07/07, 小司 [EMAIL PROTECTED] wrote:
 
  All of us help him??
  Thanks Howard
 
 
  2007/7/27, Nick Westgate [EMAIL PROTECTED]:
   We all want it to reach production quality soon, but what it is
   now took Howard a couple of months working full-time to achieve.
   Now he is working to pay the rent, so we must be patient.
  
   But it's certainly not dead, or even standing still ...
  
   (1) Dan Adams has been voted as a new committer - he will focus on T5.
   (2) Howard logged a JIRA issue for AJAX. I expect to be waiting for
   quite some time, and then I expect some big commits to appear. ;-)
  
   Cheers,
   Nick.
  
  
   蝈蝈龙 wrote:
Everyday I update the tp5 from svn trunk, but it seems few codes or no
codes
was committed recently.
I'm too anxious to see the tp5 release.
Now I'm developing a typical web2.0 application use T5 just for prove
tp5 is
enough strong , convenient and simple .
But using current preview release , I have to implement the many
  validator,
valueencoder, many basic components , and stand some tiny error.
   
I love t5. I hope tp5 become a mature and stable web framework as
  early as
possible.
  
  
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
 
 
  --
  得与失都是生活
 



-- 
得与失都是生活


Re: T5 Loading Component Assets

2007-07-24 Thread

You can read this link
http://tapestry.apache.org/tapestry5/tapestry-core/guide/assets.html
or this link (in chinese)
http://www.javaeye.com/article/78348

Maybe you can get some idea

2007/7/24, Todd Orr [EMAIL PROTECTED]:

Ugh. I created a small test project and it works correctly there.
Unfortunately, my real project is much larger. So, now I have the
incredibly tedious task of starting a new project and adding code bit
by bit until it breaks so that I can attempt to determine what is
causing the failure.

On 7/24/07, Nick Westgate [EMAIL PROTECTED] wrote:
 Hi Todd.

 I just tested this, not with a template, but just writing HTML.
 Details of my successful test follow, but first ...

 Are your images under the resources tree:
 \myapp\src\main\resources\jp\co\key_planning\myapp\tapestry\components

 That's important, I think.

 My component CheckBoxImage.java

 ...
 @Inject
 @Path(check_checked.gif)
 private Asset checkedImage;
 ...
 boolean beginRender(MarkupWriter writer)
 {
  writer.element(img, src, _test ? checkedImage : uncheckedImage);
 ...

 Turns out fine in the HTML:
 img 
src=/myapp/assets/jp/co/key_planning/myapp/tapestry/components/check_checked.gif

 And I can view the image in the browser at:
 
http://localhost:8080/myapp/assets/jp/co/key_planning/myapp/tapestry/components/check_checked.gif

 Cheers,
 Nick.


 Todd Orr wrote:
  From what I see in the GridColumns code, I've coded this correctly.
  I'm still confused about why this works for a core component but not a
  custom component. Unless anyone has any insight I'll create a Jira
  item.
 
 
  On 7/20/07, Todd Orr [EMAIL PROTECTED] wrote:
  Tap 5.0.5.
 
  I'm having trouble loading an asset from the classpath. Everywhere
  I've looked I see that it should be dead simple. However, when I
  attempt to view the image directly in the browser (firefox) I get:
 
  The image
  
http://localhost:8080/testapp/assets/com/test/testapp/web/components/slider_default_selected.png;
 
  cannot be displayed, because it contains errors.
 
 
  The code that injects the image is:
 
  @Inject
  @Path(slider_default_selected.png)
  //@Path(context:images/slider_default_selected.png) // testing
  private Asset defaultSelectedImage;
 
  ...
 
  getter too.
 
 
  The template code:
 
  img src=${defaultSelectedImage} /
 
 
  Has anyone run into this before? For testing the code works fine when
  using a context relative injection. However, this is not my ideal
  choice for packaging.
 
  Thanks
 
 
  -
  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]



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





--
得与失都是生活


The method onActionFrom[componentId] doesnot work in my application .

2007-07-17 Thread

hi:

The method onActionFrom[componentId] doesnot work in my application .
I use OnEvent annotation does not work too.When i click the submit
button ,The method onActionFromSumm is not invoked. but the method
onSuccess(),setupRender(),onActivate(),pageLoaded() all work well. I
can not find the mistake where I make. anybody can help me??

the source code is :
.html
html xmlns:t=http://tapestry.apache.org/schema/tapestry_5_0_0.xsd;
head
title${message:pagetitle}/title
/head
body
form t:type=Form t:id=frmList
t:errors/t:errors
table
tr
td${message:blogtitle}/td
tdinput t:type=TextField t:id=blogtitle 
value=blogtitle
size=25//td
/tr
tr
td${message:blogcontent}/td
tdinput t:type=TextArea  t:id=blogcontent
validate=required value=blogcontent cols=45 rows=5//td
/tr
tr
td${message:blogtag}/td
tdinput t:type=TextField t:id=blogtag value=blogtag 
size=25//td
/tr
tr
td${message:blogdate}/td
tdinput t:type=TextField t:id=blogdate 
value=blogdate
size=20//td
/tr
tr
td${message:inputuser}/td
tdinput t:type=TextField value=inputuser 
size=15//td
/tr
tr
td clospan=2 align=centert:submit t:id=Summ 
value=submit//td

/tr

/table
/form
/body
/html

.java
public class BlogPost {

@Persist
private String blogTitle;
@Persist
private String blogContent;
@Persist
private String blogTag;

private String blogDate;
private String inputUser;


@Component
private Form frmList;


public String getBlogContent() {
return blogContent;
}
public String getBlogDate() {
return blogDate;
}
public String getBlogTag() {
return blogTag;
}
public String getBlogTitle() {
return blogTitle;
}
public String getInputUser() {
return inputUser;
}
public void setBlogContent(String blogContent) {
this.blogContent = blogContent;
}
public void setBlogDate(String blogDate) {
this.blogDate = blogDate;
}
public void setBlogTag(String blogTag) {
this.blogTag = blogTag;
}
public void setBlogTitle(String blogTitle) {
this.blogTitle = blogTitle;
}
public void setInputUser(String inputUser) {
this.inputUser = inputUser;
}



void pageLoaded(){

System.out.println(Loaded is invoke1);
}

void onActivate(){

System.out.println(activate is loaded 2);
}

void setupRender(){
System.out.println(setupRender3);

//  String blogTitle = this.getBlogTitle();
//  String blogContent = this.getBlogContent();
//  String blogTag = this.getBlogTag();
//  String blogDate = this.getBlogDate();
//  String inputUser = this.getInputUser();
//  
//  System.out.println(blogTitle=+blogTitle);
//  System.out.println(blogContent=+blogContent);
//  System.out.println(blogTag=+blogTag);
//  System.out.println(blogDate=+blogDate);
//  System.out.println(inputUser=+inputUser);   
}


//  @OnEvent(value=action,component=summ)

void onActionFromSumm(){
System.out.println(frmList.getClientId());


String blogTitle = this.getBlogTitle();
String blogContent = this.getBlogContent();
String blogTag = this.getBlogTag();
String blogDate = this.getBlogDate();
String inputUser = this.getInputUser();

System.out.println(blogTitle=+blogTitle);
System.out.println(blogContent=+blogContent);
System.out.println(blogTag=+blogTag);
System.out.println(blogDate=+blogDate);
System.out.println(inputUser=+inputUser);

Long id =null;
DayJob dj = new 
DayJob(blogDate,blogContent,blogTitle,id,blogTag,inputUser);

this.dao.update(dj);

}

String onSuccess(){
 

Re: The method onActionFrom[componentId] doesnot work in my application .

2007-07-17 Thread

Thanks to Nick Westgate and Korben Zhang.I know the mistake where I make.
I confused  the Action Event and Component Event.

Thank you very much.


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

Your Summ component is a Submit, which does not send an Action event.
This is not well documented - perhaps only in the reference for Submit:
http://tapestry.apache.org/tapestry5/tapestry-core/component-parameters.html

You can also check the source for Submit to see the event is Selected.
So your handler for the event from Summ should be:

void OnSelectedFromSumm() { ...

Cheers,
Nick.



С˾ wrote:
 hi:

 The method onActionFrom[componentId] doesnot work in my application .
 I use OnEvent annotation does not work too.When i click the submit
 button ,The method onActionFromSumm is not invoked. but the method
 onSuccess(),setupRender(),onActivate(),pageLoaded() all work well. I
 can not find the mistake where I make. anybody can help me??



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





--
得与失都是生活


Re: T5.0.5 not support Chinese constants of enumeration types

2007-07-16 Thread

You can go to http://blog.csdn.net/doublel/archive/2007/06/01/1634599.aspx
I learn from javaeye, now It works well


2007/7/16, sun58224 [EMAIL PROTECTED]:

T5.0.5 not support Chinese constants of enumeration types


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





--
得与失都是生活


Re: T5: Architecture Overview

2007-07-12 Thread

I want to get it too.

2007/7/13, Donyee [EMAIL PROTECTED]:

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]




--
徐 依伟




--
得与失都是生活


How to override GridPager component

2007-07-09 Thread

This is tapestry's GidPager style  11.jpg

I want to that 22.jpg

How to do it???

Thanks


--
得与失都是生活
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Re: Select Component can't work in TP-5.0.5

2007-07-04 Thread

I meet the same problem.There is not any error tip.


2007/7/4, Allen Guo [EMAIL PROTECTED]:

Hi All,

I use select component in html template like this
   select t:type=select model=graphicModel value=shop.currTemplate.backgroundImage 
size=1 disabled=false/
The generated result is like this
   select id=select name=select size=1
 option disabled=disabled value=bug.jpgbug
 option disabled=disabled value=pet.pngpet
   /select
   img alt=[Error] class=t-error-icon t-invisible id=select:icon 
src=/bogo/assets/tapestry/field-error-marker.png

I used the latest TP5.0.5(not snapshot). It's really very strange. Can anyone 
give me a help?


Thank you in advance
Allen Guo



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





--
得与失都是生活


Re: [T5] Documentation

2007-06-26 Thread

说的对。主要是英语实在是不好。惭愧呀。能读懂就不错。在加上技术上一些术语。学起来很慢。看来只有提高我自己的英语水平了。谢谢你的提醒。

在 [EMAIL PROTECTED][EMAIL PROTECTED] 写道:

在 Tue, 26 Jun 2007 08:30:11 +0800,小司 [EMAIL PROTECTED] 写道:

 I'am a chinese user.every user should know Tapestry5 's request life
 cycle.i'm beginner.
 I want to get a detailed Tapestry5  request life cycle.Could you
 provide it in your tapestry5 document??


是不是中国人都不喜欢看文档?还是懒得去翻?明明文档就在那里,还要别人把链接
放到你面前?

beginner并不是理由。

不用强调I'am a chinese user,不会博得同情。

我是不想让老外老外笑话咱啊,说中国话他们不懂,呵呵。

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





--
得与失都是生活


Re: [T5] Documentation

2007-06-25 Thread

I'am a chinese user.every user should know Tapestry5 's request life
cycle.i'm beginner.
I want to get a detailed Tapestry5  request life cycle.Could you
provide it in your tapestry5 document??

--
得与失都是生活
Get and Lost are all life.