Re: Tapestry 5: running tutoriel

2007-11-15 Thread Michael Bernagou
Just to say her problem is fixed since she's my collegue.

The Eclipse we use here is a custom (crap) Eclipse and jetty and maven
plugins do not work normally. She used a normal Eclipse 3.2 WTP with the
regular plugins (plus some proxy configuration) and it now it works.

2007/11/14, Jeffrey ai [EMAIL PROTECTED]:

 Eli,

 Your mvn command should run without any manual download or settings.

 I have seen the similar error message before. My problem is caused by a
 broken maven plugin in my local repository, which is gotten from our
 incorrectly-configured repository server.  I would suggest you to try
 the following things:

 * Remove your
 $HOME/.m2/repository/org/apache/maven/plugins/maven-archetype-plugin
 or move it somewhere else

 * If you have $HOME/.m2/settings.xml setup, move it somewhere else

 * Try to run the command again. This will make you redownload the plugin
 from maven central repository, which should work.

 Good luck!
 Jeffrey Ai

 GUERARD Elisabeth wrote:
  Dear all,
 
 
  I try to run the tutoriel for Tapestry 5 at the following address:
  http://tapestry.apache.org/tapestry5/tutorial1/first.html
  I have problem with the first step: create an empty application by using
  feature of Maven, archetype.
 
  It 's the first time, i use Maven, I install it correctly, create an
  empty folder and run the following command:
  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
 
  I had the following error: [ERROR] BUILD ERROR
  [INFO]
  
  [INFO] The plugin 'org.apache.maven.plugins:maven-archetype-plugin' does
  not exist or no valid version could be found
 
  By looking at Maven 's website, about archetype, I found configuration
  of pom.xml and archetype.xml.
  I need to do the same in this case, isn't it?
  Thanks in advance for your help.
  Eli
 
 


 --
 Jeffrey Ai
 Software Developer Analyst
 MemberDirect(R) Product Development
 phone: 604 737 5957
 email: [EMAIL PROTECTED]
 website: www.memberdirect.ca

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




-- 
Michael Bernagou
Java Developper


Re: T5 Newbie : populate the value of a form in a bean

2007-11-15 Thread Michael Courcy


The title property of the video object is updated, I don't have a title
property on my page class.

I can't compile anything right now, but I'll try to put together a small
example tonight, if someone else hasn't posted something by then.

Josh

Josh It would be really really nice  !!!
If you do so I would make it a small wiki tutorial


Josh Canfield a écrit :

Hi Michael,


  

Thanks Josh, but do you have also a title property with getter and
setter in your page class ?




No, I only have the video getter/setter


  

And if yes (as I guess) whish value is updated when you submit the form
: MyPage.title or MyPage.video.title  ?




The title property of the video object is updated, I don't have a title
property on my page class.

I can't compile anything right now, but I'll try to put together a small
example tonight, if someone else hasn't posted something by then.

Josh

On Nov 14, 2007 11:01 AM, Michael Courcy [EMAIL PROTECTED] wrote:

  

Thanks Josh, but do you have also a title property with getter and
setter in your page class ?

And if yes (as I guess) whish value is updated when you submit the form
: MyPage.title or MyPage.video.title  ?

Josh Canfield a écrit :
  I want to populate from the form directly to the bean. But this
require


to use either the beanEditForm or a custom component.




You can get this to work. I use the textfield component for editing my
  

bean


objects. This is from a working emplate:
input t:id=*title* t:type=*textfield* t:size=*40* t:value=*
video.title* t:validate=*required* type=*text* /

My page class has a getVideo method which returns an object that has a
getTitle method.

Good luck,
Josh

On Nov 14, 2007 9:05 AM, Michael Courcy [EMAIL PROTECTED]
  

wrote:

  

You're right

here it is,  I remove the offending input

and use this instead

${user}-- ${user.name}

And I get

[EMAIL PROTECTED] -- A name

Obviously user is not null.

I think the problem does not come from tapestry but from me.
I want to populate from the form directly to the bean. But this require
to use either the beanEditForm or a custom component.

I 'm just influenced by other framework like struts2 for instance :

If you have something like that in your form

input name=user.name value=bla /

When the form is submitted struts2 tries to find if the controller
features a user property, and then if user features a name property
If the answer is yes to both it calls controller.getUser


().setName(bla);





Ezra Epstein a écrit :
  I always pause when hearing 100% sure.  An easy check/test is to
remove the offending input and stick in a simple ${user} and see if


indeed


you get the toString() value for your user object.



Michael Courcy [EMAIL PROTECTED] wrote: I'm 100% sure, user
  

is


not null



I have a getter and a setter for both : name and user

Thanks
Thiago H de Paula Figueiredo a écrit :


  

On Wed, 14 Nov 2007 12:47:06 -0200, Michael Courcy
 wrote:





 [input]

I have to provide the setter and the getter for name and I still get
an error when I submit.


  

What error? Make sure your user field is not null when the form is
submited. Also make sure you have public getters and setters, because
otherwise Tapestry cannot access them.




  

--
Michael Courcy
http://courcy.blogspot.com






  

--
Michael Courcy
http://courcy.blogspot.com






  



--
Michael Courcy
http://courcy.blogspot.com



Re: T4.0.2: How do I replace a Service via Hivemind?

2007-11-15 Thread Renat Zubairov
Hi

It's off course possible (thanks to Howard and his Hivemind ideas :) ) You
can actually write something like

implementation service-id=FULL SERVICE NAME HERE WITH MODULE ID

BLAH BLAH

invoke-factory model=singleton
construct class=YOUR CLASS NAME HERE
   !- ANY INITIALIZATION OR
INJECTIONS REQUIRED --
/construct
/invoke-factory
/implementation

More examples you can find for example here:

http://bookie.googlecode.com/svn/trunk/bookie-framework/src/main/resources/META-INF/hivemodule.xml

And off course your new class should implement interface of the service.
As service-id you need to specify full service ID, with module, something
like tapestry.render.Render or something like that.

Renat

On 15/11/2007, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:

 Hi,

 I'm using Tapestry in a portal environment. In configuration point
 tapestry.portlet.services.FactoryServices a service called render is
 stored, which I would like to replace with my own class. Is it possible to
 overwrite this entry or the configuration point within my 
 hivemodule.xmlbelonging to my portlet?

 I tried it by writing this to my local hivemodule.xml so the class of
 service-point Render points to my own RenderService, but it is ignored:

 service-point id=Render interface=
 org.apache.tapestry.engine.IEngineService

 The single service that should be referenced by a Portlet
 render request.

 invoke-factory
 construct class=RenderService
 set-service property=portletRenderer
 service-id=PortletRenderer/
 set-service property=request service-id=
 tapestry.portlet.PortletRequest/
 set-service property=pageResolver service-id=
 tapestry.portlet.resolver.PortletPageResolver/
 /construct
 /invoke-factory
 /service-point

 configuration-point id=FactoryServices schema-id=
 tapestry.services.EngineServices

 Configuration point for the factory default services. Each
 contributed service
 must have a unique name.

 /configuration-point

 contribution configuration-id=FactoryServices
 service name=home object=service:
 tapestry.portlet.services.Home/
 service name=action object=service:tapestry.services.Action/
 service name=direct object=service:tapestry.services.Direct/
 service name=page object=service:tapestry.services.Page/
 service name=reset object=service:tapestry.services.Reset/
 service name=restart object=service:tapestry.services.Restart
 /
 service name=asset object=service:
 tapestry.portlet.services.PortletAsset/
 service name=external object=service:
 tapestry.services.External/
 service name=exception object=service:
 tapestry.portlet.services.Exception/

 !-- Special one used for handling Portal RenderRequests --

 service name=render object=service:Render/
 /contribution

 Best regards

 Kay Thielmann
 Mitarbeiter / BC Government Themen
 Business Unit Information
 __
 MATERNA GmbH Information  Communications
 Voßkuhle 37 * 44141 Dortmund * Deutschland
 Tel.: +49 231 5599-8297
 [EMAIL PROTECTED] * www.materna.de
 Hauptsitz der MATERNA GmbH: Voßkuhle 37, 44141 Dortmund
 Geschäftsführer: Dr. Winfried Materna, Helmut an de Meulen, Ralph Hartwig
 Amtsgericht Dortmund HRB 5839


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




-- 
Best regards,
Renat Zubairov


T3 : How to include script script.aculo.us to tapestry 3 ?

2007-11-15 Thread Penyihir Kecil
Hi... i tried simple autocompletion using scriptaculous in tapestry 3
but it doesn't work

Home.html

html
head
titlescript.aculo.us Autocompleter functional test file/title
  meta http-equiv=content-type content=text/html; charset=utf-8 /
script src=js/prototype.js type=text/javascript/script
script src=js/scriptaculous.js type=text/javascript/script
script src=js/unittest.js type=text/javascript/script

/head

body
   input id=inputbox name=something type=text/
   div id=result style=display:none;inside/div

/body
script type=text/javascript language=javascript charset=utf-8
// ![CDATA[
  new 
Ajax.Autocompleter('inputbox','result','http://localhost:8080/Autocomplete.html');
// ]]
/script
/html

