Re: Several Advices on same service

2012-10-04 Thread Lance Java
You could solve this by using an IOC contribution [1]. 

Option 1: No advisor
Add a List parameter to your MenuService's constructor then contribute to
the list (via OrderedConfiguration) in each of your module. 

Option 2: Single advisor
Add a List parameter to your advisor and make the advisor a tapestry IOC
service. Each module then contributes to the list (via
OrderedConfiguration).

[1] http://tapestry.apache.org/tapestry-ioc-configuration.html



--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Several-Advices-on-same-service-tp5716615p5716616.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: Several Advices on same service

2012-10-04 Thread kheldar666
Yes I thought about that But anyway it should work but my approach...

So i try to figure out what is going wrong as I actually hope to have
Modules developped by 3rd Parties in the future...



--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Several-Advices-on-same-service-tp5716615p5716617.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: Several Advices on same service

2012-10-04 Thread Lance Java
 Yes I thought about that But anyway it should work but my approach... 
I don't agree. Tapestry doesn't have enough information to know which order
to apply the advices. There are possibly other bytecode manipulation issues
to consider too.

 I actually hope to have Modules developped by 3rd Parties in the future
That's the beauty of IOC contributions. 3rd party modules can contribute to
your services. It's been dubbed distributed configuration and in my
opinion is one of Tapestry IOC's killer features over Spring IOC.



--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Several-Advices-on-same-service-tp5716615p5716619.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: arithmetic calculations

2012-10-04 Thread Lance Java
1. The html label is for labelling an input, not for arbitrary text. As has
been mentioned on this list, use a span or similar for arbitrary text.
http://www.w3schools.com/tags/tag_label.asp

2. Instead of ${a} + b, I think you mean ${a + b} (see
http://tapestry.apache.org/property-expressions.html)

3. I'll join Thago in slamming you. Tapestry's live class/template
reloading makes it just as simple to put this in a java class as it is to
put it in a template. It then becomes easier to test and re-usable.



--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/arithmetic-calculations-tp5716614p5716620.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: Lightweight TapestryTools update site

2012-10-04 Thread Davor Hrg
Hi,

I've just installed the TapestryTools but have no autocomplete in template
and CTRL+R is not working ... actually CTRL+R is the only feature
I' am really interested in for now.

waht can I do to check what is wrong ?





On Sun, Aug 19, 2012 at 4:30 PM, Gavin Lei gavingui2...@gmail.com wrote:

 Hi all,

 I have fixed issue
 37(http://code.google.com/p/tapestrytools/issues/detail?id=37can=1),
 it means that
 TapestryTools can custom components from Library component packages
 now, it is already in TapestryTools' update site, you guys can have a
 trial of it.

 Meanwhile, TapestryTools is now available in Eclipse Market place, you
 can find it by tapestry keyword :-)

 2012/8/16 Athneria, Mahendra mahendra.athne...@atos.net:
  Thanks in advance Gavin :-)
 
  Regards,
  Mahendra
 
  -Original Message-
  From: Gavin Lei [mailto:gavingui2...@gmail.com]
  Sent: Wednesday, August 15, 2012 8:24 PM
  To: Tapestry users
  Subject: Re: Lightweight TapestryTools update site
 
  Yeah, i am working for this feature, it will be available in the
  coming week. I will post here once it is available
 
  2012/8/9 Athneria, Mahendra mahendra.athne...@atos.net:
  Hi Gavin,
 
  Thanks for the reply. It would be great if you can add that feature
 too. I want to see the list of components from jar to the auto complete
 list.
 
  Thanks Gavin,
 
  Regards,
  Mahendra
 
  -Original Message-
  From: Gavin Lei [mailto:gavingui2...@gmail.com]
  Sent: Wednesday, August 08, 2012 6:54 PM
  To: Tapestry users
  Subject: Re: Lightweight TapestryTools update site
 
  Hi Athneria,
 
  This feature support only custom components in project's source
  directory, not consider components in jars, maybe i should also add
  jars support.
 
  2012/8/7 Athneria, Mahendra mahendra.athne...@atos.net:
  Hi Gavin,
 
  I took the update and trying to test the custom components support
 feature with different prefix.
  I have some doubts regarding the same.
 
  A) - We have a nice editor in which developer enters mapping : - we
 can only edit the custom components by right click on the project. And when
 I click on (+) button I can only see the packages from my project only. I
 am not able to see the components package from different libraries. So how
 I can do the same. I tried to achieve the same by editing components.tcc
 file. Below is the example.
 
  ?xml version=1.0 encoding=UTF-8?
  root
  packages
  package prefix=y path=net.awl.tapestry5.kawwa.components/ !--
 path is of components path of my libraries --
  /packages
  components !-- Breadcrumb is components inside my libraries --
  component id=Breadcrumb name=Breadcrumb text=Breadcrumb
 prefix=y path=net.awl.tapestry5.kawwa.components/
  /components
  /root
 
  Even thought I am not able to get the  Breadcrumb  name when I press
 ctrl+space on tml file.
 
  Any idea Gavin??
 
  Regards,
  Mahendra Athneria
 
 
  -Original Message-
  From: Gavin Lei [mailto:gavingui2...@gmail.com]
  Sent: Monday, August 06, 2012 6:21 PM
  To: Tapestry users
  Cc: Igor Drobiazko
  Subject: Re: Lightweight TapestryTools update site
 
 
  Hi all,
 
  In TapestryTools' components auto-complete feature, by default only
  components defined in these two packages are in the list:
 
  1.org.apache.tapestry5.corelib.components (Tapestry 5's build-in
 components)
  2.app-package.components, whereby app-package is the applications root
  package defined in the web.xml (Tapestry web application's root
  components)
 
  Now, I have add custom components support for TapestryTools. It means
  besides these components, TapestryTools support also custom components
  with different prefix with t:. It allow you to provide
  autocompletion for custom components from different libraries, and we
  have a nice editor in which developer enters mapping:
 
  x: org.example.components
  y: org.acme.lib.components
 
  In this mapping, a library prefix is mapped to a component package.
  So, every component from org.example.components package would have x
  prefix. For example:
 
  span t:type=x/MyComponent/span
  span t:type=y/Foo/span
 
  This feature is alreay available in TapestryTools' update site [1],
  and you can find detailed guide about this feature and the Custom
  components mapping editor here [2] (It is in Section 7).
 
  Looking forward to your feedbacks about TapestryTools and this new
  feature, thanks.
 
  [1] http://tapestrytools.googlecode.com/svn/TapestryTools/
  [2]
 http://code.google.com/p/tapestrytools/wiki/Install_Guide_Lightweight_TapestryTools
  --
  -
  Best Regards
  Gavin Lei (雷银)
  Email: gavingui2...@gmail.com
 
  -
  To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
  For additional commands, e-mail: users-h...@tapestry.apache.org
 
 
 
  --
  -
  Best Regards
  Gavin Lei (雷银)
  Email: gavingui2...@gmail.com
 
  

