Re: Ioc Ordering Contraints

2012-09-09 Thread Muhammad Gelbana
*@Michael*

Constraints are very loose; after means 'somewhere after' rather than
> 'immediately after'

If that was the case, why did cause an issue if it was so loose ? Is this
one special case (i.e. after:***) ?

What's the advantage of having this behavior over having it strict as being
*immediately after* ? I haven't tried this before but if I had to chose,
I'd chose it to act as *immediately after*. Thinks would be more clear and
I only need to identify the injected transformers order to set mine up
correctly.

*@Steve*
*
*
Does it fit your needs to specify *UnclaimedField* order as *after:** and
then specify the other transformer with less priority to be before  *
UnclaimedField* as *before: UnclaimedField* ?

On Mon, Sep 10, 2012 at 4:33 AM, Steve Eynon  wrote:

> Hi Michael,
>
> > just specify as many as are important to you.
>
> I kinda want mine to run last, because I need make sure no other
> workers (in T5 or other modules) add a onActivate() method. The issue
> here is that both my 'ContextNotRequiredWorker' and T5's
> 'UnclaimedField' want to run last - which isn't allowed.
>
> >  the trick is to specify multiple constraints
>
> I could specify many "after" clauses for T5 workers as you mention,
> but that then won't (be guaranteed to) work if some other another
> module adds an onActivate() method.
>
> Stumpted,
>
> Steve.
> --
> Steve Eynon
> ---
> "If at first you don't succeed,
>so much for skydiving!"
>
>
>
> On 10 September 2012 10:13, Michael Prescott
>  wrote:
> > Michael
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


Re: Ioc Ordering Contraints

2012-09-09 Thread Steve Eynon
Hi Michael,

> just specify as many as are important to you.

I kinda want mine to run last, because I need make sure no other
workers (in T5 or other modules) add a onActivate() method. The issue
here is that both my 'ContextNotRequiredWorker' and T5's
'UnclaimedField' want to run last - which isn't allowed.

>  the trick is to specify multiple constraints

I could specify many "after" clauses for T5 workers as you mention,
but that then won't (be guaranteed to) work if some other another
module adds an onActivate() method.

Stumpted,

Steve.
--
Steve Eynon
---
"If at first you don't succeed,
   so much for skydiving!"



On 10 September 2012 10:13, Michael Prescott
 wrote:
> Michael

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



Re: Ioc Ordering Contraints

2012-09-09 Thread Michael Prescott
Apparently, the trick is to specify multiple constraints.  Constraints are
very loose; after means 'somewhere after' rather than 'immediately after',
so just specify as many as are important to you.

Someone more informed can weigh in whether you can mix specific constraints
with wildcards.  In the meantime, give it a shot!

Michael

On 9 September 2012 22:02, Steve Eynon wrote:

> Hi,
>
> I have a transform worker which I want to run after everything else (it
> checks for the existence of an onActive() method) so I have the following
> Module method, note the "after:*"
>
> @Contribute(**ComponentClassTransformWorker2**.class)
> @Primary
> public static void provideTransformWorkers(
>   OrderedConfiguration<**ComponentClassTransformWorker2**> configuration)
> {
>
>   configuration.addInstance(
> "ContextNotRequiredWorker",
> NotRequiredWorker.class,
> "after:*");
> }
>
> But then I get the following warning:
>
> WARN  : ConentClassTransformWorker - Unable to add 'UnclaimedField' as a
> dependency of 'ContextNotRequiredWorker', as that forms a dependency cycle
> ('ContextNotRequiredWorker' depends on itself via 'UnclaimedField'). The
> dependency has been ignored.
>
> because T5 defines UnclaimedField to also be "after:*". How can I define
> my config to be "after:* except UnclaimedField", or "before:UnclaimedField
> but after:everthing else"?
>
> Or does anyone know how else may I resolve my ordering problem?
>
> Cheers,
>
> Steve.
>
> --**--**-
> To unsubscribe, e-mail: 
> users-unsubscribe@tapestry.**apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