Home.page

Home.java
 


Autocomplete.html

litest1/li
litest2/li

Autocomplete.page

Autocomplete.java



does anybody help me, please.
thnx u

dwi ardi irawan

   
-
Be a better pen pal. Text or chat with friends inside Yahoo! Mail. See how.

T5: grid's column's width

2007-11-15 Thread Angelo Chen

Hi,

Is there a way to set the grid's column's width to a fixed size? without
that, the grid changes its width from page to page. Thanks.

A.C.
-- 
View this message in context: 
http://www.nabble.com/T5%3A-grid%27s-column%27s-width-tf4811010.html#a13765107
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



OGNL or expression problem - here it is again

2007-11-15 Thread Bastian Voigt
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi,
just upgraded to Tapestry 4.1.3 I have the following problem:

I am using an @If component with the following conditional expression:

ognl:user==null or (!user.hasPermission(@theClass.THE_PERMISSION))

which should evaluate to true, if there is no user logged in
(user==null) or a user without sufficient permissions is logged in.

It works, but I get a nasty exception stacktrace in my server.log every
time this expression is evaluated (see below).

I already had this problem earlier with Tap 4.1.2 but then it was even
worse because it actually broke my pages.

Any possible solution?

Regards
Bastian



[#|2007-11-15T13:23:24.320+0100|WARNING|sun-appserver9.1|javax.enterprise.system.stream.err|_ThreadID=24;_ThreadName=httpSSLWorkerThread-8080-1;_RequestID=22c86aaa-e31c-4091-a4e5-de65f776e663;|
java.lang.NullPointerException: target is null for method hasPermission
at ognl.OgnlRuntime.callMethod(OgnlRuntime.java:1128)
at ognl.ASTMethod.getValueBody(ASTMethod.java:90)
at ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:202)
at ognl.SimpleNode.getValue(SimpleNode.java:246)
at ognl.ASTChain.getValueBody(ASTChain.java:137)
at ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:202)
at ognl.SimpleNode.getValue(SimpleNode.java:246)
at ognl.ASTNot.getValueBody(ASTNot.java:49)
at
ognl.BooleanExpression.toGetSourceString(BooleanExpression.java:41)
at ognl.ASTNot.toGetSourceString(ASTNot.java:61)
at ognl.OgnlRuntime.getChildSource(OgnlRuntime.java:2415)
at ognl.OgnlRuntime.getChildSource(OgnlRuntime.java:2374)
at ognl.ASTOr.toGetSourceString(ASTOr.java:104)
at
org.apache.tapestry.services.impl.HiveMindExpressionCompiler.generateGetter(HiveMindExpressionCompiler.java:314)
at
org.apache.tapestry.services.impl.HiveMindExpressionCompiler.compileExpression(HiveMindExpressionCompiler.java:157)
at ognl.OgnlRuntime.compileExpression(OgnlRuntime.java:523)
at ognl.Ognl.compileExpression(Ognl.java:141)
at
org.apache.tapestry.services.impl.ExpressionCacheImpl.parse(ExpressionCacheImpl.java:152)
at
org.apache.tapestry.services.impl.ExpressionCacheImpl.getCompiledExpression(ExpressionCacheImpl.java:115)
at
$ExpressionCache_11643435063.getCompiledExpression($ExpressionCache_11643435063.java)
at
org.apache.tapestry.binding.ExpressionBinding.resolveExpression(ExpressionBinding.java:134)
at
org.apache.tapestry.binding.ExpressionBinding.getObject(ExpressionBinding.java:125)
at
org.apache.tapestry.binding.AbstractBinding.getObject(AbstractBinding.java:84)
at
org.apache.tapestry.enhance.EnhanceUtils.toBoolean(EnhanceUtils.java:173)
at $IfBean_3.getCondition($IfBean_3.java)
at
org.apache.tapestry.components.IfBean.evaluateCondition(IfBean.java:128)
at
org.apache.tapestry.components.IfBean.renderComponent(IfBean.java:66)
at
org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:725)
at
org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:179)
at
org.apache.tapestry.AbstractComponent.renderBody(AbstractComponent.java:539)
at
org.apache.tapestry.components.RenderBody.renderComponent(RenderBody.java:39)
at
org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:725)
at
org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:179)
at
org.apache.tapestry.AbstractComponent.renderBody(AbstractComponent.java:539)
at org.apache.tapestry.html.Body.renderComponent(Body.java:38)
at
org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:725)
at
org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:179)
at
org.apache.tapestry.AbstractComponent.renderBody(AbstractComponent.java:539)
at org.apache.tapestry.html.Shell.renderComponent(Shell.java:124)
at
org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:725)
at
org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:179)
at
org.apache.tapestry.BaseComponent.renderComponent(BaseComponent.java:107)
at
org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:725)
at
org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:179)
at
org.apache.tapestry.BaseComponent.renderComponent(BaseComponent.java:107)
at
org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:725)
at
org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:177)
at
org.apache.tapestry.AbstractPage.renderPage(AbstractPage.java:249)
at
org.apache.tapestry.engine.RequestCycle.renderPage(RequestCycle.java:397)

Re: T4 - access hivemind registry from another servlet

2007-11-15 Thread Renat Zubairov
Another way to extend Application servlet from tapestry and with your
implementation and then just replace ApplicationServlet declaration inside
web.xml with your new class.
Logic is more or less the same.