RE: Change textfield focus on zone update

2012-10-04 Thread Poder, Jacob
After the zone update, the id is probably no longer simply transactionText.
Try injecting the field and using the clientId, something like this:

@Component
private TextField transactionText;

public void onSetFocus() {
javaScriptSupport.autofocus(FieldFocusPriority.OVERRIDE, 
transactionText.getClientId());
}


Best regards,
Jacob Poder


-Original Message-
From: Thomas Jensen [mailto:tapes...@tj-development.dk] 
Sent: Wednesday, October 03, 2012 10:14 PM
To: Tapestry users
Subject: Re: Change textfield focus on zone update

2012/10/3 Poder, Jacob jacob.po...@thermofisher.com

 There is even a specific method for the purpose, see 
 JavaScriptSupport.autofocus

 I have used that successfully in a similar case.

 Best regards,
 Jacob Poder


 -Original Message-
 From: Lance Java [mailto:lance.j...@googlemail.com]
 Sent: Wednesday, October 03, 2012 9:50 AM
 To: users@tapestry.apache.org
 Subject: Re: Change textfield focus on zone update

 On second thought... it might be easier to send some javascript to the 
 client when form 1 is posted via JavaScriptSupport.addScript(...)



 --
 View this message in context:
 http://tapestry.1045711.n5.nabble.com/Change-textfield-focus-on-zone-u
 pdate-tp5716599p5716601.html Sent from the Tapestry - User mailing 
 list archive at Nabble.com.

 -
 To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
 For additional commands, e-mail: users-h...@tapestry.apache.org


 -
 To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
 For additional commands, e-mail: users-h...@tapestry.apache.org


