Re: Chinese can not display correctly

2008-06-24 Thread dhning
Hi,
  You should first utilize native2ascii(in jdk/bin) to convert the 
appname_zh_CN.properties to asc, then it should solve your probelem.
  I don't know why T5 deal with internationalization differently from T4. In 
T4, we developer don't have to convert the resource files, we just need input 
Chinese and it displays correctly.
  
  And if your IDE is eclipse, you can find some plugin to help you convert 
encoding automatically.

Thanks!

DH


- Original Message - 
From: "滕训华" <[EMAIL PROTECTED]>
To: "'Tapestry users'" 
Sent: Wednesday, June 25, 2008 8:44 AM
Subject: Chinese can not display correctly


>I use the ${message:labelKey} in the tml and define the labelKey in the
> properties with Chinese characters,but when the page display ,the Chinese
> can not display correctly. 
> 
> 
> 
> By the way,my properties file is define with UTF-8
> 
>

T5: addScript with @ symbol problems

2008-06-24 Thread Martijn Brinkers (List)
I am having some hard time using addScript. I am using PageLinkPopup
component which adds some javascript. It works just as long as I do not
add the @ symbol to the context parameters. The @ symbol is converted to
%40 and the following script is added with addScript:

new pageLinkPopup("pagelinkpopup", "user/edit/m.brinkers%40pobox.com",
"edit user", "width=600,height=300");

But, this results in:

Render queue error in BeginRender[Users:pagelinkpopup]: Conversion = 'p'

Somehow Tapestry chokes over the %40 or something.

I saw a bug posting by Chris Lewis
https://issues.apache.org/jira/browse/TAPESTRY-1818 which seems kind of
similar but I'm my Tapestry knowledge is not deep enough to see what I
do wrong.

Hope someone can help

Martijn Brinkers

Stack trace
  * java.util.Formatter
$FormatSpecifier.conversion(Formatter.java:2605)
  * java.util.Formatter
$FormatSpecifier.(Formatter.java:2633)
  * java.util.Formatter.parse(Formatter.java:2479)
  * java.util.Formatter.format(Formatter.java:2413)
  * java.util.Formatter.format(Formatter.java:2366)
  * java.lang.String.format(String.java:2770)
  * 
org.apache.tapestry5.internal.services.RenderSupportImpl.addScript(RenderSupportImpl.java:129)


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



[T5] About core components subclassing and methods with package visibility

2008-06-24 Thread Thiago H. de Paula Figueiredo
I've faced the same situation more than once trying to build my own  
components that extend or slightly changes some existing T5-core  
component. For example, subclassing the Label component so it always  
ignores its body and generates the label name from the corresponding field  
id. That could be (almost) accomplished if I could override its  
afterRender() method  
(http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Label.java?view=markup).  
The only solution I've found yet was copying the original component class  
and then changing it.


Other examples are an ActionLink and a PageLink subclasses that have it's  
own activation context logic, having an object as parameter, not the  
context value itself. Again, I had to copy code instead of subclassing.


Question to Howard: instead of having package visibility, could the core  
components have methods with protected visibility? And could their fields  
hava protected getters, so component subclasses can access superclass'  
parameter values? Or the current situation is the best one?


Thank you very much in advance.

Thiago

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



T5: clearing BeanModel properties

2008-06-24 Thread Andy Huhn
Hello,

It seems that if I create a BeanModel using 



BeanModel toReturn = _beanModelSrc.create( MyObject.class, false,
_cmpntRsrcs );



Things work as they should - I can then use the properties in the
BeanModel, as I expect to.

But, if I first clear all properties from the BeanModel, and then try to
add them back one-by-one, I receive an error:



BeanModel toReturn = _beanModelSrc.create( MyObject.class, false,
  _cmpntRsrcs );

toReturn.exclude( (String[])toReturn.getPropertyNames().toArray(
  new String[0] ) );

toReturn.add( "pstlCode" );



Here is the error I receive:

Unable to locate a block to edit property 'pstlCode' (with data type
'null') of object [EMAIL PROTECTED]: There is no defined way to
edit data of type 'null'. Make a contribution to the BeanBlockSource
service for this type.



Any ideas?


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



Re: What if "Page" was removed from page names?

2008-06-24 Thread Chris Lewis
I heartily agree with Filip. Even though the page name 'optimization' is
documented, I loathe the fact that I can do nothing to stop it. Please,
if this is implemented at least allow users the power to say 'yay' or
'nay' in our apps.

Filip S. Adamsen wrote:
> As long as it's configurable, I'm fine with it. :)
>
> -Filip
>
> On 2008-06-25 01:53, Howard Lewis Ship wrote:
>> I think it's common that you have an entity type, say Blog or Blogger,
>> and a corresponding page for viewing or editting that type.  A natural
>> name might be BlogPage or BloggerPage ... but that creates ugly URLs.
>>
>> What if Tapestry stripped off a "Page" suffix from page names?  Thus
>> you might have a BloggerPage class and BloggerPage.tml template, but
>> the page name would be "Blogger" and the URL would be "/blogger".
>>
>> Peeking over people's shoulders at Formos, I've been seeing people
>> using the -Page suffix already.  I just want to neaten up the URL
>> related to that.
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-- 
http://thegodcode.net


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



Chinese can not display correctly

2008-06-24 Thread 滕训华
I use the ${message:labelKey} in the tml and define the labelKey in the
properties with Chinese characters,but when the page display ,the Chinese
can not display correctly. 

 

By the way,my properties file is define with UTF-8



Re: T5: Programmatically clearing the database on unit tests

2008-06-24 Thread Mohan Zhang

Ok, I got something that works now. Turns out the fancy contribution wasn't
even necessary. For those who might run into this problem, here's how I was
able to clear the database:

DatabaseInitializer.java

public class DatabaseInitializer {
private Session session;
public DatabaseInitializer(Session s) {session=s;}

public void clearDatabase() {\\clear your db here using session}
}

Then in your test, get a PageTester, say PageTester tester, and then simply
autobuild with the registry, like so:

DatabaseInitializer dbi =
tester.getRegistry().autobuild(DatabaseInitializer.class)
dbi.clearDatabase();

To be honest, I'm not sure why this works since DatabaseInitializer is
pretty POJO, but it's a pretty lightweight way to keep your dangerous
testing operations separate from your app if (like me) you are just learning
Tapestry IOC :)

-Mo


Mohan Zhang wrote:
> 
> Hi Daniel,
> 
> Thanks for the tip--it was very helpful. I was able to get this working
> running my app in Jetty, but not when running my testng tests. I don't
> think the modules are getting loaded the way I think they are. I'm using
> PageTester, which claims
> 
> PageTester(String appPackage, String appName, String contextPath, Class...
> moduleClasses)
>   Initializes a PageTester that acts as a browser and a servlet
> container to test drive your Tapestry pages.
> 
> I've tried adding various module classes but the
> contributeApplicationInitialization code is still not being called. Any
> ideas?
> 
> 
> 
> Daniel Jue wrote:
>> 
>> BTW ApplicationInitializerFilter is the interface you want to implement.
>> 
>> On Tue, Jun 24, 2008 at 5:45 PM, Daniel Jue <[EMAIL PROTECTED]> wrote:
>> 
>>> Try looking for
>>> public class UserInitializerImpl implements ApplicationInitializerFilter
>>> {
>>> ...
>>>  void initializeApplication(Context context, ApplicationInitializer
>>> initializer){..reset your stuff in here..}
>>> ..
>>> }
>>>
>>>
>>> Then in your app module (or just the module you use for testing)
>>> contribute
>>> that app initializer
>>> like this:
>>>
>>> /**
>>>  * This is a initializer class that will be run when Tapestry
>>> starts.
>>>  * @param configuration The registry's configuration
>>>  * @param passwordEncoder built automatically and injected in
>>>  * @param saltSource built automatically and injected in
>>>  * @param session built automatically and injected in
>>>  */
>>> public static void contributeApplicationInitializer(
>>> OrderedConfiguration
>>> configuration,
>>> final PasswordEncoder passwordEncoder,
>>> final SaltSourceService saltSource, final Session session) {
>>> configuration.add("UserInitializer", new UserInitializerImpl(
>>> passwordEncoder, saltSource, session));
>>> }
>>>
>>> The example above shows how you can pass in things like a session, etc. 
>>> Of
>>> course this is not always needed.
>>>
>>> On Tue, Jun 24, 2008 at 4:56 PM, Mohan Zhang
>>> <[EMAIL PROTECTED]<[EMAIL PROTECTED]>>
>>> wrote:
>>>

 Is there anything in Tapestry 5 that makes it easy to programmatically
 clear
 the database? I'm unit-testing my DAOs and it'd be cool if I could
 write
 an
 @BeforeMethod that clears the database. I suppose I could always write
 a
 TestDao that encapsulates these operations, but I just thought I'd
 check
 in
 case anyone had come up with a better way. I noticed that a lot of
 what's
 in
 tapestry-test deals with the front-end.
 --
 View this message in context:
 http://www.nabble.com/T5%3A-Programmatically-clearing-the-database-on-unit-tests-tp18099886p18099886.html
 Sent from the Tapestry - User mailing list archive at Nabble.com.


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


>>>
>> 
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/T5%3A-Programmatically-clearing-the-database-on-unit-tests-tp18099886p18102762.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



Re: What if "Page" was removed from page names?

2008-06-24 Thread Filip S. Adamsen

As long as it's configurable, I'm fine with it. :)

-Filip

On 2008-06-25 01:53, Howard Lewis Ship wrote:

I think it's common that you have an entity type, say Blog or Blogger,
and a corresponding page for viewing or editting that type.  A natural
name might be BlogPage or BloggerPage ... but that creates ugly URLs.

What if Tapestry stripped off a "Page" suffix from page names?  Thus
you might have a BloggerPage class and BloggerPage.tml template, but
the page name would be "Blogger" and the URL would be "/blogger".

Peeking over people's shoulders at Formos, I've been seeing people
using the -Page suffix already.  I just want to neaten up the URL
related to that.


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



What if "Page" was removed from page names?

2008-06-24 Thread Howard Lewis Ship
I think it's common that you have an entity type, say Blog or Blogger,
and a corresponding page for viewing or editting that type.  A natural
name might be BlogPage or BloggerPage ... but that creates ugly URLs.

What if Tapestry stripped off a "Page" suffix from page names?  Thus
you might have a BloggerPage class and BloggerPage.tml template, but
the page name would be "Blogger" and the URL would be "/blogger".

Peeking over people's shoulders at Formos, I've been seeing people
using the -Page suffix already.  I just want to neaten up the URL
related to that.

-- 
Howard M. Lewis Ship

Creator Apache Tapestry and Apache HiveMind

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



Re: T5: Programmatically clearing the database on unit tests

2008-06-24 Thread Mohan Zhang