On 15/11/2007, Jili Lv [EMAIL PROTECTED] wrote:

 1. Add a filter class :

 package com.example;

 import java.io.IOException;

 import javax.servlet.Filter;
 import javax.servlet.FilterChain;
 import javax.servlet.FilterConfig;
 import javax.servlet.ServletException;
 import javax.servlet.ServletRequest;
 import javax.servlet.ServletResponse;

 import org.apache.hivemind.Registry;

 public class HivemindRegistryPublishFilter implements Filter {

 private FilterConfig config;

 static public Registry  getRegistry() {
 return _localRegistry.get();
 }

 public void init(FilterConfig config) throws ServletException {
 this.config = config;
 }

 public void destroy() {
 }

 public void doFilter(ServletRequest request, ServletResponse
 response, FilterChain chain)
 throws IOException, ServletException {
 try
 {
 // tapestry 4.1.2 servlet name is xxx.

 
 _localRegistry.set((Registry)config.getServletContext().getAttribute(
 org.apache.tapestry.Registry:
 + xxx));
 chain.doFilter(request, response);
 } finally {
 _localRegistry.set(null);
 }
 }

 static protected ThreadLocalRegistry  _localRegistry = new
 ThreadLocalRegistry();
 }

 2. configure web.xml

 filter
 filter-nameregistryFilter/filter-name
 filter-classcom.example.HivemindRegistryPublishFilter
 /filter-class
 /filter
 filter-mapping
 filter-nameregistryFilter/filter-name
 url-pattern/*/url-pattern
 /filter-mapping

 3. now get Registry use
 com.example.HivemindRegistryPublishFilter.getRegistry()

 this is base on the hivetranse source code
 http://hivetranse.sourceforge.net/

 2007/11/15, Paul Stanton [EMAIL PROTECTED]:
  Ok, so the tapestry servlet initializes and stores the hivemind registry
  for use within tapestry. My hivemind services and tapestry components
  and pages can find each other via injection or context method calls.
  That's fine, but now I've got separate servlet in which I need to have
  access to my hivemind services. What's the best way to do this?
 
  Thanks, Paul.
 
 
 
  -
  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]




-- 
Best regards,
Renat Zubairov


Re: OGNL or expression problem - here it is again

2007-11-15 Thread Alejandro Scandroli
Hi Bastian

Two suggestions that might help
1)  In ognl you don't necesarily need to ask if something is null using ==null
you can use ognl:!user
http://www.ognl.org/2.6.9/Documentation/html/LanguageGuide/coercion.html

ognl:!user or (!user.hasPermission(@theClass.THE_PERMISSION))

2) Given that it's a classic !A OR !B, flip it applying De Morgan's
ognl:!(user and user.hasPermission(@theClass.THE_PERMISSION)))

You can try them just to see if you get the same results.

Alejandro.

On Nov 15, 2007 1:38 PM, Bastian Voigt [EMAIL PROTECTED] wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 Hi,
 just upgraded to Tapestry 4.1.3 I have the following problem:

 I am using an @If component with the following conditional expression:

 ognl:user==null or (!user.hasPermission(@theClass.THE_PERMISSION))

 which should evaluate to true, if there is no user logged in
 (user==null) or a user without sufficient permissions is logged in.

 It works, but I get a nasty exception stacktrace in my server.log every
 time this expression is evaluated (see below).

 I already had this problem earlier with Tap 4.1.2 but then it was even
 worse because it actually broke my pages.

 Any possible solution?

 Regards
 Bastian



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



Re: expressions in If component?

2007-11-15 Thread Howard Lewis Ship
Nope, the default Tapestry expression language can only read
properties, not do higher order things the way OGNL can.  Because you
can change your Java class on the fly, there isn't a pressing need.  I
suspect a later release of Tapestry will expand the power of the
expression language.

On Nov 15, 2007 4:48 AM, Brandon Staton [EMAIL PROTECTED] wrote:



 Howard,

 Can you do things like  and || in your test parameter of the If
 component?  I'm not having much luck with that and don't want to have to
 write different java methods for all different combinations of expressions.

 Let me know if you get a chance,

 Brandon S Staton

 Technical Projects Manager

 RegEd
  2100 Gateway Centre Blvd.

 Suite 200

 Morrisville, NC 27560

 919-653-5259 (phone)

 919-653-6559 (fax)

 http://www.reged.com/





-- 
Howard M. Lewis Ship
Partner and Senior Architect at Feature50

Creator Apache Tapestry and Apache HiveMind

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



Re: T5 : Event system

2007-11-15 Thread Steph
Is there a version number or deadline already planned for this
functionality ?

Thiago H de Paula Figueiredo a écrit :
 On Wed, 14 Nov 2007 08:13:53 -0200, Stephane Decleire
 [EMAIL PROTECTED] wrote:

 I've tried without success to add an onchange event on a select box
 without firing the submit of the form.

 @OnEvent(value=onChange, component=mySelect)
 private String select() {
 log.info(new item selected);
 return null;
 }

 AFAIK, the binding of methods to Javascript events is not implemented
 yet.



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



Component extension

2007-11-15 Thread Ken in nashua

Folks,
 
Given the integration happenings with T-4.1, I wanted to get feedback on 
decision on Component extension.
 
I would like to get as much bang for the buck when developing a Component ... 
 
Is it more practical to develop a Component as an extension of DojoWidget ?
 
Your feedback and isight to this is appreciated.
 
Just looking for current best practices.
Best regards 
Ken in nashua
_
Climb to the top of the charts!  Play Star Shuffle:  the word scramble 
challenge with star power.
http://club.live.com/star_shuffle.aspx?icid=starshuffle_wlmailtextlink_oct

[T5] Simple question about select and enum

2007-11-15 Thread TNO
Hi,

I want to create a very simple select list from an enum.

t:select model=${reportModel} value=${report}/

But in a select component, the model (org.apache.tapestry.SelectModel)
is required, I try to use EnumSelectModel but it did not work...
I can't have my enum list...

please help, thanks

Tom



---
Antivirus avast! : message Sortant sain.
Base de donnees virale (VPS) : 071114-0, 14/11/2007
Analyse le : 15/11/2007 16:50:02
avast! - copyright (c) 1988-2007 ALWIL Software.
http://www.avast.com




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



Re: T5 Newbie : populate the value of a form in a bean

2007-11-15 Thread Ezra Epstein
Is it that the user object is null on page load?

If so, see the BeanEditForm's implementation of void onPrepareFromForm()


Michael Courcy [EMAIL PROTECTED] wrote: You're right

here it is,  I remove the offending input

and use this instead

${user}-- ${user.name}

And I get

[EMAIL PROTECTED] -- A name

Obviously user is not null.

I think the problem does not come from tapestry but from me.
I want to populate from the form directly to the bean. But this require 
to use either the beanEditForm or a custom component.

I 'm just influenced by other framework like struts2 for instance :

If you have something like that in your form

 [input] 

When the form is submitted struts2 tries to find if the controller 
features a user property, and then if user features a name property
If the answer is yes to both it calls controller.getUser().setName(bla);





Ezra Epstein a �crit :
 I always pause when hearing 100% sure.  An easy check/test is to remove the 
 offending  [input]  and stick in a simple ${user} and see if indeed you get 
 the toString() value for your user object.

 Michael Courcy  wrote: I'm 100% sure, user is not null

 I have a getter and a setter for both : name and user

 Thanks
 Thiago H de Paula Figueiredo a �crit :
   
 On Wed, 14 Nov 2007 12:47:06 -0200, Michael Courcy 
  wrote:

 
  [input] 

 I have to provide the setter and the getter for name and I still get 
 an error when I submit.
   
 What error? Make sure your user field is not null when the form is 
 submited. Also make sure you have public getters and setters, because 
 otherwise Tapestry cannot access them.

 


   


-- 
Michael Courcy
http://courcy.blogspot.com




Re: [T5] Default order by for Grid

2007-11-15 Thread Ezra Epstein
Why @Component of course

(aka, nevermind)



Ezra Epstein [EMAIL PROTECTED] wrote: Speaking of which, how does one get a 
reference to a contained component in T5?

Marcelo Lotif  wrote: The grid component have a method called 
setSortColumnId(), but for use it,
you got to have a reference to the component in your page's class

2007/11/13, Christoph Jaeger :

 Hi,

 is there an easy way of setting the default order by column for the Grid
 component?

 Christoph

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




-- 
Atenciosamente,
Marcelo Lotif




Re: [T5] Simple question about select and enum

2007-11-15 Thread TNO
No error message, but in the HTML page :

option value=[EMAIL PROTECTED]

instead of my enum value...

My java code :

public EnumSelectModel getReportModel() {
return new EnumSelectModel(Report.class, _resources.getMessages());
}




Michael Courcy a écrit :
 Do you have error messages ?

 TNO a écrit :
 Hi,

 I want to create a very simple select list from an enum.

 t:select model=${reportModel} value=${report}/

 But in a select component, the model (org.apache.tapestry.SelectModel)
 is required, I try to use EnumSelectModel but it did not work...
 I can't have my enum list...

 please help, thanks

 Tom



 ---
 Antivirus avast! : message Sortant sain.
 Base de donnees virale (VPS) : 071114-0, 14/11/2007
 Analyse le : 15/11/2007 16:50:02
 avast! - copyright (c) 1988-2007 ALWIL Software.
 http://www.avast.com




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


   




---
Antivirus avast! : message Sortant sain.
Base de donnees virale (VPS) : 071114-0, 14/11/2007
Analyse le : 15/11/2007 17:47:28
avast! - copyright (c) 1988-2007 ALWIL Software.
http://www.avast.com




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



Re: [T5] Simple question about select and enum

2007-11-15 Thread lasitha
Tom, try it without specifing a select model.

The following is working for me:
t:select clientId=report value=report /

Where the page class has just the report property and accessors.

Also note that you don't need to use expansions (the ${..}s) on these.

Cheers,
lasitha.

On Nov 15, 2007 10:00 PM, Michael Courcy [EMAIL PROTECTED] wrote:
 Do you have error messages ?

 TNO a écrit :

  Hi,
 
  I want to create a very simple select list from an enum.
 
  t:select model=${reportModel} value=${report}/
 
  But in a select component, the model (org.apache.tapestry.SelectModel)
  is required, I try to use EnumSelectModel but it did not work...
  I can't have my enum list...
 
  please help, thanks
 
  Tom
 
 
 
  ---
  Antivirus avast! : message Sortant sain.
  Base de donnees virale (VPS) : 071114-0, 14/11/2007
  Analyse le : 15/11/2007 16:50:02
  avast! - copyright (c) 1988-2007 ALWIL Software.
  http://www.avast.com
 
 
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 


 --
 Michael Courcy
 http://courcy.blogspot.com



 -
 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] Simple question about select and enum

2007-11-15 Thread TNO
It works ! thanks
but the Component Reference says that parameter model is required...

lasitha a écrit :
 Tom, try it without specifing a select model.

 The following is working for me:
 t:select clientId=report value=report /

 Where the page class has just the report property and accessors.

 Also note that you don't need to use expansions (the ${..}s) on these.

 Cheers,
 lasitha.

 On Nov 15, 2007 10:00 PM, Michael Courcy [EMAIL PROTECTED] wrote:
   
 Do you have error messages ?

 TNO a écrit :

 
 Hi,

 I want to create a very simple select list from an enum.

 t:select model=${reportModel} value=${report}/

 But in a select component, the model (org.apache.tapestry.SelectModel)
 is required, I try to use EnumSelectModel but it did not work...
 I can't have my enum list...

 please help, thanks

 Tom



 ---
 Antivirus avast! : message Sortant sain.
 Base de donnees virale (VPS) : 071114-0, 14/11/2007
 Analyse le : 15/11/2007 16:50:02
 avast! - copyright (c) 1988-2007 ALWIL Software.
 http://www.avast.com




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



   
 --
 Michael Courcy
 http://courcy.blogspot.com



 -
 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]



   



---
Antivirus avast! : message Sortant sain.
Base de donnees virale (VPS) : 071114-0, 14/11/2007
Analyse le : 15/11/2007 18:25:38
avast! - copyright (c) 1988-2007 ALWIL Software.
http://www.avast.com




Re: [Honeycomb] new release

2007-11-15 Thread Ehren

Is the HoneyComb site back up and running again?  I can't seem to find it on
JavaForge.

If it is not running is there any other way I can get the code?

Thank you,
Ehren


Marcus.Schulte wrote:
 
 I've put together a new release of honeycomb (
 http://honeycomb.javaforge.com/index.html
 http://honeycomb.javaforge.com/index.html  ), tapestry hibernate
 integration with session-per-conversation support).
 Biggest changes are:
 
 * re-structuring into 4 libraries
 * replaced the templates for the Core/Webapp projects with maven
 archetypes
 * Fixed rollback on RedirectException.
 * Fixed possible concurrency issue in cross-request service-model
 * Fixed: Removed dangerous loophole allowing a conversation to survive
 a rollback triggered by an exception.
 * Cleaned up HiveMind descriptors and moved them into the lib-modules.
 * added a Watch component to the tap-lib (calls a listener when a
 property has changed in a submit)
 
 
 

-- 
View this message in context: 
http://www.nabble.com/-Honeycomb--new-release-tf2289506.html#a13776402
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



Re: T5: grid's column's width

2007-11-15 Thread jeffrey ai

I am looking for the answer of the same question too.
The template of the Grid component doesn't embed a colGroup element.

- Quated from Grid.tml
table class=t-data-grid
thead t:id=columns/
tbody
tr t:id=rows/
/tbody
/table
- 

It seems to me that the only way to add column width is to write your own
component.
Is there anybody could provide some hints?

Jeffrey Ai


Angelo Chen wrote:
 
 Hi,
 
 Is there a way to set the grid's column's width to a fixed size? without
 that, the grid changes its width from page to page. Thanks.
 
 A.C.
 

-- 
View this message in context: 
http://www.nabble.com/T5%3A-grid%27s-column%27s-width-tf4811010.html#a13778439
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: Using the AbstractIntegrationTestSuite (T5.0.6)

2007-11-15 Thread Tobias Wehrum

Hi there,

I have a problem including the AbstractIntegrationTestSuite in my little 
tapestry application. Maybe the solution is easy, but being a newbie to 
java development in general and Tapestry as well as Selenium in 
particular doesn't help at all to solve it - so I ask you.


The code is as follows:


package org.apache.tapestry.tutorial;

import org.apache.tapestry.test.AbstractIntegrationTestSuite;
import org.junit.Test;

public class TestTesting extends AbstractIntegrationTestSuite
{
   public TestTesting()
   {
   super(src/test/webapp);
   }
  
   @Test

   public void testSomething() throws Exception
   {
   open(BASE_URL);

   assertTextPresent(Hauptseite);
   click(pagelink);
  
   assertTextPresent(Create New Address);

   }
}


The errors are:
   - The type TestTesting must implement the inherited abstract method 
Selenium.shiftKeyUp()
   - The type TestTesting must implement the inherited abstract method 
Selenium.dragAndDrop(String, String)
   - The type TestTesting must implement the inherited abstract method 
Selenium.mouseMoveAt(String, String)
   - The type TestTesting must implement the inherited abstract method 
Selenium.isOrdered(String, String)

[...well, and more like these...]
   - The type TestTesting must implement the inherited abstract method 
Selenium.setMouseSpeed(String)
   - The type TestTesting must implement the inherited abstract method 
Selenium.getAttributeFromAllWindows(String)



I downloaded selenium-remote-control-0.9.2 and included the jars from 
selenium-java-client-driver-0.9.2 and selenium-server-0.9.2 to my build 
path.



Thanks in advance,
Tobias

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



Re: T5 Newbie : populate the value of a form in a bean

2007-11-15 Thread Michael Courcy

Thanks a lot Josh
I'm going to try it now

Josh Canfield a écrit :

Hey Michael,

I didn't get to it last night, but here you go, a very simple example:

** Start.tml 
html xmlns:t=http://tapestry.apache.org/schema/tapestry_5_0_0.xsd;
  head
titleForm Test/title
  /head
  body
MyObject:br/
Name: ${myObject.name}br/
Number: ${myObject.number}br/
t:form t:id=myForm
  t:errors/
  t:label t:for=name/ input t:type=textfield t:id=name t:value=
myObject.name/br/
  t:label t:for=number/ input t:type=textfield t:id=number
t:value=myObject.number/br/
  input type=submit/
/t:form
  /body
/html

 Start.java 
*package* joshcan.test.myapp.pages;
**
*import* joshcan.test.myapp.model.TestObject;
*import* org.apache.tapestry.annotations.Persist;

/**
 * Start page of application myapp.
 */