Hi,
thanks for the reply's. I've tried to use the JavaScriptSupport but I can't 
seem to get it to do exactly what I want. I've got the following code for zone 
2 (I've set visible=true for testing purposes, it is supposed to be
false):
*
*
*t:zone t:id=popupZone id=popupZone visible=true*
*div class=overlay*
*div style=float:rightt:actionlink
t:id=closePopupZoneX/t:actionlink/div*
*strong${selectedCustomer.firstName}
${selectedCustomer.lastName} Saldo: ${selectedCustomer.saldo} /strong*
*p*
*t:form t:id=transaction*
*pTekst: t:textfield t:id=transactionText
t:value=transaction.text size=50//p*
*pKøb: t:textfield t:value=transaction.value
size=10//p*
*t:submit value=Gem/*
*/t:form*
*/p*
*/div*
*t:trigger event=setFocus/*
*/t:zone*

The onSetFocus event looks like this:

   * @Log*
*public void onSetFocus() {*
*
*
*//if(selectedCustomer.getFirstName() != null) {*
*  javaScriptSupport.autofocus(FieldFocusPriority.OVERRIDE,
transactionText);*
*//}*
*
*
*
*
*}*

When first loading the page, the onSetFocus event is called and the focus is 
set to transactionText field, as expected. But when submitting the form in 
zone 1, which updates zone 2, I get the following error cannot call method 
'activate' on null (the onSetFocus is called, when updating zone2).

The problem I actually try to solve, is to set focus on the transactionText 
field, when zone 2 is updated, so it should not have focus on initial page load.

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: Several Advices on same service

2012-10-04 Thread Lance Java
A bit of further reading shows that you can specify an ordering using the
Order annotation. Perhaps this is why tapestry is not allowing the sercond
advice?

http://tapestry.apache.org/service-advisors.html

Matching And Ordering
Each service advice method gets a unique id, obtained by stripping the
advise prefix from the method name. Advice ids must be unique across all
modules.

If the @Match annotation is omitted, the advice will match against a service
with the same id.

In many cases, the order in which the advice is given is very important; for
example, you may want logging first, then transaction management, then
security checks. The @Order annotation allows you to explicitly set the
order.



--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Several-Advices-on-same-service-tp5716615p5716623.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: Several Advices on same service

2012-10-04 Thread kheldar666
Actually in my case, the Order in which the Advices are not important.

What I don't understand is why 1 Advice is simply ignored (apparently
because the Advice creates a second ServiceMenu with the same id... )

That being said, I will look into the Advice declaration if there is
anything wrong.




--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Several-Advices-on-same-service-tp5716615p5716624.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: Several Advices on same service

2012-10-04 Thread Lance Java
From the docs:
Each service advice method gets a unique id, obtained by stripping the
advise prefix from the method name. Advice ids must be unique across all
modules.

Are you using the same method name in the two modules?



--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Several-Advices-on-same-service-tp5716615p5716625.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: [T5.2.6] When can a java.net.URL be returned from an event handler?

2012-10-04 Thread Lance Java
For a non-ajax request, tapestry should always be able to handle a return
type of java.net.URL. Things to debug:
1. Are you sure it's page request that's returning the URL (a non-ajax
request)
2. Have you made any contributions to the ComponentEventResultProcessor?
3. Any wierd classpath issues that would cause instanceof java.net.URL to
fail?



--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/T5-2-6-When-can-a-java-net-URL-be-returned-from-an-event-handler-tp5716618p5716626.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: Several Advices on same service

2012-10-04 Thread kheldar666
Hi,

I find out the root cause thanks to your idea Lance.

Actually when you use the @Advise twice, matching the same Interface... then
you MUST use the id parameter in the @Advice Annotation. If not Tapestry try
to create Advice ids based on the Interface name... in that case you end up
with 2 Advices with the same Ids which is not working well :)

Thanks for the help !

Martin



--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Several-Advices-on-same-service-tp5716615p5716627.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: [T5.2.6] When can a java.net.URL be returned from an event handler?

2012-10-04 Thread wout86
Hi Lance,

Thanks for the quick reply.

2) nope
3) I think not; my code which returns URLs typically works, but only
sometimes I get the error that a returned URL cannot be handled.

1) Can you clarify this? I don't really understand this question...



--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/T5-2-6-When-can-a-java-net-URL-be-returned-from-an-event-handler-tp5716618p5716628.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Why is AssetPathConverter not called for javascript stacks

2012-10-04 Thread Bård Magnus Kvalheim
Hi good people.

We were looking into serving assets from aws cloudfront and could quite
easily make a AssetPathConverter to support that thanks to previous
mailinglist discussions and examples.