Hi Daniel,

Thanks for the tip--it was very helpful. I was able to get this working
running my app in Jetty, but not when running my testng tests. I don't think
the modules are getting loaded the way I think they are. I'm using
PageTester, which claims

PageTester(String appPackage, String appName, String contextPath, Class...
moduleClasses)
  Initializes a PageTester that acts as a browser and a servlet
container to test drive your Tapestry pages.

I've tried adding various module classes but the
contributeApplicationInitialization code is still not being called. Any
ideas?



Daniel Jue wrote:
> 
> BTW ApplicationInitializerFilter is the interface you want to implement.
> 
> On Tue, Jun 24, 2008 at 5:45 PM, Daniel Jue <[EMAIL PROTECTED]> wrote:
> 
>> Try looking for
>> public class UserInitializerImpl implements ApplicationInitializerFilter
>> {
>> ...
>>  void initializeApplication(Context context, ApplicationInitializer
>> initializer){..reset your stuff in here..}
>> ..
>> }
>>
>>
>> Then in your app module (or just the module you use for testing)
>> contribute
>> that app initializer
>> like this:
>>
>> /**
>>  * This is a initializer class that will be run when Tapestry starts.
>>  * @param configuration The registry's configuration
>>  * @param passwordEncoder built automatically and injected in
>>  * @param saltSource built automatically and injected in
>>  * @param session built automatically and injected in
>>  */
>> public static void contributeApplicationInitializer(
>> OrderedConfiguration
>> configuration,
>> final PasswordEncoder passwordEncoder,
>> final SaltSourceService saltSource, final Session session) {
>> configuration.add("UserInitializer", new UserInitializerImpl(
>> passwordEncoder, saltSource, session));
>> }
>>
>> The example above shows how you can pass in things like a session, etc. 
>> Of
>> course this is not always needed.
>>
>> On Tue, Jun 24, 2008 at 4:56 PM, Mohan Zhang
>> <[EMAIL PROTECTED]<[EMAIL PROTECTED]>>
>> wrote:
>>
>>>
>>> Is there anything in Tapestry 5 that makes it easy to programmatically
>>> clear
>>> the database? I'm unit-testing my DAOs and it'd be cool if I could write
>>> an
>>> @BeforeMethod that clears the database. I suppose I could always write a
>>> TestDao that encapsulates these operations, but I just thought I'd check
>>> in
>>> case anyone had come up with a better way. I noticed that a lot of
>>> what's
>>> in
>>> tapestry-test deals with the front-end.
>>> --
>>> View this message in context:
>>> http://www.nabble.com/T5%3A-Programmatically-clearing-the-database-on-unit-tests-tp18099886p18099886.html
>>> Sent from the Tapestry - User mailing list archive at Nabble.com.
>>>
>>>
>>> -
>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>>
>>
> 
> 

-- 
View this message in context: 
http://www.nabble.com/T5%3A-Programmatically-clearing-the-database-on-unit-tests-tp18099886p18102148.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



Re: Required parameters: also not null?

2008-06-24 Thread Howard Lewis Ship
Working on this now, and there are plenty of cases where a binding is
required but the value may be null; for example, TextField (the value
may initially be null, but must be bound).

On Tue, Jun 24, 2008 at 1:17 PM, Matt Kerr <[EMAIL PROTECTED]> wrote:
> the 'value' proposition you mention is forward compatibility, no?
>
> i guess if fwd compatibility is not a concern - sure, do whatever.
>
>
> On Tue, Jun 24, 2008 at 3:23 PM, Howard Lewis Ship <[EMAIL PROTECTED]> wrote:
>> True, my concern is that we'll find that every use of required=true
>> also has acceptNull=false, in which case we add complexity without
>> providing value.
>>
>> On Tue, Jun 24, 2008 at 12:12 PM, Filip S. Adamsen <[EMAIL PROTECTED]> wrote:
>>> +1 on something like that.
>>>
>>> -Filip
>>>
>>> On 2008-06-24 19:48, Thiago H. de Paula Figueiredo wrote:

 Em Tue, 24 Jun 2008 14:32:15 -0300, Matt Kerr <[EMAIL PROTECTED]>
 escreveu:

> why not specify whether params allow null - rather than break things ?
> default to the old behavior.
>
> it's not uncommon to have a null param - dunno why it would be
> different in a component.

 Agreed 100%. Required = some value must be given to the parameter. Not
 null = some not null value must be given. Required != not null.

 We could add some like this to @Parameter and support it in tapestry-core
 easily:

 boolean acceptNull() default true;

 Then anyone writing components would get the automatic null value checking
 if wanted or needed without disrupting old code or changing how parameters
 work.

 Thiago

 -
 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
>>
>> Creator Apache Tapestry and Apache HiveMind
>>
>> -
>> 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

Creator Apache Tapestry and Apache HiveMind

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



Re: ANN: Tapestry 5 Talk

2008-06-24 Thread Howard Lewis Ship
Glad it went well!

On Tue, Jun 24, 2008 at 2:22 PM, Igor Drobiazko
<[EMAIL PROTECTED]> wrote:
> As already posted we gave a Tapestry 5 talk today. Approximately 80
> attendees were there. The people seemed to be excited about Tapestry 5.
> We've got a very positive feedback after the talk. Let's see if these
> attendees will join the mailing list.
>
> We will publish the slides and some pics in the next days.
>
> It was also very nice to meet nille hammer (a member of this list) whose
> home is ca. 120 miles away from city the the talk took place.
>
> On Wed, Jun 4, 2008 at 8:41 AM, Igor Drobiazko <[EMAIL PROTECTED]>
> wrote:
>
>> Hi all,
>>
>> me and Renat Zubairov will give a Tapestry 5 Talk at our local JUG (24th
>> June):
>> http://rheinjug.de/images/stories/017_vortrag_tapestry/017_poster.pdf
>>
>> The talk is in German. If you are living in the area of Düsseldorf
>> (Germany), be invited.
>>
>> The sponsor of the talk provides free food and drinks. Furthermore
>> JetBrains will raffle a IntelliJ licence and some books.
>>
>> --
>> Best regards,
>>
>> Igor Drobiazko
>
>
>
>
> --
> Best regards,
>
> Igor Drobiazko
>



-- 
Howard M. Lewis Ship

Creator Apache Tapestry and Apache HiveMind

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



Re: T5: Programmatically clearing the database on unit tests

2008-06-24 Thread Daniel Jue
BTW ApplicationInitializerFilter is the interface you want to implement.

On Tue, Jun 24, 2008 at 5:45 PM, Daniel Jue <[EMAIL PROTECTED]> wrote:

> Try looking for
> public class UserInitializerImpl implements ApplicationInitializerFilter {
> ...
>  void initializeApplication(Context context, ApplicationInitializer
> initializer){..reset your stuff in here..}
> ..
> }
>
>
> Then in your app module (or just the module you use for testing) contribute
> that app initializer
> like this:
>
> /**
>  * This is a initializer class that will be run when Tapestry starts.
>  * @param configuration The registry's configuration
>  * @param passwordEncoder built automatically and injected in
>  * @param saltSource built automatically and injected in
>  * @param session built automatically and injected in
>  */
> public static void contributeApplicationInitializer(
> OrderedConfiguration
> configuration,
> final PasswordEncoder passwordEncoder,
> final SaltSourceService saltSource, final Session session) {
> configuration.add("UserInitializer", new UserInitializerImpl(
> passwordEncoder, saltSource, session));
> }
>
> The example above shows how you can pass in things like a session, etc.  Of
> course this is not always needed.
>
> On Tue, Jun 24, 2008 at 4:56 PM, Mohan Zhang <[EMAIL PROTECTED]<[EMAIL 
> PROTECTED]>>
> wrote:
>
>>
>> Is there anything in Tapestry 5 that makes it easy to programmatically
>> clear
>> the database? I'm unit-testing my DAOs and it'd be cool if I could write
>> an
>> @BeforeMethod that clears the database. I suppose I could always write a
>> TestDao that encapsulates these operations, but I just thought I'd check
>> in
>> case anyone had come up with a better way. I noticed that a lot of what's
>> in
>> tapestry-test deals with the front-end.
>> --
>> View this message in context:
>> http://www.nabble.com/T5%3A-Programmatically-clearing-the-database-on-unit-tests-tp18099886p18099886.html
>> Sent from the Tapestry - User mailing list archive at Nabble.com.
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>


Re: T5: Programmatically clearing the database on unit tests

2008-06-24 Thread Daniel Jue
Try looking for
public class UserInitializerImpl implements ApplicationInitializerFilter {
...
 void initializeApplication(Context context, ApplicationInitializer
initializer){..reset your stuff in here..}
..
}


Then in your app module (or just the module you use for testing) contribute
that app initializer
like this:

/**
 * This is a initializer class that will be run when Tapestry starts.
 * @param configuration The registry's configuration
 * @param passwordEncoder built automatically and injected in
 * @param saltSource built automatically and injected in
 * @param session built automatically and injected in
 */
public static void contributeApplicationInitializer(
OrderedConfiguration
configuration,
final PasswordEncoder passwordEncoder,
final SaltSourceService saltSource, final Session session) {
configuration.add("UserInitializer", new UserInitializerImpl(
passwordEncoder, saltSource, session));
}

The example above shows how you can pass in things like a session, etc.  Of
course this is not always needed.

On Tue, Jun 24, 2008 at 4:56 PM, Mohan Zhang
<[EMAIL PROTECTED]<[EMAIL PROTECTED]>>
wrote:

>
> Is there anything in Tapestry 5 that makes it easy to programmatically
> clear
> the database? I'm unit-testing my DAOs and it'd be cool if I could write an
> @BeforeMethod that clears the database. I suppose I could always write a
> TestDao that encapsulates these operations, but I just thought I'd check in
> case anyone had come up with a better way. I noticed that a lot of what's
> in
> tapestry-test deals with the front-end.
> --
> View this message in context:
> http://www.nabble.com/T5%3A-Programmatically-clearing-the-database-on-unit-tests-tp18099886p18099886.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: ANN: Tapestry 5 Talk

2008-06-24 Thread Igor Drobiazko
As already posted we gave a Tapestry 5 talk today. Approximately 80
attendees were there. The people seemed to be excited about Tapestry 5.
We've got a very positive feedback after the talk. Let's see if these
attendees will join the mailing list.

We will publish the slides and some pics in the next days.

It was also very nice to meet nille hammer (a member of this list) whose
home is ca. 120 miles away from city the the talk took place.

On Wed, Jun 4, 2008 at 8:41 AM, Igor Drobiazko <[EMAIL PROTECTED]>
wrote:

> Hi all,
>
> me and Renat Zubairov will give a Tapestry 5 Talk at our local JUG (24th
> June):
> http://rheinjug.de/images/stories/017_vortrag_tapestry/017_poster.pdf
>
> The talk is in German. If you are living in the area of Düsseldorf
> (Germany), be invited.
>
> The sponsor of the talk provides free food and drinks. Furthermore
> JetBrains will raffle a IntelliJ licence and some books.
>
> --
> Best regards,
>
> Igor Drobiazko




-- 
Best regards,

Igor Drobiazko


Re: dynamic link in actionlink

2008-06-24 Thread Sven Homburg
read the bottom of this page
http://tapestry.apache.org/tapestry5/tapestry-core/ref/org/apache/tapestry5/corelib/components/ActionLink.html

2008/6/24 tapestry5 <[EMAIL PROTECTED]>:

>
> I have a scenario where I am creating multiple actionlink in a loop. But I
> want to use the same id for all the actionlinks.
>
> Test.jsp
>
> 
>  rank
> ${student.rank}
> 
>
>
> So in my Test.java I have
>
> Object onActionFromRank(final long _ student)
> {
>Now here I am getting student.id but I also want selected rank. I
> don't
> know how to get selected rank from .tml. This is not inside form.
>
> }
>
> --
> View this message in context:
> http://www.nabble.com/dynamic-link-in-actionlink-tp18100111p18100111.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
with regards
Sven Homburg
http://tapestry5-components.googlecode.com
http://chenillekit.googlecode.com


dynamic link in actionlink

2008-06-24 Thread tapestry5

I have a scenario where I am creating multiple actionlink in a loop. But I
want to use the same id for all the actionlinks.

Test.jsp


 rank
${student.rank}
 


So in my Test.java I have

Object onActionFromRank(final long _ student)
{
Now here I am getting student.id but I also want selected rank. I don’t
know how to get selected rank from .tml. This is not inside form.

}

-- 
View this message in context: 
http://www.nabble.com/dynamic-link-in-actionlink-tp18100111p18100111.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



T5: Programmatically clearing the database on unit tests

2008-06-24 Thread Mohan Zhang

Is there anything in Tapestry 5 that makes it easy to programmatically clear
the database? I'm unit-testing my DAOs and it'd be cool if I could write an
@BeforeMethod that clears the database. I suppose I could always write a
TestDao that encapsulates these operations, but I just thought I'd check in
case anyone had come up with a better way. I noticed that a lot of what's in
tapestry-test deals with the front-end.
-- 
View this message in context: 
http://www.nabble.com/T5%3A-Programmatically-clearing-the-database-on-unit-tests-tp18099886p18099886.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



Re: 5.0.13 IE javascript error

2008-06-24 Thread Sven Homburg
please share i bit more code around your problem
tml and js snippet should help

2008/6/24 Joachim Van der Auwera <[EMAIL PROTECTED]>:

> Thanks Sven, but what exactly are you referring to?
>
> If you are referring to the use of RenderSupport for javascript, then I
> should explain a bit.
>
> I have already had to make various changes in my Layout classes etc to
> assure they work with the move of the javascript to the bottom of the page.
> The last problem I faced was that the onchange on some of my select items
> use prototype and were run (causing javascript errors in IE) before
> prototype.js is loaded. To fix that, I explicitly refer to prototype in
> "" section in my Layout class. I know this results in prototype being
> included twice, but I don't know of a way to fix this as I seem to have a
> chicken and egg problem here.
>
> Thanks for the help,
> Joachim
>
>
> Sven Homburg wrote:
>
>> please read
>> http://tapestry.apache.org/news.html#Tapestry%205.0.13
>>
>>
>
>  2008/6/23 Joachim Van der Auwera <[EMAIL PROTECTED]>:
>>
>>
>>
>>> Hi,
>>>
>>> after upgrade of my application to tapestry 5.0.13 I get a "unknown
>>> runtime
>>> error" on loading the page in IE.
>>>
>>> This is reported at line 2403 of prototype.js on the line
>>> "else element.innerHTML = content.stripScripts()"
>>>
>>> Does anybody have any idea how this problem can be remedied?
>>>
>>> Kind regards,
>>> Joachim
>>>
>>> --
>>> Joachim Van der Auwera
>>> PROGS bvba, progs.be
>>>
>>>
>>> -
>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>>
>>>
>>>
>>
>>
>>
>>
>
>
> --
> Joachim Van der Auwera
> PROGS bvba, progs.be
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
with regards
Sven Homburg
http://tapestry5-components.googlecode.com
http://chenillekit.googlecode.com


Re: T5: t5Components Window seems not to support showEffect and other options

2008-06-24 Thread Sven Homburg
ok, now i understand
for this problem there is an issue in tapestry jira

http://issues.apache.org/jira/browse/TAPESTRY-2234

2008/6/24 Martijn Brinkers (List) <[EMAIL PROTECTED]>:

> Thanks,
>
> but that doesn't solve my problem :)
>
> I'm unable to set showEffect and some other properties (see my original
> posting) because of quoting.
>
> Martijn Brinkers
>
> On Tue, 2008-06-24 at 22:03 +0200, Sven Homburg wrote:
> > here a short sample intial closed window:
> >
> > MyPage.tml snippet:
> >
> > Open Window
> >
> > 
> >
> > 
> > function showWindow()
> > {
> > ${window2.componentResources.id}.setTitle("This is Window 2")
> > ${window2.componentResources.id}.setHTMLContent("... here come
> some
> > senseless content ...")
> > ${window2.componentResources.id}.showCenter()
> > }
> > 
> >
> > MyPage.java snippet
> >
> > @Component(parameters = {"width=300", "height=300",
> > "style=bluelighting", "show=false"})
> > @Property
> > private Window window;
> >
> >
> > 2008/6/24 Martijn Brinkers (List) <[EMAIL PROTECTED]>:
> >
> > > I'm trying to change some options for the t5Components/Window component
> > > but I cannot get the showEffect correct. I extended Window and override
> > > the configure method:
> > >
> > >protected void configure(JSONObject options)
> > >{
> > >options.put("showEffect", "Element.show");
> > >}
> > >
> > > What's generated though is:
> > >
> > > new Window({. "showEffect":"Element.show"});
> > >
> > > which seems not to work. When I change it (by hand) to
> > >
> > > new Window({. "showEffect":Element.show});
> > >
> > > it is working. It seems that Window cannot handle the quotes that are
> > > added by JSONObject.
> > >
> > > Is this is a known issue?
> > >
> > > Martijn Brinkers
> > >
> > >
> > >
> > > -
> > > 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]
>
>


-- 
with regards
Sven Homburg
http://tapestry5-components.googlecode.com
http://chenillekit.googlecode.com


Re: Required parameters: also not null?

2008-06-24 Thread Matt Kerr
the 'value' proposition you mention is forward compatibility, no?

i guess if fwd compatibility is not a concern - sure, do whatever.


On Tue, Jun 24, 2008 at 3:23 PM, Howard Lewis Ship <[EMAIL PROTECTED]> wrote:
> True, my concern is that we'll find that every use of required=true
> also has acceptNull=false, in which case we add complexity without
> providing value.
>
> On Tue, Jun 24, 2008 at 12:12 PM, Filip S. Adamsen <[EMAIL PROTECTED]> wrote:
>> +1 on something like that.
>>
>> -Filip
>>
>> On 2008-06-24 19:48, Thiago H. de Paula Figueiredo wrote:
>>>
>>> Em Tue, 24 Jun 2008 14:32:15 -0300, Matt Kerr <[EMAIL PROTECTED]>
>>> escreveu:
>>>
 why not specify whether params allow null - rather than break things ?
 default to the old behavior.

 it's not uncommon to have a null param - dunno why it would be
 different in a component.
>>>
>>> Agreed 100%. Required = some value must be given to the parameter. Not
>>> null = some not null value must be given. Required != not null.
>>>
>>> We could add some like this to @Parameter and support it in tapestry-core
>>> easily:
>>>
>>> boolean acceptNull() default true;
>>>
>>> Then anyone writing components would get the automatic null value checking
>>> if wanted or needed without disrupting old code or changing how parameters
>>> work.
>>>
>>> Thiago
>>>
>>> -
>>> 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
>
> Creator Apache Tapestry and Apache HiveMind
>
> -
> 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]



T5 Altering IE's Conditional Comments... bug or feature?

2008-06-24 Thread Christopher Heriot
Using IE's conditional comments such as results in spaces inserted on
the inside of the html comments. I've been working around this with a
component that wraps its body in the appropriate condition using
MarkupWriter.writeRaw, but that seems like a hack. Is this intended
behavior that provides a benefit I'm not seeing or a bug I should
report?

A previous thread
(http://www.nabble.com/T5%3A-IE-conditional-not-working-under-template-td17094267.html#a17098807)
mentions this having been reported in Jira and closed, but I've been
unable to find the issue.

For example, a template containing this:
@import
'css/ie7.css';
results in the client seeing
@import
'css/ie7.css';

Chris Heriot

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



Re: t5components - Window

2008-06-24 Thread Martijn Brinkers (List)
Demo code can be found here:

http://87.193.218.134:8080/t5components/maven-repository/org/apache/tapestry/t5c-demo/0.5.13/

Martijn

On Tue, 2008-06-24 at 02:48 -0700, Petros Petrou wrote:
> I am trying to use the Window component as demonstrated here
> http://87.193.218.134:8080/t5c-demo/windowpage but I can't get it to work. 
> Does anyone have a code example I could use ? Is it possible to download the
> source code for the demo ?
> 
> Furthermore, I added this dependency to my pom.xml and it fails to download.
> Can I manually download it from anywhere ?
> 
> 
>   org.apache.tapestry
>   t5c-demo
>   0.5.13
> 
> 
> Petros


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



Re: T5: t5Components Window seems not to support showEffect and other options

2008-06-24 Thread Martijn Brinkers (List)
Thanks,

but that doesn't solve my problem :)

I'm unable to set showEffect and some other properties (see my original
posting) because of quoting.

Martijn Brinkers