*public* *class* Start
{
  @Persist // Store this object in the session...
*  private* TestObject _myObject;
*  *
*  public* *void* setupRender() {
*if* ( _myObject == *null* ) { // make sure we have an object to work
on.
  _myObject = *new* TestObject();
}
  }

*  public* TestObject getMyObject() {
*return* _myObject;
  }

*  public* *void* setMyObject(TestObject myObject) {
_myObject = myObject;
  }
}
 TestObject.java 
*

package* joshcan.test.myapp.model;

*public* *class* TestObject {

*  private* String name;
*  private* Long number;

*  public* String getName() {
*return* name;
  }

*  public* *void* setName(String name) {
*this*.name = name;
  }

*  public* Long getNumber() {
*return* number;
  }

*  public* *void* setNumber(Long number) {
*this*.number = number;
  }

}
Josh


On Nov 15, 2007 1:35 AM, Michael Courcy [EMAIL PROTECTED] wrote:

  

The title property of the video object is updated, I don't have a title
property on my page class.

I can't compile anything right now, but I'll try to put together a small
example tonight, if someone else hasn't posted something by then.

Josh
  

Josh It would be really really nice  !!!
If you do so I would make it a small wiki tutorial


Josh Canfield a écrit :
  Hi Michael,



  

Thanks Josh, but do you have also a title property with getter and
setter in your page class ?




No, I only have the video getter/setter



  

And if yes (as I guess) whish value is updated when you submit the form
: MyPage.title or MyPage.video.title  ?



The title property of the video object is updated, I don't have a title
property on my page class.

I can't compile anything right now, but I'll try to put together a small
example tonight, if someone else hasn't posted something by then.

Josh

On Nov 14, 2007 11:01 AM, Michael Courcy [EMAIL PROTECTED]
  

wrote:

  

Thanks Josh, but do you have also a title property with getter and
setter in your page class ?

And if yes (as I guess) whish value is updated when you submit the form
: MyPage.title or MyPage.video.title  ?

Josh Canfield a écrit :
  I want to populate from the form directly to the bean. But this
require



to use either the beanEditForm or a custom component.





You can get this to work. I use the textfield component for editing my

  

bean



objects. This is from a working emplate:
input t:id=*title* t:type=*textfield* t:size=*40* t:value=*
video.title* t:validate=*required* type=*text* /

My page class has a getVideo method which returns an object that has a
getTitle method.

Good luck,
Josh

On Nov 14, 2007 9:05 AM, Michael Courcy [EMAIL PROTECTED]

  

wrote:



You're right

here it is,  I remove the offending input

and use this instead

${user}-- ${user.name}

And I get

[EMAIL PROTECTED] -- A name

Obviously user is not null.

I think the problem does not come from tapestry but from me.
I want to populate from the form directly to the bean. But this


require


to use either the beanEditForm or a custom component.

I 'm just influenced by other framework like struts2 for instance :

If you have something like that in your form

input name=user.name value=bla /

When the form is submitted struts2 tries to find if the controller
features a user property, and then if user features a name property
If the answer is yes to both it calls controller.getUser



().setName(bla);




Ezra Epstein a écrit :
  I always pause when hearing 100% sure.  An easy check/test is to
remove the offending input and stick in a simple ${user} and see if



indeed



you get the toString() value for your user object.




Michael Courcy [EMAIL PROTECTED] wrote: I'm 100% sure, user

  

is



not null




I have a getter and a setter for both : name and user

Thanks
Thiago H de Paula Figueiredo a écrit :



  

On Wed, 14 Nov 2007 12:47:06 -0200, Michael Courcy
 wrote:






 [input]

I have to provide the setter and the getter for 

Re: T5: grid's column's width

2007-11-15 Thread jeffrey ai

I do noticed that the Grid component is not defined as final like some
other components.
I guess we could just inherit it and add a new template to extend its
feature.

Jeffrey Ai


jeffrey ai wrote:
 
 I am looking for the answer of the same question too.
 The template of the Grid component doesn't embed a colGroup element.
 
 - Quated from Grid.tml
   table class=t-data-grid
   thead t:id=columns/
   tbody
   tr t:id=rows/
   /tbody
   /table
 - 
 
 It seems to me that the only way to add column width is to write your own
 component.
 Is there anybody could provide some hints?
 
 Jeffrey Ai
 
 
 Angelo Chen wrote:
 
 Hi,
 
 Is there a way to set the grid's column's width to a fixed size? without
 that, the grid changes its width from page to page. Thanks.
 
 A.C.
 
 
 

-- 
View this message in context: 
http://www.nabble.com/T5%3A-grid%27s-column%27s-width-tf4811010.html#a13778493
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



Re: T5: Using the AbstractIntegrationTestSuite (T5.0.6)

2007-11-15 Thread Tobias Wehrum

Hi Howard,

then 0.8.0 is my version of choice?
(Will AbstractIntegrationTestSuite be upgraded at a later time?)

Thanks for your answer. :)

Regards,
Tobias

Howard Lewis Ship schrieb:

Well, there's your problem ... AbstractIntegrationTestSuite is coded
against a specific version of Selenium. As a convenience, it
implements all the methods of the Selenium interface (buts adds
improved exception reporting).  That interface has changes since
0.8.1.

On Nov 15, 2007 10:08 AM, Tobias Wehrum [EMAIL PROTECTED] wrote:
  

Hi there,