Ioc Ordering Contraints

2012-09-09 Thread Steve Eynon

Hi,

I have a transform worker which I want to run after everything else (it 
checks for the existence of an onActive() method) so I have the 
following Module method, note the "after:*"


@Contribute(ComponentClassTransformWorker2.class)
@Primary
public static void provideTransformWorkers(
  OrderedConfiguration configuration) {

  configuration.addInstance(
"ContextNotRequiredWorker",
NotRequiredWorker.class,
"after:*");
}

But then I get the following warning:

WARN  : ConentClassTransformWorker - Unable to add 'UnclaimedField' as a 
dependency of 'ContextNotRequiredWorker', as that forms a dependency 
cycle ('ContextNotRequiredWorker' depends on itself via 
'UnclaimedField'). The dependency has been ignored.


because T5 defines UnclaimedField to also be "after:*". How can I define 
my config to be "after:* except UnclaimedField", or 
"before:UnclaimedField but after:everthing else"?


Or does anyone know how else may I resolve my ordering problem?

Cheers,

Steve.

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



Re: Ajax Upload for Tapestry

2012-09-09 Thread Ray Nicholus
2. The only other option is for the upload library to set a more specific
the content type based on the file extension.  Even in this case you would
need to formally identify the file server-side, since there is no guarantee
that this type is correct.

3.  You'll have to provide more details, such as code, file-uploader
"version", etc
On Sep 9, 2012 3:47 AM, "Amr Mohamed Mahmoud Hassanien" 
wrote:

> Dear Taha, Tapestry users,
>
> I checked out the Ajax upload for tapestry, that Taha thankfully made it
> from the file upload component.
>
> http://tawus.wordpress.com/2011/06/25/ajax-upload-for-tapestry/
>
> I have some problems with the component if anyone can help:
>
>
> 1.  I have changed the code to fit in my Tapestry 5.1 project, All
> works fine but the method onRemoveUpload() of AjaxUpload.java
>
> void onRemoveUpload(@RequestParameter("serverIndex") int serverIndex)
>{
>   ...
>}
>
> The RequestParameter annotation does not exist in tapestry 5.1 . I thought
> in Tapestry 5.1 it works by just removing the annotation but it didn't work.
>
>
> 2.  I use this component to upload video files, mainly, so as part of my
> validation I have to check the MIMETYPE, The content type of the file is
> always application/octet-stream , Is there any work around this?
>
> 3.  I 've learned that the component switches automatically to iframe
> for non-ajax upload supporting browsers like IE, I am using IE8 and the
> component is not showing up at all. Do you have any idea why?
>
> Please if anyone could help in any of these points , kidly reply to my
> email
>
> Thanks and Regards,
>
> Amr Hassanin
>


Ajax Upload for Tapestry

2012-09-09 Thread Amr Mohamed Mahmoud Hassanien
Dear Taha, Tapestry users,

I checked out the Ajax upload for tapestry, that Taha thankfully made it from 
the file upload component.

http://tawus.wordpress.com/2011/06/25/ajax-upload-for-tapestry/

I have some problems with the component if anyone can help:


1.  I have changed the code to fit in my Tapestry 5.1 project, All works 
fine but the method onRemoveUpload() of AjaxUpload.java

void onRemoveUpload(@RequestParameter("serverIndex") int serverIndex)
   {
  ...
   }

The RequestParameter annotation does not exist in tapestry 5.1 . I thought in 
Tapestry 5.1 it works by just removing the annotation but it didn't work.


2.  I use this component to upload video files, mainly, so as part of my 
validation I have to check the MIMETYPE, The content type of the file is always 
application/octet-stream , Is there any work around this?

3.  I 've learned that the component switches automatically to iframe for 
non-ajax upload supporting browsers like IE, I am using IE8 and the component 
is not showing up at all. Do you have any idea why?

Please if anyone could help in any of these points , kidly reply to my email

Thanks and Regards,

Amr Hassanin