On Tue, 2008-06-24 at 22:03 +0200, Sven Homburg wrote:
> here a short sample intial closed window:
> 
> MyPage.tml snippet:
> 
> Open Window
> 
> 
> 
> 
> function showWindow()
> {
> ${window2.componentResources.id}.setTitle("This is Window 2")
> ${window2.componentResources.id}.setHTMLContent("... here come some
> senseless content ...")
> ${window2.componentResources.id}.showCenter()
> }
> 
> 
> MyPage.java snippet
> 
> @Component(parameters = {"width=300", "height=300",
> "style=bluelighting", "show=false"})
> @Property
> private Window window;
> 
> 
> 2008/6/24 Martijn Brinkers (List) <[EMAIL PROTECTED]>:
> 
> > I'm trying to change some options for the t5Components/Window component
> > but I cannot get the showEffect correct. I extended Window and override
> > the configure method:
> >
> >protected void configure(JSONObject options)
> >{
> >options.put("showEffect", "Element.show");
> >}
> >
> > What's generated though is:
> >
> > new Window({. "showEffect":"Element.show"});
> >
> > which seems not to work. When I change it (by hand) to
> >
> > new Window({. "showEffect":Element.show});
> >
> > it is working. It seems that Window cannot handle the quotes that are
> > added by JSONObject.
> >
> > Is this is a known issue?
> >
> > Martijn Brinkers
> >
> >
> >
> > -
> > 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: t5Components Window seems not to support showEffect and other options

2008-06-24 Thread Sven Homburg
here a short sample intial closed window:

MyPage.tml snippet:

Open Window




function showWindow()
{
${window2.componentResources.id}.setTitle("This is Window 2")
${window2.componentResources.id}.setHTMLContent("... here come some
senseless content ...")
${window2.componentResources.id}.showCenter()
}


MyPage.java snippet

@Component(parameters = {"width=300", "height=300",
"style=bluelighting", "show=false"})
@Property
private Window window;


2008/6/24 Martijn Brinkers (List) <[EMAIL PROTECTED]>:

> I'm trying to change some options for the t5Components/Window component
> but I cannot get the showEffect correct. I extended Window and override
> the configure method:
>
>protected void configure(JSONObject options)
>{
>options.put("showEffect", "Element.show");
>}
>
> What's generated though is:
>
> new Window({. "showEffect":"Element.show"});
>
> which seems not to work. When I change it (by hand) to
>
> new Window({. "showEffect":Element.show});
>
> it is working. It seems that Window cannot handle the quotes that are
> added by JSONObject.
>
> Is this is a known issue?
>
> Martijn Brinkers
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
with regards
Sven Homburg
http://tapestry5-components.googlecode.com
http://chenillekit.googlecode.com


Re: t5: Returning block works in Firefox but not in IE

2008-06-24 Thread Lance Java
Could returning null be built in as default behaviour? Since returning a
block from a non-xhr request is an error case, it would save putting checks
throughout the code and I can't see it breaking anything.

Cheers,
Lance.

2008/6/24 Howard Lewis Ship <[EMAIL PROTECTED]>:

> For full graceful degradation, you can inject the Request object can
> check its isXHR() method, then decide on an appropriate return value
> (typically, a Block or null).
>
> On Tue, Jun 24, 2008 at 9:24 AM, Lance Java <[EMAIL PROTECTED]>
> wrote:
> > I have solved the issue, I think I understand what was going wrong.
> > - Tapestry first draws action links as hrefs which cause a page reload
> for
> > graceful degredation
> > - Tapestry javascript magic then goes over all ajax action links and
> changes
> > them to javascript method calls
> > - I had a javascript error which stopped the tapestry javascript magic
> from
> > hapening, thus I was seeing the graceful degredation, thus no XHR's
> >
> > Cheers,
> > Lance.
> >
> > 2008/6/24 Francisco Manzano <[EMAIL PROTECTED]>:
> >
> >> Hi, I am inexperienced in Tapestry, but I had east problem recently:
> >> You have like result a valid xhtml page? You can look for if you have
> >> "scripts of tapestry" inserted at the end of the page.
> >> something  like this  :
> >> ...
> >>  >> type="text/javascript">
> >>  >> type="text/javascript">
> >>  >> type="text/javascript">
> >>  >> type="text/javascript">
> >> 
> >> 
> >> 
> >> 
> >> 
> >>
> >> If these scripts are not, you can have this problem., and you can solve
> it
> >> obtaining a valid xhtml like result.
> >>
> >> I hope can help you
> >>
> >> &
> >> DiPegotDeis
> >>
> >>
> >>
> >>
> >> Lance Java wrote:
> >>
> >>> I have an actionlink that returns a block and populates a zone in my
> page
> >>>
> >>> FundGraph.tml
> >>>   edit
> >>>
> >>>   ...
> >>>
> >>>   
> >>>   
> >>>
> >>>
> >>> FundGraph.java
> >>>@Inject
> >>>private Block editorBlock;
> >>>
> >>>@OnEvent(value="action", component="edit")
> >>>protected Object onActionFromEdit() {
> >>>return editorBlock;
> >>>}
> >>>
> >>> In Firefox, this works fine. In IE, I get the following error:
> >>> A component event handler method returned the value
> >>> [EMAIL PROTECTED] Return type
> >>> org.apache.tapestry5.internal.structure.BlockImpl can not be handled.
> >>> Configured return types are java.lang.Class, java.lang.String,
> >>> java.net.URL,
> >>> org.apache.tapestry5.Link, org.apache.tapestry5.StreamResponse,
> >>> org.apache.tapestry5.runtime.Component.
> >>>
> >>> I have looked at previous posts on this list and it seems that this is
> >>> because request.isXHR() is false. What can I do to fix this in IE? I
> >>> thought
> >>> that XHR should be true in this case?
> >>>
> >>> I am using tapestry 5.0.13 and IE 6.0
> >>>
> >>> Full stack trace:
> >>> %d 192408 ERROR
> >>> [org.apache.tapestry5.services.TapestryModule.RequestExceptionHandler]
> >>> (http-127.0.0.1-8080-2:) Processing of request failed with uncaught
> >>> exception: A component event handler method returned the value
> >>> [EMAIL PROTECTED] Return type
> >>> org.apache.tapestry5.internal.structure.BlockImpl can not be
> >>> handled.  Configured return types are java.lang.Class,
> java.lang.String,
> >>> java.net.URL, org.apache.tapestry5.Link,
> >>> org.apache.tapestry5.StreamResponse,
> >>> org.apache.tapestry5.runtime.Component.
> >>> org.apache.tapestry5.runtime.ComponentEventException: A component event
> >>> handler method returned the value
> >>> [EMAIL PROTECTED] Return type
> >>> org.apache.tapestry5.internal.structure.BlockImpl can not be
> >>> handled.  Configured return types are java.lang.Class,
> java.lang.String,
> >>> java.net.URL, org.apache.tapestry5.Link,
> >>> org.apache.tapestry5.StreamResponse,
> >>> org.apache.tapestry5.runtime.Component.
> >>> [at
> >>>
> classpath:com/bglobal/isharesnet/tapestry/components/fund/FundGraph.tml,
> >>> line 2, column 44]
> >>> at
> >>>
> >>>
> org.apache.tapestry5.internal.structure.ComponentPageElementImpl.triggerContextEvent(ComponentPageElementImpl.java:1042)
> >>> at
> >>>
> >>>
> org.apache.tapestry5.internal.services.ComponentEventRequestHandlerImpl.handle(ComponentEventRequestHandlerImpl.java:67)
> >>> at
> >>>
> >>>
> org.apache.tapestry5.internal.services.ImmediateActionRenderResponseFilter.handle(ImmediateActionRenderResponseFilter.java:42)
> >>> at
> >>>
> >>>
> $ComponentEventRequestHandler_11abad25fdc.handle($ComponentEventRequestHandler_11abad25fdc.java)
> >>> at
> >>>
> >>>
> org.apache.tapestry5.internal.services.AjaxFilter.handle(AjaxFilter.java:42)
> >>> at
> >>>
> >>>
> $ComponentEventRequestHandler_11abad25fdc.handle($ComponentEventRequestHandler_11abad25fdc.java)
> >>> at
> >>>
> >>>
> org.apa

Re: t5: Returning block works in Firefox but not in IE

2008-06-24 Thread Howard Lewis Ship
For full graceful degradation, you can inject the Request object can
check its isXHR() method, then decide on an appropriate return value
(typically, a Block or null).

On Tue, Jun 24, 2008 at 9:24 AM, Lance Java <[EMAIL PROTECTED]> wrote:
> I have solved the issue, I think I understand what was going wrong.
> - Tapestry first draws action links as hrefs which cause a page reload for
> graceful degredation
> - Tapestry javascript magic then goes over all ajax action links and changes
> them to javascript method calls
> - I had a javascript error which stopped the tapestry javascript magic from
> hapening, thus I was seeing the graceful degredation, thus no XHR's
>
> Cheers,
> Lance.
>
> 2008/6/24 Francisco Manzano <[EMAIL PROTECTED]>:
>
>> Hi, I am inexperienced in Tapestry, but I had east problem recently:
>> You have like result a valid xhtml page? You can look for if you have
>> "scripts of tapestry" inserted at the end of the page.
>> something  like this  :
>> ...
>> > type="text/javascript">
>> > type="text/javascript">
>> > type="text/javascript">
>> > type="text/javascript">
>> 
>> 
>> 
>> 
>> 
>>
>> If these scripts are not, you can have this problem., and you can solve it
>> obtaining a valid xhtml like result.
>>
>> I hope can help you
>>
>> &
>> DiPegotDeis
>>
>>
>>
>>
>> Lance Java wrote:
>>
>>> I have an actionlink that returns a block and populates a zone in my page
>>>
>>> FundGraph.tml
>>>   edit
>>>
>>>   ...
>>>
>>>   
>>>   
>>>
>>>
>>> FundGraph.java
>>>@Inject
>>>private Block editorBlock;
>>>
>>>@OnEvent(value="action", component="edit")
>>>protected Object onActionFromEdit() {
>>>return editorBlock;
>>>}
>>>
>>> In Firefox, this works fine. In IE, I get the following error:
>>> A component event handler method returned the value
>>> [EMAIL PROTECTED] Return type
>>> org.apache.tapestry5.internal.structure.BlockImpl can not be handled.
>>> Configured return types are java.lang.Class, java.lang.String,
>>> java.net.URL,
>>> org.apache.tapestry5.Link, org.apache.tapestry5.StreamResponse,
>>> org.apache.tapestry5.runtime.Component.
>>>
>>> I have looked at previous posts on this list and it seems that this is
>>> because request.isXHR() is false. What can I do to fix this in IE? I
>>> thought
>>> that XHR should be true in this case?
>>>
>>> I am using tapestry 5.0.13 and IE 6.0
>>>
>>> Full stack trace:
>>> %d 192408 ERROR
>>> [org.apache.tapestry5.services.TapestryModule.RequestExceptionHandler]
>>> (http-127.0.0.1-8080-2:) Processing of request failed with uncaught
>>> exception: A component event handler method returned the value
>>> [EMAIL PROTECTED] Return type
>>> org.apache.tapestry5.internal.structure.BlockImpl can not be
>>> handled.  Configured return types are java.lang.Class, java.lang.String,
>>> java.net.URL, org.apache.tapestry5.Link,
>>> org.apache.tapestry5.StreamResponse,
>>> org.apache.tapestry5.runtime.Component.
>>> org.apache.tapestry5.runtime.ComponentEventException: A component event
>>> handler method returned the value
>>> [EMAIL PROTECTED] Return type
>>> org.apache.tapestry5.internal.structure.BlockImpl can not be
>>> handled.  Configured return types are java.lang.Class, java.lang.String,
>>> java.net.URL, org.apache.tapestry5.Link,
>>> org.apache.tapestry5.StreamResponse,
>>> org.apache.tapestry5.runtime.Component.
>>> [at
>>> classpath:com/bglobal/isharesnet/tapestry/components/fund/FundGraph.tml,
>>> line 2, column 44]
>>> at
>>>
>>> org.apache.tapestry5.internal.structure.ComponentPageElementImpl.triggerContextEvent(ComponentPageElementImpl.java:1042)
>>> at
>>>
>>> org.apache.tapestry5.internal.services.ComponentEventRequestHandlerImpl.handle(ComponentEventRequestHandlerImpl.java:67)
>>> at
>>>
>>> org.apache.tapestry5.internal.services.ImmediateActionRenderResponseFilter.handle(ImmediateActionRenderResponseFilter.java:42)
>>> at
>>>
>>> $ComponentEventRequestHandler_11abad25fdc.handle($ComponentEventRequestHandler_11abad25fdc.java)
>>> at
>>>
>>> org.apache.tapestry5.internal.services.AjaxFilter.handle(AjaxFilter.java:42)
>>> at
>>>
>>> $ComponentEventRequestHandler_11abad25fdc.handle($ComponentEventRequestHandler_11abad25fdc.java)
>>> at
>>>
>>> org.apache.tapestry5.services.TapestryModule$37.handle(TapestryModule.java:1987)
>>> at
>>>
>>> $ComponentEventRequestHandler_11abad25fdc.handle($ComponentEventRequestHandler_11abad25fdc.java)
>>> at
>>>
>>> $ComponentEventRequestHandler_11abad25f81.handle($ComponentEventRequestHandler_11abad25f81.java)
>>> at
>>>
>>> org.apache.tapestry5.internal.services.ComponentEventDispatcher.dispatch(ComponentEventDispatcher.java:135)
>>> at $Dispatcher_11abad25f84.dispatch($Dispatcher_11abad25f84.java)
>>> at $Dispatcher_11abad25f76.dispatch($Dispatcher_11abad25f76.java)
>>> at
>>>
>>> o

Re: Required parameters: also not null?

2008-06-24 Thread Howard Lewis Ship
True, my concern is that we'll find that every use of required=true
also has acceptNull=false, in which case we add complexity without
providing value.

On Tue, Jun 24, 2008 at 12:12 PM, Filip S. Adamsen <[EMAIL PROTECTED]> wrote:
> +1 on something like that.
>
> -Filip
>
> On 2008-06-24 19:48, Thiago H. de Paula Figueiredo wrote:
>>
>> Em Tue, 24 Jun 2008 14:32:15 -0300, Matt Kerr <[EMAIL PROTECTED]>
>> escreveu:
>>
>>> why not specify whether params allow null - rather than break things ?
>>> default to the old behavior.
>>>
>>> it's not uncommon to have a null param - dunno why it would be
>>> different in a component.
>>
>> Agreed 100%. Required = some value must be given to the parameter. Not
>> null = some not null value must be given. Required != not null.
>>
>> We could add some like this to @Parameter and support it in tapestry-core
>> easily:
>>
>> boolean acceptNull() default true;
>>
>> Then anyone writing components would get the automatic null value checking
>> if wanted or needed without disrupting old code or changing how parameters
>> work.
>>
>> Thiago
>>
>> -
>> 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

Creator Apache Tapestry and Apache HiveMind

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



Re: Required parameters: also not null?

2008-06-24 Thread Filip S. Adamsen

+1 on something like that.

-Filip

On 2008-06-24 19:48, Thiago H. de Paula Figueiredo wrote:
Em Tue, 24 Jun 2008 14:32:15 -0300, Matt Kerr <[EMAIL PROTECTED]> 
escreveu:



why not specify whether params allow null - rather than break things ?
default to the old behavior.

it's not uncommon to have a null param - dunno why it would be
different in a component.


Agreed 100%. Required = some value must be given to the parameter. Not 
null = some not null value must be given. Required != not null.


We could add some like this to @Parameter and support it in 
tapestry-core easily:


boolean acceptNull() default true;

Then anyone writing components would get the automatic null value 
checking if wanted or needed without disrupting old code or changing how 
parameters work.


Thiago

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



Events from select component

2008-06-24 Thread Brendan McNichols
Hi all,

 

I have a  component on a page and I need to know when the user
changes its value.  I presume that I need to implement an event handler
as described in:
http://tapestry.apache.org/tapestry5/tapestry-core/guide/event.html, but
I tried to do that and wasn't able to get it to work.  Is this the right
approach?  Can anyone point out an example or let me know how to
implement this behavior?

 

Thanks very much,

Brendan

 



Re: [T5] How to use enums in .tml files

2008-06-24 Thread Thiago H. de Paula Figueiredo
Em Tue, 24 Jun 2008 14:06:05 -0300, Lance Java <[EMAIL PROTECTED]>  
escreveu:



I'm a newbie but I notice tapestry has a StringToEnumCoercion.
What hapens if you do this?

...


Your above template snippet would be interpreted by Tapestry as "the  
context parameter will be given by a call to the getSOME_CONSTANT() method  
in the page class", as prop is the default ActionLink context parameter  
binding. ;)


You could try context="literal:SOME_CONSTANT", but you would lose the  
correct Enum constant check here. If you type the wrong constant name, you  
would only see this error during run time, not compile time. And I do like  
to have the most things possible checked in compile time. It's putting the  
compiler to do work for you. ;)