I have a problem including the AbstractIntegrationTestSuite in my little
tapestry application. Maybe the solution is easy, but being a newbie to
java development in general and Tapestry as well as Selenium in
particular doesn't help at all to solve it - so I ask you.

The code is as follows:


package org.apache.tapestry.tutorial;

import org.apache.tapestry.test.AbstractIntegrationTestSuite;
import org.junit.Test;

public class TestTesting extends AbstractIntegrationTestSuite
{
public TestTesting()
{
super(src/test/webapp);
}

@Test
public void testSomething() throws Exception
{
open(BASE_URL);

assertTextPresent(Hauptseite);
click(pagelink);

assertTextPresent(Create New Address);
}
}


The errors are:
- The type TestTesting must implement the inherited abstract method
Selenium.shiftKeyUp()
- The type TestTesting must implement the inherited abstract method
Selenium.dragAndDrop(String, String)
- The type TestTesting must implement the inherited abstract method
Selenium.mouseMoveAt(String, String)
- The type TestTesting must implement the inherited abstract method
Selenium.isOrdered(String, String)
[...well, and more like these...]
- The type TestTesting must implement the inherited abstract method
Selenium.setMouseSpeed(String)
- The type TestTesting must implement the inherited abstract method
Selenium.getAttributeFromAllWindows(String)


I downloaded selenium-remote-control-0.9.2 and included the jars from
selenium-java-client-driver-0.9.2 and selenium-server-0.9.2 to my build
path.


Thanks in advance,
Tobias

-
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 Newbie : populate the value of a form in a bean

2007-11-15 Thread Michael Courcy

Ok thanks.
I need to work on this component anyway. But things are not totally 
clear in my mind of the state of @Persist objects during the phase 
request. I 'm going to work on this as well.


Ezra Epstein a écrit :

Is it that the user object is null on page load?

If so, see the BeanEditForm's implementation of void onPrepareFromForm()


Michael Courcy [EMAIL PROTECTED] wrote: You're right

here it is,  I remove the offending input

and use this instead

${user}-- ${user.name}

And I get

[EMAIL PROTECTED] -- A name

Obviously user is not null.

I think the problem does not come from tapestry but from me.
I want to populate from the form directly to the bean. But this require 
to use either the beanEditForm or a custom component.


I 'm just influenced by other framework like struts2 for instance :

If you have something like that in your form

 [input] 

When the form is submitted struts2 tries to find if the controller 
features a user property, and then if user features a name property

If the answer is yes to both it calls controller.getUser().setName(bla);





Ezra Epstein a �crit :
  

I always pause when hearing 100% sure.  An easy check/test is to remove the 
offending  [input]  and stick in a simple ${user} and see if indeed you get the 
toString() value for your user object.

Michael Courcy  wrote: I'm 100% sure, user is not null

I have a getter and a setter for both : name and user

Thanks
Thiago H de Paula Figueiredo a �crit :
  

On Wed, 14 Nov 2007 12:47:06 -0200, Michael Courcy 
 wrote:



  
 [input] 

I have to provide the setter and the getter for name and I still get 
an error when I submit.
  

What error? Make sure your user field is not null when the form is 
submited. Also make sure you have public getters and setters, because 
otherwise Tapestry cannot access them.



  
  




  



--
Michael Courcy
http://courcy.blogspot.com



Re: T5 Newbie : populate the value of a form in a bean

2007-11-15 Thread Josh Canfield
Hey Michael,

I didn't get to it last night, but here you go, a very simple example:

** Start.tml 
html xmlns:t=http://tapestry.apache.org/schema/tapestry_5_0_0.xsd;
  head
titleForm Test/title
  /head
  body
MyObject:br/
Name: ${myObject.name}br/
Number: ${myObject.number}br/
t:form t:id=myForm
  t:errors/
  t:label t:for=name/ input t:type=textfield t:id=name t:value=
myObject.name/br/
  t:label t:for=number/ input t:type=textfield t:id=number
t:value=myObject.number/br/
  input type=submit/
/t:form
  /body
/html

 Start.java 
*package* joshcan.test.myapp.pages;
**
*import* joshcan.test.myapp.model.TestObject;
*import* org.apache.tapestry.annotations.Persist;

/**
 * Start page of application myapp.
 */
*public* *class* Start
{
  @Persist // Store this object in the session...
*  private* TestObject _myObject;
*  *
*  public* *void* setupRender() {
*if* ( _myObject == *null* ) { // make sure we have an object to work
on.
  _myObject = *new* TestObject();
}
  }

*  public* TestObject getMyObject() {
*return* _myObject;
  }

*  public* *void* setMyObject(TestObject myObject) {
_myObject = myObject;
  }
}
 TestObject.java 
*

package* joshcan.test.myapp.model;

*public* *class* TestObject {

*  private* String name;
*  private* Long number;

*  public* String getName() {
*return* name;
  }

*  public* *void* setName(String name) {
*this*.name = name;
  }

*  public* Long getNumber() {
*return* number;
  }

*  public* *void* setNumber(Long number) {
*this*.number = number;
  }

}
Josh


On Nov 15, 2007 1:35 AM, Michael Courcy [EMAIL PROTECTED] wrote:

 
  The title property of the video object is updated, I don't have a title
  property on my page class.
 
  I can't compile anything right now, but I'll try to put together a small
  example tonight, if someone else hasn't posted something by then.
 
  Josh
 Josh It would be really really nice  !!!
 If you do so I would make it a small wiki tutorial


 Josh Canfield a écrit :
   Hi Michael,
 
 
 
  Thanks Josh, but do you have also a title property with getter and
  setter in your page class ?
 
 
 
  No, I only have the video getter/setter
 
 
 
  And if yes (as I guess) whish value is updated when you submit the form
  : MyPage.title or MyPage.video.title  ?
 
 
 
  The title property of the video object is updated, I don't have a title
  property on my page class.
 
  I can't compile anything right now, but I'll try to put together a small
  example tonight, if someone else hasn't posted something by then.
 
  Josh
 
  On Nov 14, 2007 11:01 AM, Michael Courcy [EMAIL PROTECTED]
 wrote:
 
 
  Thanks Josh, but do you have also a title property with getter and
  setter in your page class ?
 
  And if yes (as I guess) whish value is updated when you submit the form
  : MyPage.title or MyPage.video.title  ?
 
  Josh Canfield a écrit :
I want to populate from the form directly to the bean. But this
  require
 
  to use either the beanEditForm or a custom component.
 
 
 
  You can get this to work. I use the textfield component for editing my
 
  bean
 
  objects. This is from a working emplate:
  input t:id=*title* t:type=*textfield* t:size=*40* t:value=*
  video.title* t:validate=*required* type=*text* /
 
  My page class has a getVideo method which returns an object that has a
  getTitle method.
 
  Good luck,
  Josh
 
  On Nov 14, 2007 9:05 AM, Michael Courcy [EMAIL PROTECTED]
 
  wrote:
 
 
  You're right
 
  here it is,  I remove the offending input
 
  and use this instead
 
  ${user}-- ${user.name}
 
  And I get
 
  [EMAIL PROTECTED] -- A name
 
  Obviously user is not null.
 
  I think the problem does not come from tapestry but from me.
  I want to populate from the form directly to the bean. But this
 require
  to use either the beanEditForm or a custom component.
 
  I 'm just influenced by other framework like struts2 for instance :
 
  If you have something like that in your form
 
  input name=user.name value=bla /
 
  When the form is submitted struts2 tries to find if the controller
  features a user property, and then if user features a name property
  If the answer is yes to both it calls controller.getUser
 
  ().setName(bla);
 
 
 
 
  Ezra Epstein a écrit :
I always pause when hearing 100% sure.  An easy check/test is to
  remove the offending input and stick in a simple ${user} and see if
 
  indeed
 
  you get the toString() value for your user object.
 
 
  Michael Courcy [EMAIL PROTECTED] wrote: I'm 100% sure, user
 
  is
 
  not null
 
 
  I have a getter and a setter for both : name and user
 
  Thanks
  Thiago H de Paula Figueiredo a écrit :
 
 
 
  On Wed, 14 Nov 2007 12:47:06 -0200, Michael Courcy
   wrote:
 
 
 
 
   [input]
 
  I have to provide the setter and the getter for name and I still
 get
  an error when I submit.
 
 
 
  What error? Make sure your user field is not null when the form is
  submited. Also make sure 

T5 : Editable Select

2007-11-15 Thread martin boulanger

Dear all,

I need to make an editable select box : i.e the user can either chose one of
the option in the select box or type a custom String. Is it possible to make
something like this with Tapestry 5?

Thanks,

Martin
-- 
View this message in context: 
http://www.nabble.com/T5-%3A-Editable-Select-tf4815487.html#a13776203
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



Re: T5: Using the AbstractIntegrationTestSuite (T5.0.6)

2007-11-15 Thread Howard Lewis Ship
Well, there's your problem ... AbstractIntegrationTestSuite is coded
against a specific version of Selenium. As a convenience, it
implements all the methods of the Selenium interface (buts adds
improved exception reporting).  That interface has changes since
0.8.1.