The only issue now is that stacks (js) don't seem to go through the
AssetPathConverter. Applies to both custom and core stacks.

Tapestry 5.3.4
I've done this in module:
*binder.bind(AssetPathConverter.class,
CDNAssetPathConverter.class).withId(CDNAssetPathConverter);*
*
*
*public static void
contributeServiceOverride(MappedConfigurationClass,Object configuration,*
* @Local AssetPathConverter assetPathConverter) { *
* configuration.add(AssetPathConverter.class, assetPathConverter);*
*}*
*
*
Any idea how to convert paths for javascript stacks?

Many thanks in advance
Magnus Kvalheim


Re: [T5.2.6] When can a java.net.URL be returned from an event handler?

2012-10-04 Thread Lance Java
 Can you clarify this?
I suspect that you are returning a URL from an ajax request.



--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/T5-2-6-When-can-a-java-net-URL-be-returned-from-an-event-handler-tp5716618p5716630.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: [T5.2.6] When can a java.net.URL be returned from an event handler?

2012-10-04 Thread wout86
That's possible; I do however perform the test to make sure the URL is only
returned when !request.isXHR() (where request is an instance of
org.apache.tapestry5.services.Request). Is there any other check that I
should perform?



--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/T5-2-6-When-can-a-java-net-URL-be-returned-from-an-event-handler-tp5716618p5716632.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: [T5.2.6] When can a java.net.URL be returned from an event handler?

2012-10-04 Thread Lance Java
 I do however perform the test
Yes, the code you provided looks bullet-proof. But is this code the source
of the problem?



--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/T5-2-6-When-can-a-java-net-URL-be-returned-from-an-event-handler-tp5716618p5716633.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: arithmetic calculations

2012-10-04 Thread Thiago H de Paula Figueiredo
On Thu, 04 Oct 2012 01:38:03 -0300, Ken in Nashua kcola...@live.com  
wrote:



Folks,


Hi!


And I am using arithmetic operations as specified above.

I know Thiago is going to slam me for not putting this in the JAVA  
module...