onActionFromSomelink(EnumType enum) {
   // i'm expecting auto coercion to do it's job here
}

Where EnumType is the type of your enum.


It will work like that, but you need to correctly pass an EnumType value  
to the ActionLink's context parameter first.


Thiago

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



Re: Required parameters: also not null?

2008-06-24 Thread Thiago H. de Paula Figueiredo
Em Tue, 24 Jun 2008 14:32:15 -0300, Matt Kerr <[EMAIL PROTECTED]>  
escreveu:



why not specify whether params allow null - rather than break things ?
default to the old behavior.

it's not uncommon to have a null param - dunno why it would be
different in a component.


Agreed 100%. Required = some value must be given to the parameter. Not  
null = some not null value must be given. Required != not null.


We could add some like this to @Parameter and support it in tapestry-core  
easily:


boolean acceptNull() default true;

Then anyone writing components would get the automatic null value checking  
if wanted or needed without disrupting old code or changing how parameters  
work.


Thiago

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



Re: Required parameters: also not null?

2008-06-24 Thread Matt Kerr
why not specify whether params allow null - rather than break things ?
default to the old behavior.

it's not uncommon to have a null param - dunno why it would be
different in a component.



On Tue, Jun 24, 2008 at 12:54 PM, Howard Lewis Ship <[EMAIL PROTECTED]> wrote:
> I've been thinking of a change to how component parameters work.
>
> Currently, the required attribute of the Parameter annotation
> indicates that a component parameter must be bound (either explicitly,
> or to a default).  It makes no assurances that it is bound to a
> non-null value.
>
> I'm  considering changing that, so that there would be a null check
> for component parameters that are required, with an immediate failure
> if the value bound to a required parameter is null.
>
> The question is:  is this a destabilizing change?  Has anyone written
> components with required parameters that are allowed to be null?
>
> --
> Howard M. Lewis Ship
>
> Creator Apache Tapestry and Apache HiveMind
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

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



Re: [T5] How to use enums in .tml files

2008-06-24 Thread Lance Java
I'm a newbie but I notice tapestry has a StringToEnumCoercion.
What hapens if you do this?

...

onActionFromSomelink(EnumType enum) {
   // i'm expecting auto coercion to do it's job here
}

Where EnumType is the type of your enum.

Cheers,
Lance.

2008/6/24 9902468 <[EMAIL PROTECTED]>:

>
> Hi,
>
> There must be a way to use enum in actionlink context. How to do this?
>
> I mean like:
>
> Do not
> push.
>
>  - 99
> --
> View this message in context:
> http://www.nabble.com/-T5--How-to-use-enums-in-.tml-files-tp18090334p18090334.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Required parameters: also not null?

2008-06-24 Thread Howard Lewis Ship
I've been thinking of a change to how component parameters work.

Currently, the required attribute of the Parameter annotation
indicates that a component parameter must be bound (either explicitly,
or to a default).  It makes no assurances that it is bound to a
non-null value.

I'm  considering changing that, so that there would be a null check
for component parameters that are required, with an immediate failure
if the value bound to a required parameter is null.

The question is:  is this a destabilizing change?  Has anyone written
components with required parameters that are allowed to be null?

-- 
Howard M. Lewis Ship

Creator Apache Tapestry and Apache HiveMind

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



[T5] EventLink generate FileNotFound Warnings

2008-06-24 Thread Kheldar666

Hello Everybody,

I recently change some of my ActionLinks with EventLinks. Since that moment
I have that kind of errors :

-
For this URL :
http://127.0.0.1:8080/theorcs-main/index.layoutrenderer.portal.editmodelink:switchEditMode

I have this Warning :

18:30:09,726  WARN Credential:191 - EXCEPTION 
java.io.IOException: Syntax of file name, directory or volume incorrect
at java.io.WinNTFileSystem.canonicalize0(Native Method)
at java.io.Win32FileSystem.canonicalize(Win32FileSystem.java:395)
at java.io.File.getCanonicalPath(File.java:531)

(...)

18:30:09,729  WARN ResourceCache:251 - Alias request of
'file:/C:/Developpement/Projets/TheOrcs/theorcs-main/src/main/webapp/index.layoutrenderer.portal.editmodelink:switchEditMode'
for
'file:/C:/Developpement/Projets/TheOrcs/theorcs-main/src/main/webapp/index.layoutrenderer.portal.editmodelink:switchEditMode'


It seam that when using an EventLink Tapestry tries to find a real file...
Is this normal ? The problem disappear with ActionLink. I tested on T 5.0.12
and 5.0.13, Jetty 5, Windows (vista)... Is this a JIRA issue ?

Regards,

Martin
-- 
View this message in context: 
http://www.nabble.com/-T5--EventLink-generate-FileNotFound-Warnings-tp18094894p18094894.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



Re: t5: Returning block works in Firefox but not in IE

2008-06-24 Thread Lance Java
I have solved the issue, I think I understand what was going wrong.
- Tapestry first draws action links as hrefs which cause a page reload for
graceful degredation
- Tapestry javascript magic then goes over all ajax action links and changes
them to javascript method calls
- I had a javascript error which stopped the tapestry javascript magic from
hapening, thus I was seeing the graceful degredation, thus no XHR's

Cheers,
Lance.

2008/6/24 Francisco Manzano <[EMAIL PROTECTED]>:

> Hi, I am inexperienced in Tapestry, but I had east problem recently:
> You have like result a valid xhtml page? You can look for if you have
> "scripts of tapestry" inserted at the end of the page.
> something  like this  :
> ...
>  type="text/javascript">
>  type="text/javascript">
>  type="text/javascript">
>  type="text/javascript">
> 
> 
> 
> 
> 
>
> If these scripts are not, you can have this problem., and you can solve it
> obtaining a valid xhtml like result.
>
> I hope can help you
>
> &
> DiPegotDeis
>
>
>
>
> Lance Java wrote:
>
>> I have an actionlink that returns a block and populates a zone in my page
>>
>> FundGraph.tml
>>   edit
>>
>>   ...
>>
>>   
>>   
>>
>>
>> FundGraph.java
>>@Inject
>>private Block editorBlock;
>>
>>@OnEvent(value="action", component="edit")
>>protected Object onActionFromEdit() {
>>return editorBlock;
>>}
>>
>> In Firefox, this works fine. In IE, I get the following error:
>> A component event handler method returned the value
>> [EMAIL PROTECTED] Return type
>> org.apache.tapestry5.internal.structure.BlockImpl can not be handled.
>> Configured return types are java.lang.Class, java.lang.String,
>> java.net.URL,
>> org.apache.tapestry5.Link, org.apache.tapestry5.StreamResponse,
>> org.apache.tapestry5.runtime.Component.
>>
>> I have looked at previous posts on this list and it seems that this is
>> because request.isXHR() is false. What can I do to fix this in IE? I
>> thought
>> that XHR should be true in this case?
>>
>> I am using tapestry 5.0.13 and IE 6.0
>>
>> Full stack trace:
>> %d 192408 ERROR
>> [org.apache.tapestry5.services.TapestryModule.RequestExceptionHandler]
>> (http-127.0.0.1-8080-2:) Processing of request failed with uncaught
>> exception: A component event handler method returned the value
>> [EMAIL PROTECTED] Return type
>> org.apache.tapestry5.internal.structure.BlockImpl can not be
>> handled.  Configured return types are java.lang.Class, java.lang.String,
>> java.net.URL, org.apache.tapestry5.Link,
>> org.apache.tapestry5.StreamResponse,
>> org.apache.tapestry5.runtime.Component.
>> org.apache.tapestry5.runtime.ComponentEventException: A component event
>> handler method returned the value
>> [EMAIL PROTECTED] Return type
>> org.apache.tapestry5.internal.structure.BlockImpl can not be
>> handled.  Configured return types are java.lang.Class, java.lang.String,
>> java.net.URL, org.apache.tapestry5.Link,
>> org.apache.tapestry5.StreamResponse,
>> org.apache.tapestry5.runtime.Component.
>> [at
>> classpath:com/bglobal/isharesnet/tapestry/components/fund/FundGraph.tml,
>> line 2, column 44]
>> at
>>
>> org.apache.tapestry5.internal.structure.ComponentPageElementImpl.triggerContextEvent(ComponentPageElementImpl.java:1042)
>> at
>>
>> org.apache.tapestry5.internal.services.ComponentEventRequestHandlerImpl.handle(ComponentEventRequestHandlerImpl.java:67)
>> at
>>
>> org.apache.tapestry5.internal.services.ImmediateActionRenderResponseFilter.handle(ImmediateActionRenderResponseFilter.java:42)
>> at
>>
>> $ComponentEventRequestHandler_11abad25fdc.handle($ComponentEventRequestHandler_11abad25fdc.java)
>> at
>>
>> org.apache.tapestry5.internal.services.AjaxFilter.handle(AjaxFilter.java:42)
>> at
>>
>> $ComponentEventRequestHandler_11abad25fdc.handle($ComponentEventRequestHandler_11abad25fdc.java)
>> at
>>
>> org.apache.tapestry5.services.TapestryModule$37.handle(TapestryModule.java:1987)
>> at
>>
>> $ComponentEventRequestHandler_11abad25fdc.handle($ComponentEventRequestHandler_11abad25fdc.java)
>> at
>>
>> $ComponentEventRequestHandler_11abad25f81.handle($ComponentEventRequestHandler_11abad25f81.java)
>> at
>>
>> org.apache.tapestry5.internal.services.ComponentEventDispatcher.dispatch(ComponentEventDispatcher.java:135)
>> at $Dispatcher_11abad25f84.dispatch($Dispatcher_11abad25f84.java)
>> at $Dispatcher_11abad25f76.dispatch($Dispatcher_11abad25f76.java)
>> at
>>
>> org.apache.tapestry5.services.TapestryModule$12.service(TapestryModule.java:938)
>> at
>>
>> org.apache.tapestry5.internal.services.LocalizationFilter.service(LocalizationFilter.java:42)
>> at $RequestHandler_11abad25f77.service($RequestHandler_11abad25f77.java)
>> at
>>
>> org.apache.tapestry5.services.TapestryModule$2.service(TapestryModule.java:586)
>> at $RequestHandler_11abad25f77.servic

Re: t5: Returning block works in Firefox but not in IE

2008-06-24 Thread Francisco Manzano

Hi, I am inexperienced in Tapestry, but I had east problem recently:
You have like result a valid xhtml page? You can look for if you have 
"scripts of tapestry" inserted at the end of the page.

something  like this  :
...
type="text/javascript">
type="text/javascript">
type="text/javascript">
type="text/javascript">







If these scripts are not, you can have this problem., and you can solve 
it obtaining a valid xhtml like result.


I hope can help you

&
DiPegotDeis



Lance Java wrote:

I have an actionlink that returns a block and populates a zone in my page

FundGraph.tml
   edit

   ...

   
   


FundGraph.java
@Inject
private Block editorBlock;

@OnEvent(value="action", component="edit")
protected Object onActionFromEdit() {
return editorBlock;
}

In Firefox, this works fine. In IE, I get the following error:
A component event handler method returned the value
[EMAIL PROTECTED] Return type
org.apache.tapestry5.internal.structure.BlockImpl can not be handled.
Configured return types are java.lang.Class, java.lang.String, java.net.URL,
org.apache.tapestry5.Link, org.apache.tapestry5.StreamResponse,
org.apache.tapestry5.runtime.Component.

I have looked at previous posts on this list and it seems that this is
because request.isXHR() is false. What can I do to fix this in IE? I thought
that XHR should be true in this case?

I am using tapestry 5.0.13 and IE 6.0

Full stack trace:
%d 192408 ERROR
[org.apache.tapestry5.services.TapestryModule.RequestExceptionHandler]
(http-127.0.0.1-8080-2:) Processing of request failed with uncaught
exception: A component event handler method returned the value
[EMAIL PROTECTED] Return type
org.apache.tapestry5.internal.structure.BlockImpl can not be
handled.  Configured return types are java.lang.Class, java.lang.String,
java.net.URL, org.apache.tapestry5.Link,
org.apache.tapestry5.StreamResponse, org.apache.tapestry5.runtime.Component.
org.apache.tapestry5.runtime.ComponentEventException: A component event
handler method returned the value
[EMAIL PROTECTED] Return type
org.apache.tapestry5.internal.structure.BlockImpl can not be
handled.  Configured return types are java.lang.Class, java.lang.String,
java.net.URL, org.apache.tapestry5.Link,
org.apache.tapestry5.StreamResponse, org.apache.tapestry5.runtime.Component.
[at classpath:com/bglobal/isharesnet/tapestry/components/fund/FundGraph.tml,
line 2, column 44]
at
org.apache.tapestry5.internal.structure.ComponentPageElementImpl.triggerContextEvent(ComponentPageElementImpl.java:1042)
at
org.apache.tapestry5.internal.services.ComponentEventRequestHandlerImpl.handle(ComponentEventRequestHandlerImpl.java:67)
at
org.apache.tapestry5.internal.services.ImmediateActionRenderResponseFilter.handle(ImmediateActionRenderResponseFilter.java:42)
at
$ComponentEventRequestHandler_11abad25fdc.handle($ComponentEventRequestHandler_11abad25fdc.java)
at
org.apache.tapestry5.internal.services.AjaxFilter.handle(AjaxFilter.java:42)
at
$ComponentEventRequestHandler_11abad25fdc.handle($ComponentEventRequestHandler_11abad25fdc.java)
at
org.apache.tapestry5.services.TapestryModule$37.handle(TapestryModule.java:1987)
at
$ComponentEventRequestHandler_11abad25fdc.handle($ComponentEventRequestHandler_11abad25fdc.java)
at
$ComponentEventRequestHandler_11abad25f81.handle($ComponentEventRequestHandler_11abad25f81.java)
at
org.apache.tapestry5.internal.services.ComponentEventDispatcher.dispatch(ComponentEventDispatcher.java:135)
at $Dispatcher_11abad25f84.dispatch($Dispatcher_11abad25f84.java)
at $Dispatcher_11abad25f76.dispatch($Dispatcher_11abad25f76.java)
at
org.apache.tapestry5.services.TapestryModule$12.service(TapestryModule.java:938)
at
org.apache.tapestry5.internal.services.LocalizationFilter.service(LocalizationFilter.java:42)
at $RequestHandler_11abad25f77.service($RequestHandler_11abad25f77.java)
at
org.apache.tapestry5.services.TapestryModule$2.service(TapestryModule.java:586)
at $RequestHandler_11abad25f77.service($RequestHandler_11abad25f77.java)
at
org.apache.tapestry5.internal.services.RequestErrorFilter.service(RequestErrorFilter.java:26)
at $RequestHandler_11abad25f77.service($RequestHandler_11abad25f77.java)
at
org.apache.tapestry5.internal.services.StaticFilesFilter.service(StaticFilesFilter.java:79)
at $RequestHandler_11abad25f77.service($RequestHandler_11abad25f77.java)
at
org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:93)
at
org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:84)
at
org.apache.tapestry5.ioc.internal.util.ConcurrentBarrier.withRead(ConcurrentBarrier.java:75)
at
org.apache.tapestry5.internal.services.CheckForUpdatesFilter.service(CheckForUpdatesFilter.java:106)
at $RequestHandler_11abad25f

Re: [T5] Layout Component test prblem

ok. now all the function are successful go though.
[component:setupRender]
[component:beginRender]
[component:beforeRenderTemplate]
[component:beforeRenderBody]
[component:afterRenderBody]
[component:afterRenderTemplate]
[component:afterRender]
[component:cleanupRender]

but, still didn't show  ...
may i know is it can not find tml file?

On Tue, Jun 24, 2008 at 10:25 PM, Tan [EMAIL PROTECTED] <[EMAIL PROTECTED]>
wrote:

> sorry. should be after SetupRender. then it ended
> by right if there is an error. it should go to cleanuprender. but, it
> didn't go though that function.
>
>
>
> On Tue, Jun 24, 2008 at 10:01 PM, Tan [EMAIL PROTECTED] <[EMAIL PROTECTED]>
> wrote:
>
>> Hi,
>>
>> I did have put some message in setuprender and onactivate.
>> i did show me the System.out.println("test1");
>> but, how come it didn't render the  ?
>> Thankk you.
>>
>>
>> On Tue, Jun 24, 2008 at 9:39 PM, Tan [EMAIL PROTECTED] <[EMAIL PROTECTED]>
>> wrote:
>>
>>> hi marcelo,
>>>
>>> thanks for your reply.  yes. i did put
>>> src/main/resources//components
>>> src/main/resources//pages
>>> is there any possibility?
>>>
>>> Thank you.
>>>
>>> Regards,
>>> Cyber
>>>
>>>
>>>
>>>
>>>
>>> On Tue, Jun 24, 2008 at 8:40 PM, Marcelo Lotif <[EMAIL PROTECTED]>
>>> wrote:
>>>
 Hi,
 Did you put the Layout.tml on the right package? It should be under
 src/main/resources//components. I recommend you to
 create a directory called src/main/resources//pages and
 put your pages inside it too.

 2008/6/24 Tan [EMAIL PROTECTED] <[EMAIL PROTECTED]>:
 > hi all,
 >
 > i 'm testing tutorial in
 > http://tapestry.apache.org/tapestry5/tapestry-core/guide/layout.html
 >
 > in start.tml
 >
 _
 >
 > http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";>
 >
 >   Welcome to the Nifty Web Application!
 >
 >   
 >Would you like to Log In?
 >   
 > 
 >
 _
 >
 > after rendered.
 >
 > it should be
 >
 
 > http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";>
 >
 >My Nifty Web Application
 >
 >
 >
 >Nifty Web Application
 >
 >   Welcome to the Nifty Web Application!
 >
 >   
 >Would you like to Log In?
 >   
 >
 >(C) 2008 NiftyWebCo, Inc.
 >
 >
 > 
 >
 
 >
 > but, how come. after render. it become
 >
 
 > http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";>
 >
 >My Nifty Web Application
 >
 >
 >
 >   Welcome to the Nifty Web Application!
 >
 >   
 >Would you like to Log In?
 >   
 >
 >
 > 
 >
 
 >
 >
 > can some one help me?
 > Thank you.
 >
 > Cyber
 >



 --
 Atenciosamente,

 Marcelo Lotif
 Programador Java e Tapestry
 FIEC - Federação das Indústrias do Estado do Ceará
 (85) 3477-5910

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


>>>
>>
>


T5 Select and "multiple" once again


hi, i would like to use "multiple" attribute inside  and get all
selected items after form submitting. as for now it is  not possible, only
first item is returned. 
i found Martin's post[1] and suggestion to write own component basing on
Select source. that's ok, but i'm rendering my  dynamically not
using template. the question is, how may I bind all the rendered 
elements to my own SelectMultiple component? i'm not able to force tapestry
to use my component. during submit control goes still to tapestry's Select.

thanks,
jm.

1.
(http://www.nabble.com/T5%3A-select-component-with-support-for-attribute-%22multiple%22-to10996038s302.html#a10998149
-- 
View this message in context: 
http://www.nabble.com/T5-Select-and-%22multiple%22-once-again-tp18092333p18092333.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



T5: How to change the width of Grid column

Dear all,

How do we change the width of Grid column? It seems that the first column of
the Grid is too wide than the rest? How do we change each column's width?
Could anyone give me a fashioned way to do it?

Best regards,

IMPORTANT NOTICE: 
The information in this email (and any attachments) is confidential. If you are 
not the intended recipient, you must not use or disseminate the information. If 
you have received this email in error, please immediately notify me by "Reply" 
command and permanently delete the original and any copies or printouts 
thereof.  Although this email and any attachments are believed to be free of 
any virus or other defect that might affect any computer system into which it 
is received and opened, it is the responsibility of the recipient to ensure 
that it is virus free and no responsibility is accepted by American 
International Group, Inc. or its subsidiaries or affiliates either jointly or 
severally, for any loss or damage arising in any way from its use.

Re: [T5] Layout Component test prblem

sorry. should be after SetupRender. then it ended
by right if there is an error. it should go to cleanuprender. but, it didn't
go though that function.


On Tue, Jun 24, 2008 at 10:01 PM, Tan [EMAIL PROTECTED] <[EMAIL PROTECTED]>
wrote:

> Hi,
>
> I did have put some message in setuprender and onactivate.
> i did show me the System.out.println("test1");
> but, how come it didn't render the  ?
> Thankk you.
>
>
> On Tue, Jun 24, 2008 at 9:39 PM, Tan [EMAIL PROTECTED] <[EMAIL PROTECTED]>
> wrote:
>
>> hi marcelo,
>>
>> thanks for your reply.  yes. i did put
>> src/main/resources//components
>> src/main/resources//pages
>> is there any possibility?
>>
>> Thank you.
>>
>> Regards,
>> Cyber
>>
>>
>>
>>
>>
>> On Tue, Jun 24, 2008 at 8:40 PM, Marcelo Lotif <[EMAIL PROTECTED]>
>> wrote:
>>
>>> Hi,
>>> Did you put the Layout.tml on the right package? It should be under
>>> src/main/resources//components. I recommend you to
>>> create a directory called src/main/resources//pages and
>>> put your pages inside it too.
>>>
>>> 2008/6/24 Tan [EMAIL PROTECTED] <[EMAIL PROTECTED]>:
>>> > hi all,
>>> >
>>> > i 'm testing tutorial in
>>> > http://tapestry.apache.org/tapestry5/tapestry-core/guide/layout.html
>>> >
>>> > in start.tml
>>> >
>>> _
>>> >
>>> > http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";>
>>> >
>>> >   Welcome to the Nifty Web Application!
>>> >
>>> >   
>>> >Would you like to Log In?
>>> >   
>>> > 
>>> >
>>> _
>>> >
>>> > after rendered.
>>> >
>>> > it should be
>>> >
>>> 
>>> > http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";>
>>> >
>>> >My Nifty Web Application
>>> >
>>> >
>>> >
>>> >Nifty Web Application
>>> >
>>> >   Welcome to the Nifty Web Application!
>>> >
>>> >   
>>> >Would you like to Log In?
>>> >   
>>> >
>>> >(C) 2008 NiftyWebCo, Inc.
>>> >
>>> >
>>> > 
>>> >
>>> 
>>> >
>>> > but, how come. after render. it become
>>> >
>>> 
>>> > http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";>
>>> >
>>> >My Nifty Web Application
>>> >
>>> >
>>> >
>>> >   Welcome to the Nifty Web Application!
>>> >
>>> >   
>>> >Would you like to Log In?
>>> >   
>>> >
>>> >
>>> > 
>>> >
>>> 
>>> >
>>> >
>>> > can some one help me?
>>> > Thank you.
>>> >
>>> > Cyber
>>> >
>>>
>>>
>>>
>>> --
>>> Atenciosamente,
>>>
>>> Marcelo Lotif
>>> Programador Java e Tapestry
>>> FIEC - Federação das Indústrias do Estado do Ceará
>>> (85) 3477-5910
>>>
>>> -
>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>>
>>
>


Re: [T5] Layout Component test prblem

Hi,

I did have put some message in setuprender and onactivate.
i did show me the System.out.println("test1");
but, how come it didn't render the  ?
Thankk you.

On Tue, Jun 24, 2008 at 9:39 PM, Tan [EMAIL PROTECTED] <[EMAIL PROTECTED]>
wrote:

> hi marcelo,
>
> thanks for your reply.  yes. i did put
> src/main/resources//components
> src/main/resources//pages
> is there any possibility?
>
> Thank you.
>
> Regards,
> Cyber
>
>
>
>
>
> On Tue, Jun 24, 2008 at 8:40 PM, Marcelo Lotif <[EMAIL PROTECTED]>
> wrote:
>
>> Hi,
>> Did you put the Layout.tml on the right package? It should be under
>> src/main/resources//components. I recommend you to
>> create a directory called src/main/resources//pages and
>> put your pages inside it too.
>>
>> 2008/6/24 Tan [EMAIL PROTECTED] <[EMAIL PROTECTED]>:
>> > hi all,
>> >
>> > i 'm testing tutorial in
>> > http://tapestry.apache.org/tapestry5/tapestry-core/guide/layout.html
>> >
>> > in start.tml
>> >
>> _
>> >
>> > http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";>
>> >
>> >   Welcome to the Nifty Web Application!
>> >
>> >   
>> >Would you like to Log In?
>> >   
>> > 
>> >
>> _
>> >
>> > after rendered.
>> >
>> > it should be
>> > 
>> > http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";>
>> >
>> >My Nifty Web Application
>> >
>> >
>> >
>> >Nifty Web Application
>> >
>> >   Welcome to the Nifty Web Application!
>> >
>> >   
>> >Would you like to Log In?
>> >   
>> >
>> >(C) 2008 NiftyWebCo, Inc.
>> >
>> >
>> > 
>> > 
>> >
>> > but, how come. after render. it become
>> > 
>> > http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";>
>> >
>> >My Nifty Web Application
>> >
>> >
>> >
>> >   Welcome to the Nifty Web Application!
>> >
>> >   
>> >Would you like to Log In?
>> >   
>> >
>> >
>> > 
>> > 
>> >
>> >
>> > can some one help me?
>> > Thank you.
>> >
>> > Cyber
>> >
>>
>>
>>
>> --
>> Atenciosamente,
>>
>> Marcelo Lotif
>> Programador Java e Tapestry
>> FIEC - Federação das Indústrias do Estado do Ceará
>> (85) 3477-5910
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>


t5: Returning block works in Firefox but not in IE

I have an actionlink that returns a block and populates a zone in my page

FundGraph.tml
   edit

   ...

   
   


FundGraph.java
@Inject
private Block editorBlock;

@OnEvent(value="action", component="edit")
protected Object onActionFromEdit() {
return editorBlock;
}

In Firefox, this works fine. In IE, I get the following error:
A component event handler method returned the value
[EMAIL PROTECTED] Return type
org.apache.tapestry5.internal.structure.BlockImpl can not be handled.
Configured return types are java.lang.Class, java.lang.String, java.net.URL,
org.apache.tapestry5.Link, org.apache.tapestry5.StreamResponse,
org.apache.tapestry5.runtime.Component.

I have looked at previous posts on this list and it seems that this is
because request.isXHR() is false. What can I do to fix this in IE? I thought
that XHR should be true in this case?

I am using tapestry 5.0.13 and IE 6.0

Full stack trace:
%d 192408 ERROR
[org.apache.tapestry5.services.TapestryModule.RequestExceptionHandler]
(http-127.0.0.1-8080-2:) Processing of request failed with uncaught
exception: A component event handler method returned the value
[EMAIL PROTECTED] Return type
org.apache.tapestry5.internal.structure.BlockImpl can not be
handled.  Configured return types are java.lang.Class, java.lang.String,
java.net.URL, org.apache.tapestry5.Link,
org.apache.tapestry5.StreamResponse, org.apache.tapestry5.runtime.Component.
org.apache.tapestry5.runtime.ComponentEventException: A component event
handler method returned the value
[EMAIL PROTECTED] Return type
org.apache.tapestry5.internal.structure.BlockImpl can not be
handled.  Configured return types are java.lang.Class, java.lang.String,
java.net.URL, org.apache.tapestry5.Link,
org.apache.tapestry5.StreamResponse, org.apache.tapestry5.runtime.Component.
[at classpath:com/bglobal/isharesnet/tapestry/components/fund/FundGraph.tml,
line 2, column 44]
at
org.apache.tapestry5.internal.structure.ComponentPageElementImpl.triggerContextEvent(ComponentPageElementImpl.java:1042)
at
org.apache.tapestry5.internal.services.ComponentEventRequestHandlerImpl.handle(ComponentEventRequestHandlerImpl.java:67)
at
org.apache.tapestry5.internal.services.ImmediateActionRenderResponseFilter.handle(ImmediateActionRenderResponseFilter.java:42)
at
$ComponentEventRequestHandler_11abad25fdc.handle($ComponentEventRequestHandler_11abad25fdc.java)
at
org.apache.tapestry5.internal.services.AjaxFilter.handle(AjaxFilter.java:42)
at
$ComponentEventRequestHandler_11abad25fdc.handle($ComponentEventRequestHandler_11abad25fdc.java)
at
org.apache.tapestry5.services.TapestryModule$37.handle(TapestryModule.java:1987)
at
$ComponentEventRequestHandler_11abad25fdc.handle($ComponentEventRequestHandler_11abad25fdc.java)
at
$ComponentEventRequestHandler_11abad25f81.handle($ComponentEventRequestHandler_11abad25f81.java)
at
org.apache.tapestry5.internal.services.ComponentEventDispatcher.dispatch(ComponentEventDispatcher.java:135)
at $Dispatcher_11abad25f84.dispatch($Dispatcher_11abad25f84.java)
at $Dispatcher_11abad25f76.dispatch($Dispatcher_11abad25f76.java)
at
org.apache.tapestry5.services.TapestryModule$12.service(TapestryModule.java:938)
at
org.apache.tapestry5.internal.services.LocalizationFilter.service(LocalizationFilter.java:42)
at $RequestHandler_11abad25f77.service($RequestHandler_11abad25f77.java)
at
org.apache.tapestry5.services.TapestryModule$2.service(TapestryModule.java:586)
at $RequestHandler_11abad25f77.service($RequestHandler_11abad25f77.java)
at
org.apache.tapestry5.internal.services.RequestErrorFilter.service(RequestErrorFilter.java:26)
at $RequestHandler_11abad25f77.service($RequestHandler_11abad25f77.java)
at
org.apache.tapestry5.internal.services.StaticFilesFilter.service(StaticFilesFilter.java:79)
at $RequestHandler_11abad25f77.service($RequestHandler_11abad25f77.java)
at
org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:93)
at
org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:84)
at
org.apache.tapestry5.ioc.internal.util.ConcurrentBarrier.withRead(ConcurrentBarrier.java:75)
at
org.apache.tapestry5.internal.services.CheckForUpdatesFilter.service(CheckForUpdatesFilter.java:106)
at $RequestHandler_11abad25f77.service($RequestHandler_11abad25f77.java)
at $RequestHandler_11abad25f6f.service($RequestHandler_11abad25f6f.java)
at
org.apache.tapestry5.services.TapestryModule$11.service(TapestryModule.java:918)
at
org.apache.tapestry5.internal.services.IgnoredPathsFilter.service(IgnoredPathsFilter.java:62)
at
$HttpServletRequestFilter_11abad25f6e.service($HttpServletRequestFilter_11abad25f6e.java)
at
$HttpServletRequestHandler_11abad25f70.service($HttpServletRequestHandler_11abad25f70.java)
at
$HttpServletRequestHandler_11abad25f6d.service($HttpServletRequestHandler_11abad25f6d.java)
at org.apache.tapestry5.TapestryFilter.doFilter(TapestryFilter.java:168)
at
org.apache.catalina.core.ApplicationFilterChain.