On Nov 15, 2007 10:08 AM, Tobias Wehrum [EMAIL PROTECTED] wrote:
 Hi there,

 I have a problem including the AbstractIntegrationTestSuite in my little
 tapestry application. Maybe the solution is easy, but being a newbie to
 java development in general and Tapestry as well as Selenium in
 particular doesn't help at all to solve it - so I ask you.

 The code is as follows:


 package org.apache.tapestry.tutorial;

 import org.apache.tapestry.test.AbstractIntegrationTestSuite;
 import org.junit.Test;

 public class TestTesting extends AbstractIntegrationTestSuite
 {
 public TestTesting()
 {
 super(src/test/webapp);
 }

 @Test
 public void testSomething() throws Exception
 {
 open(BASE_URL);

 assertTextPresent(Hauptseite);
 click(pagelink);

 assertTextPresent(Create New Address);
 }
 }


 The errors are:
 - The type TestTesting must implement the inherited abstract method
 Selenium.shiftKeyUp()
 - The type TestTesting must implement the inherited abstract method
 Selenium.dragAndDrop(String, String)
 - The type TestTesting must implement the inherited abstract method
 Selenium.mouseMoveAt(String, String)
 - The type TestTesting must implement the inherited abstract method
 Selenium.isOrdered(String, String)
 [...well, and more like these...]
 - The type TestTesting must implement the inherited abstract method
 Selenium.setMouseSpeed(String)
 - The type TestTesting must implement the inherited abstract method
 Selenium.getAttributeFromAllWindows(String)


 I downloaded selenium-remote-control-0.9.2 and included the jars from
 selenium-java-client-driver-0.9.2 and selenium-server-0.9.2 to my build
 path.


 Thanks in advance,
 Tobias

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





-- 
Howard M. Lewis Ship
Partner and Senior Architect at Feature50

Creator Apache Tapestry and Apache HiveMind

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



Re: [T5] Simple question about select and enum

2007-11-15 Thread martin boulanger

Hi,

Try this :
in your Page.html :

t:select id=enumVar value=enumVar/
-

in Page.java :

EnumType enumVar;

---

in your EnumeType.java

public enum EnumeType{
val1,Val2,Val3;
}



TNO wrote:
 
 Hi,
 
 I want to create a very simple select list from an enum.
 
 t:select model=${reportModel} value=${report}/
 
 But in a select component, the model (org.apache.tapestry.SelectModel)
 is required, I try to use EnumSelectModel but it did not work...
 I can't have my enum list...
 
 please help, thanks
 
 Tom
 
 
 
 ---
 Antivirus avast! : message Sortant sain.
 Base de donnees virale (VPS) : 071114-0, 14/11/2007
 Analyse le : 15/11/2007 16:50:02
 avast! - copyright (c) 1988-2007 ALWIL Software.
 http://www.avast.com
 
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/-T5--Simple-question-about-select-and-enum-tf4815229.html#a13776401
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] Removing page name shortening?

2007-11-15 Thread Vjeran Marcinko

Hello.

I can really speak from position of someone who just is learning Tapestry 5 
for first time, and from what Kevind Menard mentioned in few mails before, I 
can really see page name shortening as nothing but confusion and 
complication.


Referencing pages is quite straightforward, and one just have to look what 
sub-package it is conatined in, and what name of page class is, and ta-dah! 
Mabe this sufix stripping (in case when suffix is same as package) would not 
bother me so much if it is optional, although I would still see no reason to 
complicate perfectly straightforward and simple naming just for sake of few 
letters, but since it is mandatory, I really have to think for a moment when 
referencing them in PageLinks for instance.

Moreover, I stated case in my previous mail when I had class:
com.mycompany.myapp.pages.users.Users
and when Tapestry reported error because I should reference users/ instead 
of users/Users :(


Opinions ?

Regards,
Vjeran 



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



Re: [T5] Removing page name shortening?

2007-11-15 Thread Kevin Menard
Hi Vjeran,

I just want to clarify.  I'm not against name shortening in general.  I
actually think it's a very good idea.  In T4, all of my page names
essentially match my class names (although, this was configurable via the
page spec and I do take advantage of that on occasion) and the result is
beastly URLs.  For internal sites, it's really not a problem.  For public
ones, it's a pain in the neck.

So, I generally like what T5 has done.  What I raised as issues I think are
just artifacts of an alpha codebase.  I'd hope that those issues would be
addressed before a public release.  Once fixed, I largely see your problems
going away.  So long as you always use one of the link components, you
really shouldn't worry that much about how Tapestry names the URLs (granted,
there are exceptions for acegi and what not).

I guess having an option to disable the feature wouldn't hurt any, but I
think you're misdiagnosing the problem.

-- 
Kevin


On 11/15/07 12:48 PM, in article [EMAIL PROTECTED],
Vjeran Marcinko [EMAIL PROTECTED] wrote:

 Hello.
 
 I can really speak from position of someone who just is learning Tapestry 5
 for first time, and from what Kevind Menard mentioned in few mails before, I
 can really see page name shortening as nothing but confusion and
 complication.
 
 Referencing pages is quite straightforward, and one just have to look what
 sub-package it is conatined in, and what name of page class is, and ta-dah!
 Mabe this sufix stripping (in case when suffix is same as package) would not
 bother me so much if it is optional, although I would still see no reason to
 complicate perfectly straightforward and simple naming just for sake of few
 letters, but since it is mandatory, I really have to think for a moment when
 referencing them in PageLinks for instance.
 Moreover, I stated case in my previous mail when I had class:
 com.mycompany.myapp.pages.users.Users
 and when Tapestry reported error because I should reference users/ instead
 of users/Users :(
 
 Opinions ?
 
 Regards,
 Vjeran 
 
 
 -
 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: grid's column's width

2007-11-15 Thread Kevin Menard
Couldn't you just provide your own stylesheet?  The header and cell class
names are predictable.

-- 
Kevin


On 11/15/07 1:26 PM, in article [EMAIL PROTECTED], jeffrey ai
[EMAIL PROTECTED] wrote:

 
 I do noticed that the Grid component is not defined as final like some
 other components.
 I guess we could just inherit it and add a new template to extend its
 feature.
 
 Jeffrey Ai
 



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



Re: T5: Using the AbstractIntegrationTestSuite (T5.0.6)

2007-11-15 Thread Howard Lewis Ship
I tried to upgrade at some prior point, and found that version of
Selenium unstable.  I may give it another try at some point.

On Nov 15, 2007 10:22 AM, Tobias Wehrum [EMAIL PROTECTED] wrote:
 Hi Howard,

 then 0.8.0 is my version of choice?
 (Will AbstractIntegrationTestSuite be upgraded at a later time?)

 Thanks for your answer. :)

 Regards,
 Tobias

 Howard Lewis Ship schrieb:

  Well, there's your problem ... AbstractIntegrationTestSuite is coded
  against a specific version of Selenium. As a convenience, it
  implements all the methods of the Selenium interface (buts adds
  improved exception reporting).  That interface has changes since
  0.8.1.
 
  On Nov 15, 2007 10:08 AM, Tobias Wehrum [EMAIL PROTECTED] wrote:
 
  Hi there,
 
  I have a problem including the AbstractIntegrationTestSuite in my little
  tapestry application. Maybe the solution is easy, but being a newbie to
  java development in general and Tapestry as well as Selenium in
  particular doesn't help at all to solve it - so I ask you.
 
  The code is as follows:
 
 
  package org.apache.tapestry.tutorial;
 
  import org.apache.tapestry.test.AbstractIntegrationTestSuite;
  import org.junit.Test;
 
  public class TestTesting extends AbstractIntegrationTestSuite
  {
  public TestTesting()
  {
  super(src/test/webapp);
  }
 
  @Test
  public void testSomething() throws Exception
  {
  open(BASE_URL);
 
  assertTextPresent(Hauptseite);
  click(pagelink);
 
  assertTextPresent(Create New Address);
  }
  }
 
 
  The errors are:
  - The type TestTesting must implement the inherited abstract method
  Selenium.shiftKeyUp()
  - The type TestTesting must implement the inherited abstract method
  Selenium.dragAndDrop(String, String)
  - The type TestTesting must implement the inherited abstract method
  Selenium.mouseMoveAt(String, String)
  - The type TestTesting must implement the inherited abstract method
  Selenium.isOrdered(String, String)
  [...well, and more like these...]
  - The type TestTesting must implement the inherited abstract method
  Selenium.setMouseSpeed(String)
  - The type TestTesting must implement the inherited abstract method
  Selenium.getAttributeFromAllWindows(String)
 
 
  I downloaded selenium-remote-control-0.9.2 and included the jars from
  selenium-java-client-driver-0.9.2 and selenium-server-0.9.2 to my build
  path.
 
 
  Thanks in advance,
  Tobias
 
  -
  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]





-- 
Howard M. Lewis Ship
Partner and Senior Architect at Feature50

Creator Apache Tapestry and Apache HiveMind

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



Re: T5: grid's column's width

2007-11-15 Thread jeffrey ai

That's right. Thanks for you suggestion!

Cheers,
Jeffrey Ai