I'm not slamming you: I'm just saying that you're ignoring over and over  
our advice to use the best practices and also to follow the Tapestry 5  
philosophy about where to put logic (which is not just Tapestry's). You've  
also ignored our advice that the Label component and the label HTML  
element should only be used for labeling form fields. It's very  
frustrating to give the same advice again and again a  and being  
completely ignored. And this advice isn't made up from me, it's just the  
best practices in GUI development in general and Web interfaces in  
particular, and best practices which are part of Tapestry 5's philosophy.



Am I compelled to put this in the JAVA... ?


Yes. If you really want to go ahead and do the wrong thing, use the  
ChennileKit's OGNL binding.



or should arithmetic operations be supported in the page space for TAP-5


No. They never will because it's against the framework philosophy and best  
practices in general.


I know you're converting something from T4 from T5. T5 is an evolution  
from T4. Some good stuff was added and some bad stuff was dropped. Why  
don't you use the fact that you're porting code from T4 to T5 and also  
improve it by following the best practices?


I had already given up on answering your repeated question on how to write  
logic in Tapestry templates. I've just answered now because my name was  
mentioned.


--
Thiago H. de Paula Figueiredo

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: Change textfield focus on zone update

2012-10-04 Thread Thomas Jensen
Hi,
Great, that fixed the problem. Thank you very much. 

/Thomas



Den 04/10/2012 kl. 10.44 skrev Poder, Jacob jacob.po...@thermofisher.com:

 After the zone update, the id is probably no longer simply transactionText.
 Try injecting the field and using the clientId, something like this:
 
 @Component
 private TextField transactionText;
 
 public void onSetFocus() {
javaScriptSupport.autofocus(FieldFocusPriority.OVERRIDE, 
 transactionText.getClientId());
 }
 
 
 Best regards,
 Jacob Poder
 
 
 -Original Message-
 From: Thomas Jensen [mailto:tapes...@tj-development.dk] 
 Sent: Wednesday, October 03, 2012 10:14 PM
 To: Tapestry users
 Subject: Re: Change textfield focus on zone update
 
 2012/10/3 Poder, Jacob jacob.po...@thermofisher.com
 
 There is even a specific method for the purpose, see 
 JavaScriptSupport.autofocus
 
 I have used that successfully in a similar case.
 
 Best regards,
 Jacob Poder
 
 
 -Original Message-
 From: Lance Java [mailto:lance.j...@googlemail.com]
 Sent: Wednesday, October 03, 2012 9:50 AM
 To: users@tapestry.apache.org
 Subject: Re: Change textfield focus on zone update
 
 On second thought... it might be easier to send some javascript to the 
 client when form 1 is posted via JavaScriptSupport.addScript(...)
 
 
 
 --
 View this message in context:
 http://tapestry.1045711.n5.nabble.com/Change-textfield-focus-on-zone-u
 pdate-tp5716599p5716601.html Sent from the Tapestry - User mailing 
 list archive at Nabble.com.
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
 For additional commands, e-mail: users-h...@tapestry.apache.org
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
 For additional commands, e-mail: users-h...@tapestry.apache.org
 Hi,
 thanks for the reply's. I've tried to use the JavaScriptSupport but I can't 
 seem to get it to do exactly what I want. I've got the following code for 
 zone 2 (I've set visible=true for testing purposes, it is supposed to be
 false):
 *
 *
 *t:zone t:id=popupZone id=popupZone visible=true*
 *div class=overlay*
 *div style=float:rightt:actionlink
 t:id=closePopupZoneX/t:actionlink/div*
 *strong${selectedCustomer.firstName}
 ${selectedCustomer.lastName} Saldo: ${selectedCustomer.saldo} /strong*
 *p*
 *t:form t:id=transaction*
 *pTekst: t:textfield t:id=transactionText
 t:value=transaction.text size=50//p*
 *pKøb: t:textfield t:value=transaction.value
 size=10//p*
 *t:submit value=Gem/*
 */t:form*
 */p*
 */div*
 *t:trigger event=setFocus/*
 */t:zone*
 
 The onSetFocus event looks like this:
 
   * @Log*
 *public void onSetFocus() {*
 *
 *
 *//if(selectedCustomer.getFirstName() != null) {*
 *  javaScriptSupport.autofocus(FieldFocusPriority.OVERRIDE,
 transactionText);*
 *//}*
 *
 *
 *
 *
 *}*
 
 When first loading the page, the onSetFocus event is called and the focus 
 is set to transactionText field, as expected. But when submitting the form 
 in zone 1, which updates zone 2, I get the following error cannot call 
 method 'activate' on null (the onSetFocus is called, when updating zone2).
 
 The problem I actually try to solve, is to set focus on the transactionText 
 field, when zone 2 is updated, so it should not have focus on initial page 
 load.
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
 For additional commands, e-mail: users-h...@tapestry.apache.org
 

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: Why is AssetPathConverter not called for javascript stacks

2012-10-04 Thread Howard Lewis Ship
Looks like an oversight.  I'm not familiar with CloudFront; can you
give me a thumbnail overview of how your CDN hooks work?

On Thu, Oct 4, 2012 at 3:54 AM, Bård Magnus Kvalheim mag...@kvalheim.eu wrote:
 Hi good people.

 We were looking into serving assets from aws cloudfront and could quite
 easily make a AssetPathConverter to support that thanks to previous
 mailinglist discussions and examples.

 The only issue now is that stacks (js) don't seem to go through the
 AssetPathConverter. Applies to both custom and core stacks.

 Tapestry 5.3.4
 I've done this in module:
 *binder.bind(AssetPathConverter.class,
 CDNAssetPathConverter.class).withId(CDNAssetPathConverter);*
 *
 *
 *public static void
 contributeServiceOverride(MappedConfigurationClass,Object configuration,*
 * @Local AssetPathConverter assetPathConverter) { *
 * configuration.add(AssetPathConverter.class, assetPathConverter);*
 *}*
 *
 *
 Any idea how to convert paths for javascript stacks?

 Many thanks in advance
 Magnus Kvalheim



-- 
Howard M. Lewis Ship

Creator of Apache Tapestry

The source for Tapestry training, mentoring and support. Contact me to
learn how I can get you up and productive in Tapestry fast!

(971) 678-5210
http://howardlewisship.com

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: [T5.2.6] When can a java.net.URL be returned from an event handler?

2012-10-04 Thread wout86
It should be... No other piece of event handler code returns URLs.



--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/T5-2-6-When-can-a-java-net-URL-be-returned-from-an-event-handler-tp5716618p5716638.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: Change textfield focus on zone update

2012-10-04 Thread Thomas Jensen
Hi,
It didn't quite work anyway. It only works if the zone is visible, when I
set visible=false zone2 does not receive focus, but if i submit twice from
zone 1, zone 2 receives focus on the second submit.

- First submit (from zone 1)
  - Zone 2 is set to visible and rendered
  - No focus on zone 2
- Second submit (from zone 1)
  - Zone 2 was already visible
  - focus is set correctly

In both cases the onSetFocus() method is called.

/Thomas

2012/10/4 Thomas Jensen tapes...@tj-development.dk

 Hi,
 Great, that fixed the problem. Thank you very much.

 /Thomas



 Den 04/10/2012 kl. 10.44 skrev Poder, Jacob 
 jacob.po...@thermofisher.com:

  After the zone update, the id is probably no longer simply
 transactionText.
  Try injecting the field and using the clientId, something like this:
 
  @Component
  private TextField transactionText;
 
  public void onSetFocus() {
 javaScriptSupport.autofocus(FieldFocusPriority.OVERRIDE,
 transactionText.getClientId());
  }
 
 
  Best regards,
  Jacob Poder
 
 
  -Original Message-
  From: Thomas Jensen [mailto:tapes...@tj-development.dk]
  Sent: Wednesday, October 03, 2012 10:14 PM
  To: Tapestry users
  Subject: Re: Change textfield focus on zone update
 
  2012/10/3 Poder, Jacob jacob.po...@thermofisher.com
 
  There is even a specific method for the purpose, see
  JavaScriptSupport.autofocus
 
  I have used that successfully in a similar case.
 
  Best regards,
  Jacob Poder
 
 
  -Original Message-
  From: Lance Java [mailto:lance.j...@googlemail.com]
  Sent: Wednesday, October 03, 2012 9:50 AM
  To: users@tapestry.apache.org
  Subject: Re: Change textfield focus on zone update
 
  On second thought... it might be easier to send some javascript to the
  client when form 1 is posted via JavaScriptSupport.addScript(...)
 
 
 
  --
  View this message in context:
  http://tapestry.1045711.n5.nabble.com/Change-textfield-focus-on-zone-u
  pdate-tp5716599p5716601.html Sent from the Tapestry - User mailing
  list archive at Nabble.com.
 
  -
  To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
  For additional commands, e-mail: users-h...@tapestry.apache.org
 
 
  -
  To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
  For additional commands, e-mail: users-h...@tapestry.apache.org
  Hi,
  thanks for the reply's. I've tried to use the JavaScriptSupport but I
 can't seem to get it to do exactly what I want. I've got the following code
 for zone 2 (I've set visible=true for testing purposes, it is supposed to
 be
  false):
  *
  *
  *t:zone t:id=popupZone id=popupZone visible=true*
  *div class=overlay*
  *div style=float:rightt:actionlink
  t:id=closePopupZoneX/t:actionlink/div*
  *strong${selectedCustomer.firstName}
  ${selectedCustomer.lastName} Saldo: ${selectedCustomer.saldo} /strong*
  *p*
  *t:form t:id=transaction*
  *pTekst: t:textfield t:id=transactionText
  t:value=transaction.text size=50//p*
  *pKøb: t:textfield t:value=transaction.value
  size=10//p*
  *t:submit value=Gem/*
  */t:form*
  */p*
  */div*
  *t:trigger event=setFocus/*
  */t:zone*
 
  The onSetFocus event looks like this:
 
* @Log*
  *public void onSetFocus() {*
  *
  *
  *//if(selectedCustomer.getFirstName() != null) {*
  *  javaScriptSupport.autofocus(FieldFocusPriority.OVERRIDE,
  transactionText);*
  *//}*
  *
  *
  *
  *
  *}*
 
  When first loading the page, the onSetFocus event is called and the
 focus is set to transactionText field, as expected. But when submitting
 the form in zone 1, which updates zone 2, I get the following error cannot
 call method 'activate' on null (the onSetFocus is called, when updating
 zone2).
 
  The problem I actually try to solve, is to set focus on the
 transactionText field, when zone 2 is updated, so it should not have
 focus on initial page load.
 
  -
  To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
  For additional commands, e-mail: users-h...@tapestry.apache.org
 



Re: Tapestry 5.3.5 BACK OUT Prototype 1.7.1?

2012-10-04 Thread Lenny Primak
Voted. 

On Oct 4, 2012, at 4:59 PM, Geoff Callender 
geoff.callender.jumpst...@gmail.com wrote:

 Please vote for 
 https://issues.apache.org/jira/browse/TAP5-1989#comment-13469684 .
 
 On 04/10/2012, at 9:01 PM, AndyB wrote:
 
 Is this happening?
 
 
 
 --
 View this message in context: 
 http://tapestry.1045711.n5.nabble.com/Re-Tapestry-5-3-5-BACK-OUT-Prototype-1-7-1-tp5716095p5716631.html
 Sent from the Tapestry - Dev mailing list archive at Nabble.com.
 
 -
 To unsubscribe, e-mail: dev-unsubscr...@tapestry.apache.org
 For additional commands, e-mail: dev-h...@tapestry.apache.org
 
 
 -
 To unsubscribe, e-mail: dev-unsubscr...@tapestry.apache.org
 For additional commands, e-mail: dev-h...@tapestry.apache.org
 

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: Tapestry 5.3.5 BACK OUT Prototype 1.7.1?

2012-10-04 Thread Howard Lewis Ship
Your wish is my command:

https://issues.apache.org/jira/browse/TAP5-2009

On Thu, Oct 4, 2012 at 2:03 PM, Lenny Primak lpri...@hope.nyc.ny.us wrote:
 Voted.

 On Oct 4, 2012, at 4:59 PM, Geoff Callender 
 geoff.callender.jumpst...@gmail.com wrote:

 Please vote for 
 https://issues.apache.org/jira/browse/TAP5-1989#comment-13469684 .

 On 04/10/2012, at 9:01 PM, AndyB wrote:

 Is this happening?



 --
 View this message in context: 
 http://tapestry.1045711.n5.nabble.com/Re-Tapestry-5-3-5-BACK-OUT-Prototype-1-7-1-tp5716095p5716631.html
 Sent from the Tapestry - Dev mailing list archive at Nabble.com.

 -
 To unsubscribe, e-mail: dev-unsubscr...@tapestry.apache.org
 For additional commands, e-mail: dev-h...@tapestry.apache.org


 -
 To unsubscribe, e-mail: dev-unsubscr...@tapestry.apache.org
 For additional commands, e-mail: dev-h...@tapestry.apache.org


 -
 To unsubscribe, e-mail: dev-unsubscr...@tapestry.apache.org
 For additional commands, e-mail: dev-h...@tapestry.apache.org




-- 
Howard M. Lewis Ship

Creator of Apache Tapestry

The source for Tapestry training, mentoring and support. Contact me to
learn how I can get you up and productive in Tapestry fast!

(971) 678-5210
http://howardlewisship.com

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: Tapestry 5.3.5 BACK OUT Prototype 1.7.1?

2012-10-04 Thread Lenny Primak
I don't understand.  It says fix version 5.3.5, but wouldn't be a 5.3.6 or 
later with this backout?
Thanks for the fix!

On Oct 4, 2012, at 5:35 PM, Howard Lewis Ship wrote:

 Your wish is my command:
 
 https://issues.apache.org/jira/browse/TAP5-2009
 
 On Thu, Oct 4, 2012 at 2:03 PM, Lenny Primak lpri...@hope.nyc.ny.us wrote:
 Voted.
 
 On Oct 4, 2012, at 4:59 PM, Geoff Callender 
 geoff.callender.jumpst...@gmail.com wrote:
 
 Please vote for 
 https://issues.apache.org/jira/browse/TAP5-1989#comment-13469684 .
 
 On 04/10/2012, at 9:01 PM, AndyB wrote:
 
 Is this happening?
 
 
 
 --
 View this message in context: 
 http://tapestry.1045711.n5.nabble.com/Re-Tapestry-5-3-5-BACK-OUT-Prototype-1-7-1-tp5716095p5716631.html
 Sent from the Tapestry - Dev mailing list archive at Nabble.com.
 
 -
 To unsubscribe, e-mail: dev-unsubscr...@tapestry.apache.org
 For additional commands, e-mail: dev-h...@tapestry.apache.org
 
 
 -
 To unsubscribe, e-mail: dev-unsubscr...@tapestry.apache.org
 For additional commands, e-mail: dev-h...@tapestry.apache.org
 
 
 -
 To unsubscribe, e-mail: dev-unsubscr...@tapestry.apache.org
 For additional commands, e-mail: dev-h...@tapestry.apache.org
 
 
 
 
 -- 
 Howard M. Lewis Ship
 
 Creator of Apache Tapestry
 
 The source for Tapestry training, mentoring and support. Contact me to
 learn how I can get you up and productive in Tapestry fast!
 
 (971) 678-5210
 http://howardlewisship.com
 
 -
 To unsubscribe, e-mail: dev-unsubscr...@tapestry.apache.org
 For additional commands, e-mail: dev-h...@tapestry.apache.org
 


-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: Tapestry 5.3.5 BACK OUT Prototype 1.7.1?

2012-10-04 Thread Howard Lewis Ship
Thanks!  I had entered the wrong value. Fixed now.

On Thu, Oct 4, 2012 at 3:01 PM, Lenny Primak lpri...@hope.nyc.ny.us wrote:
 I don't understand.  It says fix version 5.3.5, but wouldn't be a 5.3.6 or 
 later with this backout?
 Thanks for the fix!

 On Oct 4, 2012, at 5:35 PM, Howard Lewis Ship wrote:

 Your wish is my command:

 https://issues.apache.org/jira/browse/TAP5-2009

 On Thu, Oct 4, 2012 at 2:03 PM, Lenny Primak lpri...@hope.nyc.ny.us wrote:
 Voted.

 On Oct 4, 2012, at 4:59 PM, Geoff Callender 
 geoff.callender.jumpst...@gmail.com wrote:

 Please vote for 
 https://issues.apache.org/jira/browse/TAP5-1989#comment-13469684 .

 On 04/10/2012, at 9:01 PM, AndyB wrote:

 Is this happening?



 --
 View this message in context: 
 http://tapestry.1045711.n5.nabble.com/Re-Tapestry-5-3-5-BACK-OUT-Prototype-1-7-1-tp5716095p5716631.html
 Sent from the Tapestry - Dev mailing list archive at Nabble.com.

 -
 To unsubscribe, e-mail: dev-unsubscr...@tapestry.apache.org
 For additional commands, e-mail: dev-h...@tapestry.apache.org


 -
 To unsubscribe, e-mail: dev-unsubscr...@tapestry.apache.org
 For additional commands, e-mail: dev-h...@tapestry.apache.org


 -
 To unsubscribe, e-mail: dev-unsubscr...@tapestry.apache.org
 For additional commands, e-mail: dev-h...@tapestry.apache.org




 --
 Howard M. Lewis Ship

 Creator of Apache Tapestry

 The source for Tapestry training, mentoring and support. Contact me to
 learn how I can get you up and productive in Tapestry fast!

 (971) 678-5210
 http://howardlewisship.com

 -
 To unsubscribe, e-mail: dev-unsubscr...@tapestry.apache.org
 For additional commands, e-mail: dev-h...@tapestry.apache.org



 -
 To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
 For additional commands, e-mail: users-h...@tapestry.apache.org




-- 
Howard M. Lewis Ship

Creator of Apache Tapestry

The source for Tapestry training, mentoring and support. Contact me to
learn how I can get you up and productive in Tapestry fast!

(971) 678-5210
http://howardlewisship.com

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Posting from multiple submits

2012-10-04 Thread Henrik von Schlanbusch
Hi. I have problems understanding multiple submits. I am running T5.3.5.

I have the following tml:

t:zone t:id=singleUserRegistrationFormZone 
id=singleUserRegistrationFormZone
t:form t:id=singleUserRegistrationForm 
zone=singleUserRegistrationFormZone
t:submit t:id=setSelectedGroup/
t:submit t:id=sendUserRegistration value=${signupLabel}/
/t:form
/zone


And javacode:



 @Component
private Submit setSelectedGroup;

@Component
private Submit sendUserRegistration;

public void onSelectedFromSetSelectedGroup() {
getLog().info(SELECT GROUP:  + selectedGroup);
}

public void onSelectedFromSendUserRegistration() {
getLog().info(SELECT Userre:  + selectedGroup);
}

public Object onSuccessFromSingleUserRegistrationForm() {
getLog().info(SUCCESS - SINGLE USER REGISTRATION);

}

From what I understand of the documentation, when clicking on the 
setSelectedGroup,
the method onSelectedFromSetSelectedGroup should be run first, then the 
onSuccessFromSingleUserRegistrationForm(). When observing from my debugger, 
the onSelectedFromSetSelectedGroup is never run. The click on the 
setSelectedGroup will consequently only run the success method of the 
form. So my question is: have I misunderstood the documentation, is it 
not possible to run different methods on the serverside from different 
buttons on the client? And if it is possible, can somebody help me in 
spotting where I have done something wrong?

-Henrik



-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org