Re: [T5] Layout Component test prblem

hi marcelo,

thanks for your reply.  yes. i did put
src/main/resources//components
src/main/resources//pages
is there any possibility?

Thank you.

Regards,
Cyber




On Tue, Jun 24, 2008 at 8:40 PM, Marcelo Lotif <[EMAIL PROTECTED]> wrote:

> Hi,
> Did you put the Layout.tml on the right package? It should be under
> src/main/resources//components. I recommend you to
> create a directory called src/main/resources//pages and
> put your pages inside it too.
>
> 2008/6/24 Tan [EMAIL PROTECTED] <[EMAIL PROTECTED]>:
> > hi all,
> >
> > i 'm testing tutorial in
> > http://tapestry.apache.org/tapestry5/tapestry-core/guide/layout.html
> >
> > in start.tml
> > _
> >
> > http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";>
> >
> >   Welcome to the Nifty Web Application!
> >
> >   
> >Would you like to Log In?
> >   
> > 
> > _
> >
> > after rendered.
> >
> > it should be
> > 
> > http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";>
> >
> >My Nifty Web Application
> >
> >
> >
> >Nifty Web Application
> >
> >   Welcome to the Nifty Web Application!
> >
> >   
> >Would you like to Log In?
> >   
> >
> >(C) 2008 NiftyWebCo, Inc.
> >
> >
> > 
> > 
> >
> > but, how come. after render. it become
> > 
> > http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";>
> >
> >My Nifty Web Application
> >
> >
> >
> >   Welcome to the Nifty Web Application!
> >
> >   
> >Would you like to Log In?
> >   
> >
> >
> > 
> > 
> >
> >
> > can some one help me?
> > Thank you.
> >
> > Cyber
> >
>
>
>
> --
> Atenciosamente,
>
> Marcelo Lotif
> Programador Java e Tapestry
> FIEC - Federação das Indústrias do Estado do Ceará
> (85) 3477-5910
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


T5.0.13: Problems with SSL and Page Activation


Hello,
i want to transfer a String from one page to another via https. I have
already added the Secure-Tag for both sites and without it the code works
fine.
The transfer is very simple. There is an textfield and a submit button on
the 1st page. On submitting the form the value should be written in a field
with it's setter (with onFormSubmit, OnActivate and OnPassivate methods).
With Secure "enabled" i get following error on the page:
http://rafb.net/p/f614Di68.html http://rafb.net/p/f614Di68.html 
and this error on Glassfish:
http://rafb.net/p/ToeypU56.html http://rafb.net/p/ToeypU56.html 

The other way (make field persistant without activate and passivate) works
also fine. Has anybody an idea or solution for that problem?

Thank you,
Tom 
-- 
View this message in context: 
http://www.nabble.com/T5.0.13%3A-Problems-with-SSL-and-Page-Activation-tp18090590p18090590.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



Re: [T5] How to use enums in .tml files

Em Tue, 24 Jun 2008 09:54:18 -0300, 9902468 <[EMAIL PROTECTED]>  
escreveu:



Do not
push.


Or you can write a simple getter method in you page class:

public Enum getContext() {
return Enum.SOME_CONSTANT;
}

Do not
push.

IMHO, the less logic in your templates, the better. :)

Thiago

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



Re: [T5] How to use enums in .tml files

Unless someone has written a binding prefix for enums, you might need to to 
implement one.
Please see http://wiki.apache.org/tapestry/Tapestry5HowToAddBindingPrefix


Shing
Home page : http://www.lombok.demon.co.uk/



--- On Tue, 24/6/08, 9902468 <[EMAIL PROTECTED]> wrote:

> From: 9902468 <[EMAIL PROTECTED]>
> Subject: [T5] How to use enums in .tml files
> To: users@tapestry.apache.org
> Date: Tuesday, 24 June, 2008, 8:54 PM
> Hi,
> 
> There must be a way to use enum in actionlink context. How
> to do this?
> 
> I mean like:
> 
>  context="Enum.SOME_CONSTANT">Do not
> push.
> 
>  - 99
> -- 
> View this message in context:
> http://www.nabble.com/-T5--How-to-use-enums-in-.tml-files-tp18090334p18090334.html
> Sent from the Tapestry - User mailing list archive at
> Nabble.com.
> 
> 
> -
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]


  __
Sent from Yahoo! Mail.
A Smarter Email http://uk.docs.yahoo.com/nowyoucan.html

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



[T5] How to use enums in .tml files


Hi,

There must be a way to use enum in actionlink context. How to do this?

I mean like:

Do not
push.

 - 99
-- 
View this message in context: 
http://www.nabble.com/-T5--How-to-use-enums-in-.tml-files-tp18090334p18090334.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



Re: Re: How to assign java object's property value to javascript variablein html?

thank you Francisco !




Oliver Lee
2008-06-24



发件人: Francisco Manzano
发送时间: 2008-06-24 15:26:52
收件人: Tapestry users
抄送: 
主题: Re: How to assign java object's property value to javascript variablein 
html?

Something like this :

...





...

Fco.Manzano

Oliver Lee wrote:
> hi,all good day!
>
> I have a java List in my Page,each object in the list has a String property,
>
> i want assign the String property value to a javascript array
>  
> by Looping the List in html template,how to achieve that?!
>
> thanks a lot !
>
>
>
> Oliver Lee
> 2008-06-24
>
>   


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



Re: 5.0.13 IE javascript error


Thanks Sven, but what exactly are you referring to?

If you are referring to the use of RenderSupport for javascript, then I 
should explain a bit.


I have already had to make various changes in my Layout classes etc to 
assure they work with the move of the javascript to the bottom of the 
page. The last problem I faced was that the onchange on some of my 
select items use prototype and were run (causing javascript errors in 
IE) before prototype.js is loaded. To fix that, I explicitly refer to 
prototype in "" section in my Layout class. I know this results in 
prototype being included twice, but I don't know of a way to fix this as 
I seem to have a chicken and egg problem here.


Thanks for the help,
Joachim

Sven Homburg wrote:

please read
http://tapestry.apache.org/news.html#Tapestry%205.0.13
  



2008/6/23 Joachim Van der Auwera <[EMAIL PROTECTED]>:

  

Hi,

after upgrade of my application to tapestry 5.0.13 I get a "unknown runtime
error" on loading the page in IE.

This is reported at line 2403 of prototype.js on the line
"else element.innerHTML = content.stripScripts()"

Does anybody have any idea how this problem can be remedied?

Kind regards,
Joachim

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


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






  



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


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