nirvdrum wrote:
 
 Couldn't you just provide your own stylesheet?  The header and cell class
 names are predictable.
 
 -- 
 Kevin
 
 
 On 11/15/07 1:26 PM, in article [EMAIL PROTECTED], jeffrey
 ai
 [EMAIL PROTECTED] wrote:
 
 
 I do noticed that the Grid component is not defined as final like some
 other components.
 I guess we could just inherit it and add a new template to extend its
 feature.
 
 Jeffrey Ai
 
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/T5%3A-grid%27s-column%27s-width-tf4811010.html#a13783819
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



Re: [T4.1.3] Tip for using using directlink and updatecomponents in a for loop

2007-11-15 Thread Jim Roycroft

I eventually found a situation where I needed this and it worked like a
charm! Thanks Andreas.

Jim



Andreas Andreou wrote:
 
 I've always had such direct links after their updateComponents
 and used updateComponents=clientId:componentWrapper
 (though nowadays updateComponents=componentWrapper is equivalent).
 
 So, I never had to have the link before the wrapper - but i believe
 (though
 never tried) that peekClientId() in IComponent is for this exact reason,
 so, in your first example, try
 
 updateComponents=ognl:components.componentWrapper.peekClientId()
 
 
 
 
 On 10/23/07, Jim Roycroft [EMAIL PROTECTED] wrote:


 I spent three hours on this silly thing so I hope this post will help you
 avoid that!

 I was testing this out with two iterations of the loop, and that's what
 caused me grief. As soon as I switched to four iterations, I figured out
 what was happening:

 I have a SimplePage.html which includes this:

  span jwcid=@For source=ognl:wordList value=ognl:word
 index=ognl:objectIndex 
 a href=# jwcid=@DirectLink updateComponents=componentWrapper
 listener=listener:showTheWord parameters=ognl:wordShow the word
 p
span jwcid=[EMAIL PROTECTED]
   div jwcid=showWordComponent/
/span
 /p
 /span
  /span


 I look at the generated page source and the clientId's within the
 @DirectLink links don't look right:

  span id=For
  a id=DirectLink

 href=/playing/SimplePage,$DirectLink.direct?sp=Sfirstamp;updateParts=componentWrapper
 onclick=return tapestry.linkOnClick(this.href,'DirectLink', false)Show
 the word
  p
 span id=componentWrapper
 Word:
 /span
  /p
  /span
  a id=DirectLink_0

 href=/playing/SimplePage,$DirectLink.direct?sp=Ssecondamp;updateParts=componentWrapper
 onclick=return tapestry.linkOnClick(this.href,'DirectLink_0',
 false)Show
 the word
  p
 span id=componentWrapper_0
 Word:
 /span
  /p

 Look at the second link... it still shows 'updateParts=componentWrapper'
 when it should be 'updateParts=componentWrapper_0'.

 The solution to this is trivial (once you know what's going on!). Simply
 move the directlink code below the component in question, so we have:

  span jwcid=@For source=ognl:wordList value=ognl:word
 index=ognl:objectIndex 
 p
span jwcid=[EMAIL PROTECTED]
   div jwcid=showWordComponent/
/span
 /p
 a href=# jwcid=@DirectLink updateComponents=componentWrapper
 listener=listener:showTheWord parameters=ognl:wordShow the word
 /span
  /span

 Now the links will be correct. The reason this happens is that the
 @DirectLink component will ask for the componentWrapper clientId on the
 first round, and it will default to the componentId because the clientId
 has
 not been set yet because componentWrapper has not been rendered. The
 second
 time around, the @DirectLink will still have the wrong value because it
 renders before the componentWrapper.

 I hope all that was clear if not, please ask questions and I'll be
 happy
 to re-write and re-word it.

 Jim

 --
 View this message in context:
 http://www.nabble.com/-T4.1.3--Tip-for-using-using-directlink-and-updatecomponents-in-a-for-loop-tf4674929.html#a13356699
 Sent from the Tapestry - User mailing list archive at Nabble.com.


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


 
 
 -- 
 Andreas Andreou - [EMAIL PROTECTED] - http://blog.andyhot.gr
 Tapestry / Tacos developer
 Open Source / JEE Consulting
 
 

-- 
View this message in context: 
http://www.nabble.com/-T4.1.3--Tip-for-using-using-directlink-and-updatecomponents-in-a-for-loop-tf4674929.html#a13785068
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



Re: T5 Newbie : populate the value of a form in a bean

2007-11-15 Thread Howard Lewis Ship
Generally, what you want to do is replace setupRender() with
onPrepareFromForm().

void onPrepareFromForm()
{
  if (_myObject == null) _myObject = new MyObject();
}

Prepare means the prepare event, fired from your Form component.
Prepare event is triggered when the form starts to render AND when it
starts to process a submission.  Instantiating and object is exactly
what prepare is intended for.

Tapestry will supply an id of form for the t:form component. If
you have multiple forms, they may end up being form, form_0,
form_1.  I tend to give an explicit id.

You test page is a little different, in that it displays the contents
of the myObject property as well, so your setupRender() should do the
job (because the _myObject field is persistent).

On Nov 15, 2007 11:39 AM, Josh Canfield [EMAIL PROTECTED] wrote:
 Hey Michael,

 I didn't get to it last night, but here you go, a very simple example:

 ** Start.tml 
 html xmlns:t=http://tapestry.apache.org/schema/tapestry_5_0_0.xsd;
   head
 titleForm Test/title
   /head
   body
 MyObject:br/
 Name: ${myObject.name}br/
 Number: ${myObject.number}br/
 t:form t:id=myForm
   t:errors/
   t:label t:for=name/ input t:type=textfield t:id=name t:value=
 myObject.name/br/
   t:label t:for=number/ input t:type=textfield t:id=number
 t:value=myObject.number/br/
   input type=submit/
 /t:form
   /body
 /html

  Start.java 
 *package* joshcan.test.myapp.pages;
 **
 *import* joshcan.test.myapp.model.TestObject;
 *import* org.apache.tapestry.annotations.Persist;

 /**
  * Start page of application myapp.
  */
 *public* *class* Start
 {
   @Persist // Store this object in the session...
 *  private* TestObject _myObject;
 *  *
 *  public* *void* setupRender() {
 *if* ( _myObject == *null* ) { // make sure we have an object to work
 on.
   _myObject = *new* TestObject();
 }
   }

 *  public* TestObject getMyObject() {
 *return* _myObject;
   }

 *  public* *void* setMyObject(TestObject myObject) {
 _myObject = myObject;
   }
 }
  TestObject.java 
 *

 package* joshcan.test.myapp.model;

 *public* *class* TestObject {

 *  private* String name;
 *  private* Long number;

 *  public* String getName() {
 *return* name;
   }

 *  public* *void* setName(String name) {
 *this*.name = name;
   }

 *  public* Long getNumber() {
 *return* number;
   }

 *  public* *void* setNumber(Long number) {
 *this*.number = number;
   }

 }
 Josh



 On Nov 15, 2007 1:35 AM, Michael Courcy [EMAIL PROTECTED] wrote:

  
   The title property of the video object is updated, I don't have a title
   property on my page class.
  
   I can't compile anything right now, but I'll try to put together a small
   example tonight, if someone else hasn't posted something by then.
  
   Josh
  Josh It would be really really nice  !!!
  If you do so I would make it a small wiki tutorial
 
 
  Josh Canfield a écrit :
Hi Michael,
  
  
  
   Thanks Josh, but do you have also a title property with getter and
   setter in your page class ?
  
  
  
   No, I only have the video getter/setter
  
  
  
   And if yes (as I guess) whish value is updated when you submit the form
   : MyPage.title or MyPage.video.title  ?
  
  
  
   The title property of the video object is updated, I don't have a title
   property on my page class.
  
   I can't compile anything right now, but I'll try to put together a small
   example tonight, if someone else hasn't posted something by then.
  
   Josh
  
   On Nov 14, 2007 11:01 AM, Michael Courcy [EMAIL PROTECTED]
  wrote:
  
  
   Thanks Josh, but do you have also a title property with getter and
   setter in your page class ?
  
   And if yes (as I guess) whish value is updated when you submit the form
   : MyPage.title or MyPage.video.title  ?
  
   Josh Canfield a écrit :
 I want to populate from the form directly to the bean. But this
   require
  
   to use either the beanEditForm or a custom component.
  
  
  
   You can get this to work. I use the textfield component for editing my
  
   bean
  
   objects. This is from a working emplate:
   input t:id=*title* t:type=*textfield* t:size=*40* t:value=*
   video.title* t:validate=*required* type=*text* /
  
   My page class has a getVideo method which returns an object that has a
   getTitle method.
  
   Good luck,
   Josh
  
   On Nov 14, 2007 9:05 AM, Michael Courcy [EMAIL PROTECTED]
  
   wrote:
  
  
   You're right
  
   here it is,  I remove the offending input
  
   and use this instead
  
   ${user}-- ${user.name}
  
   And I get
  
   [EMAIL PROTECTED] -- A name
  
   Obviously user is not null.
  
   I think the problem does not come from tapestry but from me.
   I want to populate from the form directly to the bean. But this
  require
   to use either the beanEditForm or a custom component.
  
   I 'm just influenced by other framework like struts2 for instance :
  
   If you have something like that in your 

T5: Customize Grid

2007-11-15 Thread Joshua Jackson
Dear all,

How do I customize the Grid component since if I use it as such:
t:grid source=list beanmodel=department rowsPerPage=1  /

it will generate and display default list of data.

I want to add one more column in the Grid with header Action

Thanks in advance

-- 
What you want today, may not exist tommorrow

Blog: http://joshuajava.wordpress.com/

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



Re: T5 Newbie : populate the value of a form in a bean

2007-11-15 Thread Michael Courcy

I've tried it
It works, got to understand my errors now.
Thanks a lot.

Josh Canfield a écrit :

Hey Michael,

I didn't get to it last night, but here you go, a very simple example:

** Start.tml 
html xmlns:t=http://tapestry.apache.org/schema/tapestry_5_0_0.xsd;
  head
titleForm Test/title
  /head
  body
MyObject:br/
Name: ${myObject.name}br/
Number: ${myObject.number}br/
t:form t:id=myForm
  t:errors/
  t:label t:for=name/ input t:type=textfield t:id=name t:value=
myObject.name/br/
  t:label t:for=number/ input t:type=textfield t:id=number
t:value=myObject.number/br/
  input type=submit/
/t:form
  /body
/html

 Start.java 
*package* joshcan.test.myapp.pages;
**
*import* joshcan.test.myapp.model.TestObject;
*import* org.apache.tapestry.annotations.Persist;

/**
 * Start page of application myapp.
 */
*public* *class* Start
{
  @Persist // Store this object in the session...
*  private* TestObject _myObject;
*  *
*  public* *void* setupRender() {
*if* ( _myObject == *null* ) { // make sure we have an object to work
on.
  _myObject = *new* TestObject();
}
  }

*  public* TestObject getMyObject() {
*return* _myObject;
  }

*  public* *void* setMyObject(TestObject myObject) {
_myObject = myObject;
  }
}
 TestObject.java 
*

package* joshcan.test.myapp.model;

*public* *class* TestObject {

*  private* String name;
*  private* Long number;

*  public* String getName() {
*return* name;
  }

*  public* *void* setName(String name) {
*this*.name = name;
  }

*  public* Long getNumber() {
*return* number;
  }

*  public* *void* setNumber(Long number) {
*this*.number = number;
  }

}
Josh


On Nov 15, 2007 1:35 AM, Michael Courcy [EMAIL PROTECTED] wrote:

  

The title property of the video object is updated, I don't have a title
property on my page class.

I can't compile anything right now, but I'll try to put together a small
example tonight, if someone else hasn't posted something by then.

Josh
  

Josh It would be really really nice  !!!
If you do so I would make it a small wiki tutorial


Josh Canfield a écrit :
  Hi Michael,



  

Thanks Josh, but do you have also a title property with getter and
setter in your page class ?




No, I only have the video getter/setter



  

And if yes (as I guess) whish value is updated when you submit the form
: MyPage.title or MyPage.video.title  ?



The title property of the video object is updated, I don't have a title
property on my page class.

I can't compile anything right now, but I'll try to put together a small
example tonight, if someone else hasn't posted something by then.

Josh

On Nov 14, 2007 11:01 AM, Michael Courcy [EMAIL PROTECTED]
  

wrote:

  

Thanks Josh, but do you have also a title property with getter and
setter in your page class ?

And if yes (as I guess) whish value is updated when you submit the form
: MyPage.title or MyPage.video.title  ?

Josh Canfield a écrit :
  I want to populate from the form directly to the bean. But this
require



to use either the beanEditForm or a custom component.





You can get this to work. I use the textfield component for editing my

  

bean



objects. This is from a working emplate:
input t:id=*title* t:type=*textfield* t:size=*40* t:value=*
video.title* t:validate=*required* type=*text* /

My page class has a getVideo method which returns an object that has a
getTitle method.

Good luck,
Josh

On Nov 14, 2007 9:05 AM, Michael Courcy [EMAIL PROTECTED]

  

wrote:



You're right

here it is,  I remove the offending input

and use this instead

${user}-- ${user.name}

And I get

[EMAIL PROTECTED] -- A name

Obviously user is not null.

I think the problem does not come from tapestry but from me.
I want to populate from the form directly to the bean. But this


require


to use either the beanEditForm or a custom component.

I 'm just influenced by other framework like struts2 for instance :

If you have something like that in your form

input name=user.name value=bla /

When the form is submitted struts2 tries to find if the controller
features a user property, and then if user features a name property
If the answer is yes to both it calls controller.getUser



().setName(bla);




Ezra Epstein a écrit :
  I always pause when hearing 100% sure.  An easy check/test is to
remove the offending input and stick in a simple ${user} and see if



indeed



you get the toString() value for your user object.




Michael Courcy [EMAIL PROTECTED] wrote: I'm 100% sure, user

  

is



not null




I have a getter and a setter for both : name and user

Thanks
Thiago H de Paula Figueiredo a écrit :



  

On Wed, 14 Nov 2007 12:47:06 -0200, Michael Courcy
 wrote:






 [input]

I have to provide 

Re: T4 - access hivemind registry from another servlet

2007-11-15 Thread Paul Stanton

ok thankyou, i've extended the servlet.

Renat Zubairov wrote:

Another way to extend Application servlet from tapestry and with your
implementation and then just replace ApplicationServlet declaration inside
web.xml with your new class.
Logic is more or less the same.

On 15/11/2007, Jili Lv [EMAIL PROTECTED] wrote:
  

1. Add a filter class :

package com.example;

import java.io.IOException;

import javax.servlet.Filter;
import javax.servlet.FilterChain;
import javax.servlet.FilterConfig;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;

import org.apache.hivemind.Registry;

public class HivemindRegistryPublishFilter implements Filter {

private FilterConfig config;

static public Registry  getRegistry() {
return _localRegistry.get();
}

public void init(FilterConfig config) throws ServletException {
this.config = config;
}

public void destroy() {
}

public void doFilter(ServletRequest request, ServletResponse
response, FilterChain chain)
throws IOException, ServletException {
try
{
// tapestry 4.1.2 servlet name is xxx.


_localRegistry.set((Registry)config.getServletContext().getAttribute(
org.apache.tapestry.Registry:
+ xxx));
chain.doFilter(request, response);
} finally {
_localRegistry.set(null);
}
}

static protected ThreadLocalRegistry  _localRegistry = new
ThreadLocalRegistry();
}

2. configure web.xml

filter
filter-nameregistryFilter/filter-name
filter-classcom.example.HivemindRegistryPublishFilter
/filter-class
/filter
filter-mapping
filter-nameregistryFilter/filter-name
url-pattern/*/url-pattern
/filter-mapping

3. now get Registry use
com.example.HivemindRegistryPublishFilter.getRegistry()

this is base on the hivetranse source code
http://hivetranse.sourceforge.net/

2007/11/15, Paul Stanton [EMAIL PROTECTED]:


Ok, so the tapestry servlet initializes and stores the hivemind registry
for use within tapestry. My hivemind services and tapestry components
and pages can find each other via injection or context method calls.
That's fine, but now I've got separate servlet in which I need to have
access to my hivemind services. What's the best way to do this?

Thanks, Paul.



-
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]



Re: [T5] Simple question about select and enum

2007-11-15 Thread Michael Courcy

Do you have error messages ?

TNO a écrit :

Hi,

I want to create a very simple select list from an enum.

t:select model=${reportModel} value=${report}/

But in a select component, the model (org.apache.tapestry.SelectModel)
is required, I try to use EnumSelectModel but it did not work...
I can't have my enum list...

please help, thanks

Tom



---
Antivirus avast! : message Sortant sain.
Base de donnees virale (VPS) : 071114-0, 14/11/2007
Analyse le : 15/11/2007 16:50:02
avast! - copyright (c) 1988-2007 ALWIL Software.
http://www.avast.com




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


  



--
Michael Courcy
http://courcy.blogspot.com


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



Re: [T5] Removing page name shortening?

2007-11-15 Thread Vjeran Marcinko


- Original Message - 
From: Kevin Menard [EMAIL PROTECTED]

To: users@tapestry.apache.org
Sent: Thursday, November 15, 2007 10:01 PM
Subject: Re: [T5] Removing page name shortening?



going away.  So long as you always use one of the link components, you
really shouldn't worry that much about how Tapestry names the URLs 
(granted,

there are exceptions for acegi and what not).


Hi.

I guess you are refering to ActionLinks and possibility of specifying page 
class or instance as return valu inside event methods. That way Tapestry 
generates URL containing proper page name. But thing is that Tapestry 5 
introduced this double-request action concept (original request and client 
redirect request) to solve back/refresh/bookmarking problems, and thus for a 
lot of links ActionLink adds overhead of one additional request since they 
just need to invoke page rendering (with possibly activation context values) 
and not some action being performed before that. Thus in these cases 
PageLink is the right one, and it requires page name specified in template.


Anyway, you mentioned that public sites require this short page names. OK, I 
have to admit I have almost no experience here since I produced always 
internal web apps. Yes, maybe configuration flag would be nice.


Regards,
Vjeran


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