Form components may not be placed inside other Form components.

2011-08-29 Thread Gunnar Eketrapp
I have a layout component and a quite simple page. (recently created it ...)

There are no zones involved ...

When displaying this new page I get the error message ...

*Form components may not be placed inside other Form components.*
*
*
I have seen this error message before but normally it disappears after a
clean + build.
Now it is sticky ...

Has anyone encountered this problem and can point me in any direction of
what can cause it.

I have stared at the .tml files for a while now and can't see any problems
within them.

Thanks in advance,
Gunnar Eketrapp


ParallelExecutor priority

2011-08-29 Thread jeczmien
Hi.
I'm wonder there is any way to set priority for task running by
ParallelExecutor.invoke.
I need lower priority thread for generating pdf - its time and proc
consuming. Now I'm using JVM's java.util.concurrent.ThreadPoolExecutor

Best regards

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/ParallelExecutor-priority-tp4745722p4745722.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: Delegate and Blocks!

2011-08-29 Thread haopham
I have the same problem. That is:

I have a block call blockDecorator in code like this:

t:block t:id=blockDecorator
div class=GridMultiActionWrapper
div class=GridMultiActionContainer
div class=GridMultiAction
t:form t:id=selectionForm zone=prop:zone 
context=containerContext
t:hidden t:id=selectedItems/
t:hidden t:id=zone/

div class=CheckboxSection
t:if test=paging
${assistanceText('grid.select')}
ozc:MessageTip 
clientId=${zone}-page-selection
cssMessageType=Heading

p${assistanceText('grid.select.tip')}/p
/ozc:MessageTip
#x20; 
/t:if

t:checkbox t:id=selectAll
label=prop:assistanceText(selectAllLabelKey)/

t:label for=selectAll/

t:if test=paging
t:checkbox 
t:id=selectThisPage
label=prop:assistanceText('grid.select.this-page')/
t:label for=selectThisPage/
/t:if
/div

t:parameter name=else /t:parameter

div class=ActionSection
${assistanceText('grid.action')}
ozc:MessageTip clientId=${zone}-actions 
cssMessageType=Heading

p${assistanceText('grid.action.tip')}/p
/ozc:MessageTip
#x20; 
t:select t:id=multiAction 
model=selectActions
blankOption=prop:blankOption

blankLabel=${assistanceText('grid.action.blank-label')}/
ozc:Submit t:id=buttonOK 
labelKey=ok-label smallStyle=true
onclick=if
(ozc.DataGridManager.get('${clientId}').invalidAction(event))

{${clientId}ActionMessage.showMessageBox(); return false;}/
/div
/t:form
/div
/div
/div
/t:block


and I have two times to deligate this block to display it in head and botton
of a grid (for search result)
div id=${clientId} class=${cssClass}
t:delegate to=blockDecorator/
/div

div class=DataGridFunctionalBar 
t:delegate to=blockDecorator / 
/div


The problem is that, it only work ok if I have only one deligate.
and It will not call ajax - error when I have two deligate

Could you please  help me to find what I am wrong and how to fix it?
Thank you very much 
haopham



--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Delegate-and-Blocks-tp4726071p4745752.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



@Property and @Parameter

2011-08-29 Thread Jens Breitenstein

Hi All!

I tried to use a combination of @Property and @Parameter.


@Property(read = true, write = false)
@Parameter(required = true)
private String _myParam;


unfortunately it seems to be impossible to intercept a set in such a case


//  NEVER CALLED
public void String setMyParam(final String param)
{
_myParam = param;
// do more...
}


Is there any reason this is not allowed?


Jens


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



Re: ParallelExecutor priority

2011-08-29 Thread Massimo Lusetti
On Mon, Aug 29, 2011 at 12:25 PM, jeczmien jeczm...@podgorska.ddns.info wrote:

 Hi.
 I'm wonder there is any way to set priority for task running by
 ParallelExecutor.invoke.
 I need lower priority thread for generating pdf - its time and proc
 consuming. Now I'm using JVM's java.util.concurrent.ThreadPoolExecutor

Not really... But I'm willing to manages improvements in that area
since I use it extensively

What is your use case?

Cheers
-- 
Massimo
http://meridio.blogspot.com

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



Re: @Property and @Parameter

2011-08-29 Thread Taha Hafeez
@Parameters do not use setters. They create a conduit to set/get the
values directly , so setters are never used.

You can look at the code of ParameterWorker for details

you can always use setupRender to setup things

On Mon, Aug 29, 2011 at 6:16 PM, Jens Breitenstein mailingl...@j-b-s.de wrote:
 Hi All!

 I tried to use a combination of @Property and @Parameter.


 @Property(read = true, write = false)
 @Parameter(required = true)
 private String _myParam;


 unfortunately it seems to be impossible to intercept a set in such a case


 //  NEVER CALLED
 public void String setMyParam(final String param)
 {
    _myParam = param;
    // do more...
 }


 Is there any reason this is not allowed?


 Jens


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





-- 
Regards

Taha Hafeez Siddiqi (tawus)
http://tawus.wordpress.com

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



Re: @Property and @Parameter

2011-08-29 Thread Jens Breitenstein

Thx Taha!

That's exactly what I did to come around it. But if both annotations are 
mutally exclusive shouldn't the framework give a warning or simply fail 
like it does when having a setter and a property which forces the setter 
creation? Just treating a setter as non-existing...I don't know if this 
is a perfect solution even I understand the technical reason behind it 
now ;-)


Jens


Am 29.08.11 15:14, schrieb Taha Hafeez:

@Parameters do not use setters. They create a conduit to set/get the
values directly , so setters are never used.

You can look at the code of ParameterWorker for details

you can always use setupRender to setup things

On Mon, Aug 29, 2011 at 6:16 PM, Jens Breitensteinmailingl...@j-b-s.de  wrote:

Hi All!

I tried to use a combination of @Property and @Parameter.


@Property(read = true, write = false)
@Parameter(required = true)
private String _myParam;


unfortunately it seems to be impossible to intercept a set in such a case


//   NEVER CALLED
public void String setMyParam(final String param)
{
_myParam = param;
// do more...
}


Is there any reason this is not allowed?


Jens


-
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: @Property and @Parameter

2011-08-29 Thread Josh Canfield
Sounds like a defect. If there is setter I can't think of a reason that
@Parameter shouldn't use it.
On Aug 29, 2011 6:15 AM, Taha Hafeez tawus.tapes...@gmail.com wrote:
 @Parameters do not use setters. They create a conduit to set/get the
 values directly , so setters are never used.

 You can look at the code of ParameterWorker for details

 you can always use setupRender to setup things

 On Mon, Aug 29, 2011 at 6:16 PM, Jens Breitenstein mailingl...@j-b-s.de
wrote:
 Hi All!

 I tried to use a combination of @Property and @Parameter.


 @Property(read = true, write = false)
 @Parameter(required = true)
 private String _myParam;


 unfortunately it seems to be impossible to intercept a set in such a
case


 //  NEVER CALLED
 public void String setMyParam(final String param)
 {
_myParam = param;
// do more...
 }


 Is there any reason this is not allowed?


 Jens


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





 --
 Regards

 Taha Hafeez Siddiqi (tawus)
 http://tawus.wordpress.com

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



Re: @Property and @Parameter

2011-08-29 Thread Taha Hafeez
I agree.

On Mon, Aug 29, 2011 at 7:41 PM, Josh Canfield joshcanfi...@gmail.com wrote:
 Sounds like a defect. If there is setter I can't think of a reason that
 @Parameter shouldn't use it.
 On Aug 29, 2011 6:15 AM, Taha Hafeez tawus.tapes...@gmail.com wrote:
 @Parameters do not use setters. They create a conduit to set/get the
 values directly , so setters are never used.

 You can look at the code of ParameterWorker for details

 you can always use setupRender to setup things

 On Mon, Aug 29, 2011 at 6:16 PM, Jens Breitenstein mailingl...@j-b-s.de
 wrote:
 Hi All!

 I tried to use a combination of @Property and @Parameter.


 @Property(read = true, write = false)
 @Parameter(required = true)
 private String _myParam;


 unfortunately it seems to be impossible to intercept a set in such a
 case


 //  NEVER CALLED
 public void String setMyParam(final String param)
 {
    _myParam = param;
    // do more...
 }


 Is there any reason this is not allowed?


 Jens


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





 --
 Regards

 Taha Hafeez Siddiqi (tawus)
 http://tawus.wordpress.com

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





-- 
Regards

Taha Hafeez Siddiqi (tawus)
http://tawus.wordpress.com

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



Re: @Property and @Parameter

2011-08-29 Thread Jens Breitenstein

Hi Taha, hi Josh!

well, that's what my gut feeling told me too. Should I raise a jira issue?



Am 29.08.11 16:36, schrieb Taha Hafeez:

I agree.

On Mon, Aug 29, 2011 at 7:41 PM, Josh Canfieldjoshcanfi...@gmail.com  wrote:

Sounds like a defect. If there is setter I can't think of a reason that
@Parameter shouldn't use it.
On Aug 29, 2011 6:15 AM, Taha Hafeeztawus.tapes...@gmail.com  wrote:

@Parameters do not use setters. They create a conduit to set/get the
values directly , so setters are never used.

You can look at the code of ParameterWorker for details

you can always use setupRender to setup things

On Mon, Aug 29, 2011 at 6:16 PM, Jens Breitensteinmailingl...@j-b-s.de

wrote:

Hi All!

I tried to use a combination of @Property and @Parameter.


@Property(read = true, write = false)
@Parameter(required = true)
private String _myParam;


unfortunately it seems to be impossible to intercept a set in such a

case


//   NEVER CALLED
public void String setMyParam(final String param)
{
_myParam = param;
// do more...
}


Is there any reason this is not allowed?


Jens


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





--
Regards

Taha Hafeez Siddiqi (tawus)
http://tawus.wordpress.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



Re: @Property and @Parameter

2011-08-29 Thread Taha Hafeez
Yes, please

On Mon, Aug 29, 2011 at 8:20 PM, Jens Breitenstein mailingl...@j-b-s.de wrote:
 Hi Taha, hi Josh!

 well, that's what my gut feeling told me too. Should I raise a jira issue?



 Am 29.08.11 16:36, schrieb Taha Hafeez:

 I agree.

 On Mon, Aug 29, 2011 at 7:41 PM, Josh Canfieldjoshcanfi...@gmail.com
  wrote:

 Sounds like a defect. If there is setter I can't think of a reason that
 @Parameter shouldn't use it.
 On Aug 29, 2011 6:15 AM, Taha Hafeeztawus.tapes...@gmail.com  wrote:

 @Parameters do not use setters. They create a conduit to set/get the
 values directly , so setters are never used.

 You can look at the code of ParameterWorker for details

 you can always use setupRender to setup things

 On Mon, Aug 29, 2011 at 6:16 PM, Jens Breitensteinmailingl...@j-b-s.de

 wrote:

 Hi All!

 I tried to use a combination of @Property and @Parameter.


 @Property(read = true, write = false)
 @Parameter(required = true)
 private String _myParam;


 unfortunately it seems to be impossible to intercept a set in such a

 case

 //   NEVER CALLED
 public void String setMyParam(final String param)
 {
    _myParam = param;
    // do more...
 }


 Is there any reason this is not allowed?


 Jens


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




 --
 Regards

 Taha Hafeez Siddiqi (tawus)
 http://tawus.wordpress.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





-- 
Regards

Taha Hafeez Siddiqi (tawus)
http://tawus.wordpress.com

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



Re: LinkSubmit in a loop

2011-08-29 Thread Taha Hafeez
HI

On Sun, Aug 28, 2011 at 2:45 PM, cqasker cqas...@yahoo.com wrote:
 I have some questions about linksubmit/submit in a loop. I have some enums
 {e1, e2, e3} for example. In the loop I generate a linksubmit for each enum
 and pass the enum in the linksubmit context parameter and an event called
 handleEnum in the event parameter. From what I understand, theoretically
 this linksubmit should generate a  call to my handleEnum event handler so
 I can set some properties and then later the onSuccess event handler method
 should be invoked and .

 However 3 things happened that I didn't expect:
 1) The context expression oneEnum always evaluated to the last value of
 the loop (e3) and only my ha ndleEnum method was called.   When I converted
 the LinkSubmit to a EventLink, this worked fine.

defer = false

 2) my onSuccess method was never called. When I moved the onSuccess method
 form the component to the page where the form was defined, it was called.

onSuccess method is part of the form-event-handling phase and are
triggered by the form. As the events in tapestry bubble out to the
outer components so inner components cannot handle them

If you want to you can inject formsupport and then use
storeAndExecute/execute methods to execution an action

 3) I noticed that in my onSuccess method, the parameter handler was null.

The code in template does not show handler bound to any form field. Is
it a service ? in that case, you have to @Inject it

 On a submit, when are parameters re-bound? In Tapestry4, after a form
 submission, the rewind was rebuilt from the encoded form state and all
 components had their params rebound with the correct values and I was able
 to access my parameters in my form submit listener methods.

 I am still learning tapestry 5 but can anyone explain these behaviors and
 perhaps suggest a better method of getting what I want accomplished? I
 pasted the relevant code below.


This might help http://tapestry.apache.org/component-events.html

 The code is based on:
 http://tapestry.apache.org/current/tapestry-core/ref/org/apache/tapestry5/corelib/components/Submit.html
 inside a component I have:
          ul
            t:loop source=someEnums value=oneEnum
               li


                        name of oneEnum


               /li
            /t:loop
          /ul

 and:

   public enum MyEnum {e1, e2, e3}

   @Parameter
   private Handler handler;

   @Property
   private MyEnum oneEnum;

   @Property
   private MyEnum selectedEnum;

   public  MyEnum[] getSomeEnums()
  {return MyEnum.values();}

   @SuppressWarnings(unused)
   @Component(parameters = {event=enumHandle, context=oneEnum})
   private LinkSubmit linkEnum;

   @OnEvent(value = enumHandle)
   void handleEnumClick(String oneEnum) //oneEnum is always e3
   {
      selectedEnum = MyEnum.valueof(oneEnum);
   }

   Object onSuccess() //is not called unless I move to page class
   {
      handler.handle(selectedEnum); //the handler parameter is null
      return null;
   }

 --
 View this message in context: 
 http://tapestry.1045711.n5.nabble.com/LinkSubmit-in-a-loop-tp4742981p4742981.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





-- 
Regards

Taha Hafeez Siddiqi (tawus)
http://tawus.wordpress.com

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



How to control file types/extensions in t:upload

2011-08-29 Thread hese

Hi,

I am using t:upload control in my form.  I want the user to be able to
upload only .txt or .csv files.  How to I control this?  Right now I can see
all files enabled when the file dialog opens.  

Thanks!


--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/How-to-control-file-types-extensions-in-t-upload-tp4746468p4746468.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



generating secure files

2011-08-29 Thread daoudja
i want to let users of my website preview pdf's using flex paper
as this one requires swf files i convert pdf to swf then i display them
i place those files in the class path and then i reuse them using an asset 

the problem is that those files are generated but are not visible under
eclipse so i have to refresh the folder containing the file in order to get
the reseource and in that case it is working

the second problem is that in case i succeed using assets i want to make
those assets secure so i want to know where exactly i have to put this code 

public static void contributeResourceDigestGenerator(ConfigurationString
configuration)
  {
configuration.add(swf);
System.out.println(swf added to resource Digest Generator);
  }

please help me i have search all over the internet and i didn't find
anything.
thank you for your comprehension.

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/generating-secure-files-tp4746478p4746478.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: How to control file types/extensions in t:upload

2011-08-29 Thread Taha Hafeez
Hi

There is no way to do this using html. You can use javascript to do it
but then you should double-check it at the server end.

HTML5 does have an accept attribute for that.


On Mon, Aug 29, 2011 at 8:39 PM, hese 1024h...@gmail.com wrote:

 Hi,

 I am using t:upload control in my form.  I want the user to be able to
 upload only .txt or .csv files.  How to I control this?  Right now I can see
 all files enabled when the file dialog opens.

 Thanks!


 --
 View this message in context: 
 http://tapestry.1045711.n5.nabble.com/How-to-control-file-types-extensions-in-t-upload-tp4746468p4746468.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





-- 
Regards

Taha Hafeez Siddiqi (tawus)
http://tawus.wordpress.com

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



Re: generating secure files

2011-08-29 Thread Lenny Primak
The static contribute() method goes into your AppModule.java,
Not sure how to solve your eclipse problem.

On Aug 29, 2011, at 11:13 AM, daoudja wrote:

 i want to let users of my website preview pdf's using flex paper
 as this one requires swf files i convert pdf to swf then i display them
 i place those files in the class path and then i reuse them using an asset 
 
 the problem is that those files are generated but are not visible under
 eclipse so i have to refresh the folder containing the file in order to get
 the reseource and in that case it is working
 
 the second problem is that in case i succeed using assets i want to make
 those assets secure so i want to know where exactly i have to put this code 
 
 public static void contributeResourceDigestGenerator(ConfigurationString
 configuration)
 {
   configuration.add(swf);
   System.out.println(swf added to resource Digest Generator);
 }
 
 please help me i have search all over the internet and i didn't find
 anything.
 thank you for your comprehension.
 
 --
 View this message in context: 
 http://tapestry.1045711.n5.nabble.com/generating-secure-files-tp4746478p4746478.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



Re: How to control file types/extensions in t:upload

2011-08-29 Thread hese

oh ok.  Thanks for the reply!

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/How-to-control-file-types-extensions-in-t-upload-tp4746468p4746546.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: generating secure files

2011-08-29 Thread daoudja
thank you so much but does anyone have an idea about the eclipse problem?

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/generating-secure-files-tp4746478p4746553.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



tapestry-security securing EJB container objects

2011-08-29 Thread Lenny Primak
Hi guys,
perhaps this is the wrong list to post this to, but
tynamo list still doesn't work for me, and I may post this on the Shiro list as 
well.

I just started using tapestry-security, and it works great!
My application is a Tapestry front-end to a bunch of EJBs, Web services, and 
Rest objects.
It runs in Glassfish 3.1, and J2EE 6 compliant.

This application is on an intranet, and we need to secure it and put it out on 
the internet.

I was wondering if/how we can use the same T-Security/Shiro 
configuration/annotation/etc.
on the Jax-WS Web Services, and Jax-RS REST Web Services, it at all possible,
with a minimum of fuss.

Thanks a lot.


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



Re: tapestry-security securing EJB container objects

2011-08-29 Thread Kalle Korhonen
Thanks Lenny. Yes, it's the wrong list but the discussion's likely
relevant to a number of other people as well. The most appropriate
list is Shiro users and incidentally, there was a discussion on the
same topic some time ago
(http://shiro-user.582556.n2.nabble.com/Using-Shiro-in-a-Web-EJB-environment-td3773528.html).
Your title says EJB container objects but mostly you seem to be
looking at securing the front-end servers. I've done stateful
(session-based) web services before and that'll work just fine using
exactly the same configuration and annotations. Stateless security
support was added/enhanced in shiro 1.2 trunk (with the release in
sight in the near future) - basically making it easier to configure
the framework (or some paths) so that each request is authenticated
and authorized separately. If you have a multi-tiered architecture
where your EJB container is running in a separate JVM, you'll have do
more integration work yourself, to maintain keys or some access tokens
to secure user requests / executions between multiple JVMs. There's no
standard way worked for it as one size rarely fits all. It's an
interesting topic nevertheless, and you should join the discussion on
Shiro users list (see http://shiro.apache.org/mailing-lists.html) to
keep up-to-date and make your opinions heard.

Kalle


On Mon, Aug 29, 2011 at 8:51 AM, Lenny Primak lpri...@hope.nyc.ny.us wrote:
 Hi guys,
 perhaps this is the wrong list to post this to, but
 tynamo list still doesn't work for me, and I may post this on the Shiro list 
 as well.

 I just started using tapestry-security, and it works great!
 My application is a Tapestry front-end to a bunch of EJBs, Web services, and 
 Rest objects.
 It runs in Glassfish 3.1, and J2EE 6 compliant.

 This application is on an intranet, and we need to secure it and put it out 
 on the internet.

 I was wondering if/how we can use the same T-Security/Shiro 
 configuration/annotation/etc.
 on the Jax-WS Web Services, and Jax-RS REST Web Services, it at all possible,
 with a minimum of fuss.

 Thanks a lot.


 -
 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: ParallelExecutor priority

2011-08-29 Thread Kalle Korhonen
Please open an issue, it makes a lot of sense that it'd be easily
configurable per job. Massimo, he states the use case below.

Kalle


On Mon, Aug 29, 2011 at 3:25 AM, jeczmien jeczm...@podgorska.ddns.info wrote:
 Hi.
 I'm wonder there is any way to set priority for task running by
 ParallelExecutor.invoke.
 I need lower priority thread for generating pdf - its time and proc
 consuming. Now I'm using JVM's java.util.concurrent.ThreadPoolExecutor

 Best regards

 --
 View this message in context: 
 http://tapestry.1045711.n5.nabble.com/ParallelExecutor-priority-tp4745722p4745722.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



Re: generating secure files

2011-08-29 Thread Andreas Fink
In eclipse i have to refresh very often. External git/subversion actions, 
generating eclipse stuff from maven... This is just how it works.
If this really annoys you, netbeans might be a better choice. It refreshes 
automatically but in return artifacs are not indexed so well.

Cheers,
Andi.

On Aug 29, 2011, at 5:36 PM, daoudja wrote:

 thank you so much but does anyone have an idea about the eclipse problem?
 
 --
 View this message in context: 
 http://tapestry.1045711.n5.nabble.com/generating-secure-files-tp4746478p4746553.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



Re: tapestry-security securing EJB container objects

2011-08-29 Thread Lenny Primak
Great!  I'll try 1.2 and will do the shiro mailing list as well.
I tried the @RequiresRole on a stateless Rest service,
and it didn't work, I guess now I know why now :)


On Aug 29, 2011, at 12:28 PM, Kalle Korhonen wrote:

 Thanks Lenny. Yes, it's the wrong list but the discussion's likely
 relevant to a number of other people as well. The most appropriate
 list is Shiro users and incidentally, there was a discussion on the
 same topic some time ago
 (http://shiro-user.582556.n2.nabble.com/Using-Shiro-in-a-Web-EJB-environment-td3773528.html).
 Your title says EJB container objects but mostly you seem to be
 looking at securing the front-end servers. I've done stateful
 (session-based) web services before and that'll work just fine using
 exactly the same configuration and annotations. Stateless security
 support was added/enhanced in shiro 1.2 trunk (with the release in
 sight in the near future) - basically making it easier to configure
 the framework (or some paths) so that each request is authenticated
 and authorized separately. If you have a multi-tiered architecture
 where your EJB container is running in a separate JVM, you'll have do
 more integration work yourself, to maintain keys or some access tokens
 to secure user requests / executions between multiple JVMs. There's no
 standard way worked for it as one size rarely fits all. It's an
 interesting topic nevertheless, and you should join the discussion on
 Shiro users list (see http://shiro.apache.org/mailing-lists.html) to
 keep up-to-date and make your opinions heard.
 
 Kalle
 
 
 On Mon, Aug 29, 2011 at 8:51 AM, Lenny Primak lpri...@hope.nyc.ny.us wrote:
 Hi guys,
 perhaps this is the wrong list to post this to, but
 tynamo list still doesn't work for me, and I may post this on the Shiro list 
 as well.
 
 I just started using tapestry-security, and it works great!
 My application is a Tapestry front-end to a bunch of EJBs, Web services, and 
 Rest objects.
 It runs in Glassfish 3.1, and J2EE 6 compliant.
 
 This application is on an intranet, and we need to secure it and put it out 
 on the internet.
 
 I was wondering if/how we can use the same T-Security/Shiro 
 configuration/annotation/etc.
 on the Jax-WS Web Services, and Jax-RS REST Web Services, it at all possible,
 with a minimum of fuss.
 
 Thanks a lot.
 
 
 -
 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
 


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



Tynamo tapestry-security: how to override Login Page?

2011-08-29 Thread Lenny Primak
Quick question that I don't see an obvious solution to...

How do I get my own page instead of the generic tapestry-security login page?

Thanks!


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



Re: Tynamo tapestry-security: how to override Login Page?

2011-08-29 Thread Kalle Korhonen
Contribute SecuritySymbols.LOGIN_URL, the following are the defaults:

public static void
contributeFactoryDefaults(MappedConfigurationString, String
configuration)
{
configuration.add(SecuritySymbols.LOGIN_URL, / + PATH_PREFIX 
+ /login);
configuration.add(SecuritySymbols.SUCCESS_URL, /index);
configuration.add(SecuritySymbols.UNAUTHORIZED_URL, / +
PATH_PREFIX + /unauthorized);
}

(Is that not documented - whoops, seems not, will fix)

Kalle


On Mon, Aug 29, 2011 at 9:43 AM, Lenny Primak lpri...@hope.nyc.ny.us wrote:
 Quick question that I don't see an obvious solution to...

 How do I get my own page instead of the generic tapestry-security login page?

 Thanks!


 -
 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: Possible bug in if evaluation (T5.2)

2011-08-29 Thread Christian Köberl

2011/08/24 19:18, Wechsung, Wulf:

ð  Result is that theif  will apparently not reevaluate the nullness of the reference after clicking the action 
link. Zone update will happen but it will still show the action link. If I test on a method isShowEditor that 
does a simply return object != null it works and the editor is shown after clicking the action link. The 
weirdest part is that with method getObject a log statements will prove that the method is called and returns 
a non-null value after the action has completed (ie on zone re-render) and still theif  does not display the 
appropriate block.


I guess your if component is outside of the zone and therefore isn't 
updated.


Also some code would help to find your problem.

--
Chris

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



Re: Form components may not be placed inside other Form components.

2011-08-29 Thread Christian Köberl

2011/08/29 08:00, Gunnar Eketrapp:

I have a layout component and a quite simple page. (recently created it ...)

There are no zones involved ...

When displaying this new page I get the error message ...

*Form components may not be placed inside other Form components.*


There has to be a form in any of your components and a component in the 
tree below (maybe in your layout component). Nested forms are not 
allowed by Tapestry since this won't work in browsers.


--
Chris


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



Re: Tynamo tapestry-security: how to override Login Page?

2011-08-29 Thread Lenny Primak
Thank you!  I like the way the login component looks. Perhaps if there a way to 
extend it...



On Aug 29, 2011, at 12:57 PM, Kalle Korhonen kalle.o.korho...@gmail.com wrote:

 Contribute SecuritySymbols.LOGIN_URL, the following are the defaults:
 
public static void
 contributeFactoryDefaults(MappedConfigurationString, String
 configuration)
{
configuration.add(SecuritySymbols.LOGIN_URL, / + PATH_PREFIX + 
 /login);
configuration.add(SecuritySymbols.SUCCESS_URL, /index);
configuration.add(SecuritySymbols.UNAUTHORIZED_URL, / +
 PATH_PREFIX + /unauthorized);
}
 
 (Is that not documented - whoops, seems not, will fix)
 
 Kalle
 
 
 On Mon, Aug 29, 2011 at 9:43 AM, Lenny Primak lpri...@hope.nyc.ny.us wrote:
 Quick question that I don't see an obvious solution to...
 
 How do I get my own page instead of the generic tapestry-security login page?
 
 Thanks!
 
 
 -
 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
 

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



Re: custom head component

2011-08-29 Thread Christian Köberl

2011/08/22 06:21, Ken in Nashua:

Hi All,

Hi Ken


Can anyone point me to some semantics where by and how I could instrument this 
area with the new portfolio of tap5 components?

Does a custom head component exist anywhere ?


Just look at the layout component pattern 
(http://tapestry.apache.org/layout-component.html). In Tapestry 5 you 
define your head section there (or create a separate head component and 
use it there).


If you want to add JavaScript or CSS you can use the @Import on your 
layout component.


--
Chris

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



Re: ParallelExecutor priority

2011-08-29 Thread Massimo Lusetti
On Mon, Aug 29, 2011 at 6:32 PM, Kalle Korhonen
kalle.o.korho...@gmail.com wrote:

 Please open an issue, it makes a lot of sense that it'd be easily
 configurable per job. Massimo, he states the use case below.

Maybe a job is not made up by only one thread... I mean there could be
different cases and generalize is not easy.

Cheers
-- 
Massimo
http://meridio.blogspot.com

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



Re: Tynamo tapestry-security: how to override Login Page?

2011-08-29 Thread Kalle Korhonen
On Mon, Aug 29, 2011 at 10:07 AM, Lenny Primak lpri...@hope.nyc.ny.us wrote:
 Thank you!  I like the way the login component looks. Perhaps if there a way 
 to extend it...

I wouldn't go there, you gain nothing by trying to extend the existing
one. The component's very simple - I'd encourage rewriting the
component and reusing/copying the style resources if you like the way
it looks.

Kalle


 On Aug 29, 2011, at 12:57 PM, Kalle Korhonen kalle.o.korho...@gmail.com 
 wrote:

 Contribute SecuritySymbols.LOGIN_URL, the following are the defaults:

    public static void
 contributeFactoryDefaults(MappedConfigurationString, String
 configuration)
    {
        configuration.add(SecuritySymbols.LOGIN_URL, / + PATH_PREFIX + 
 /login);
        configuration.add(SecuritySymbols.SUCCESS_URL, /index);
        configuration.add(SecuritySymbols.UNAUTHORIZED_URL, / +
 PATH_PREFIX + /unauthorized);
    }

 (Is that not documented - whoops, seems not, will fix)

 Kalle


 On Mon, Aug 29, 2011 at 9:43 AM, Lenny Primak lpri...@hope.nyc.ny.us wrote:
 Quick question that I don't see an obvious solution to...

 How do I get my own page instead of the generic tapestry-security login 
 page?

 Thanks!


 -
 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


 -
 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: Tapestry 5.2.1 upgrade woes

2011-08-29 Thread ppetroup
Hi the spring version I am using is 3.0.3.RELEASE

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Tapestry-5-2-1-upgrade-woes-tp2849844p4747055.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: Tynamo tapestry-security: how to override Login Page?

2011-08-29 Thread Lenny Primak
Yes. I do like the style. I guess I'll copy it from the source code. Thanks a 
lot for your help Kalle!



On Aug 29, 2011, at 1:29 PM, Kalle Korhonen kalle.o.korho...@gmail.com wrote:

 On Mon, Aug 29, 2011 at 10:07 AM, Lenny Primak lpri...@hope.nyc.ny.us wrote:
 Thank you!  I like the way the login component looks. Perhaps if there a way 
 to extend it...
 
 I wouldn't go there, you gain nothing by trying to extend the existing
 one. The component's very simple - I'd encourage rewriting the
 component and reusing/copying the style resources if you like the way
 it looks.
 
 Kalle
 
 
 On Aug 29, 2011, at 12:57 PM, Kalle Korhonen kalle.o.korho...@gmail.com 
 wrote:
 
 Contribute SecuritySymbols.LOGIN_URL, the following are the defaults:
 
public static void
 contributeFactoryDefaults(MappedConfigurationString, String
 configuration)
{
configuration.add(SecuritySymbols.LOGIN_URL, / + PATH_PREFIX + 
 /login);
configuration.add(SecuritySymbols.SUCCESS_URL, /index);
configuration.add(SecuritySymbols.UNAUTHORIZED_URL, / +
 PATH_PREFIX + /unauthorized);
}
 
 (Is that not documented - whoops, seems not, will fix)
 
 Kalle
 
 
 On Mon, Aug 29, 2011 at 9:43 AM, Lenny Primak lpri...@hope.nyc.ny.us 
 wrote:
 Quick question that I don't see an obvious solution to...
 
 How do I get my own page instead of the generic tapestry-security login 
 page?
 
 Thanks!
 
 
 -
 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
 
 
 -
 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
 

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



Re: Form components may not be placed inside other Form components.

2011-08-29 Thread Gunnar Eketrapp
Hum .. there where no forms in form but my new page had some errors in it's
form (i.e. pointed to variables that did not exist)

This lead to this strange behaviour.

I don't have time to dig into it now but it could be related to this plus
the ExceptionReport page that I recently added.

Now I am back on track anyway .. but I was really fooled by the error
message.

Anyway the error reports in T5 are usually so god that you get forget how
hard it can be to find bugs once you get normal error messages.

2011/8/29 Christian Köberl tapestry.christian.koeb...@gmail.com

 2011/08/29 08:00, Gunnar Eketrapp:

 I have a layout component and a quite simple page. (recently created it
 ...)

 There are no zones involved ...

 When displaying this new page I get the error message ...

 *Form components may not be placed inside other Form components.*


 There has to be a form in any of your components and a component in the
 tree below (maybe in your layout component). Nested forms are not allowed by
 Tapestry since this won't work in browsers.

 --
 Chris


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




-- 
[Hem: 08-715 59 57, Mobil: 070-991 86 42]
Allévägen 2A, 132 42 Saltsjö-Boo


Formsupport store

2011-08-29 Thread Wechsung, Wulf
Hello Guys,

having a small problem with custom components with forms in zones and while 
looking at the build-in components it occurs to me that quite a few of them use 
the Formsupport.store to restore some state to the component, presumably when 
the form submits. Unfortunately, I haven't quite figured out what it does 
exactly because the Javadoc is a little scarce.

However, it occurred to me that this pattern is quite wordy and that maybe it 
would be possible to replace it with a persistence strategy (FORM).

I'd appreciate it if anyone could provide input on whether I'm on the right 
track with this.

Kind Regards, Wulf


Re: Formsupport store

2011-08-29 Thread Lenny Primak
What's the intent of what you are trying to do?

On Aug 29, 2011, at 5:05 PM, Wechsung, Wulf wrote:

 Hello Guys,
 
 having a small problem with custom components with forms in zones and while 
 looking at the build-in components it occurs to me that quite a few of them 
 use the Formsupport.store to restore some state to the component, presumably 
 when the form submits. Unfortunately, I haven't quite figured out what it 
 does exactly because the Javadoc is a little scarce.
 
 However, it occurred to me that this pattern is quite wordy and that maybe 
 it would be possible to replace it with a persistence strategy (FORM).
 
 I'd appreciate it if anyone could provide input on whether I'm on the right 
 track with this.
 
 Kind Regards, Wulf


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



Re: component scope service with injected messages

2011-08-29 Thread Paul Stanton

just injecting messages didn't work when i tried it.

Caused by: java.lang.RuntimeException: No service implements the 
interface org.apache.tapestry5.ioc.Messages.
at 
org.apache.tapestry5.ioc.internal.RegistryImpl.getService(RegistryImpl.java:560)
at 
org.apache.tapestry5.ioc.internal.ObjectLocatorImpl.getService(ObjectLocatorImpl.java:44)
at 
org.apache.tapestry5.ioc.internal.services.MasterObjectProviderImpl$1.invoke(MasterObjectProviderImpl.java:56)
at 
org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:68)


FYI i'm using 5.1.0.5

Maybe a 'service' isn't what I'm after, but there MUST be a way to do 
this. Similar to how ComponentResources is configured.


Regards, Paul.

On 24/08/2011 11:31 PM, Steve Eynon wrote:

Hi,

If you just want messages for your service (as in messages defined in
MyService.properties) then, as nillihammer suggests, simply inject a
Messages object.

This is because Messages is actually an
org.apache.tapestry5.ioc.Messages and is defined and utilised by the
IOC layer. I believe Tapestry-Core extends the principle and provides
a chain of message objects beginning with the one defined for the
current Component / Page.

For which object do you need messages for?

Steve.
--
Steve Eynon
mobie: 0750 424 5743



On 24 August 2011 19:53, nillehammertapestry.nilleham...@winfonet.eu  wrote:

The easiest way is to define your service methods with an additional Messages
parameter. This way you can use the Messages within the service methods.

-
http://www.winfonet.eu
--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/component-scope-service-with-injected-messages-tp4724993p4730146.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




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



Re: component scope service with injected messages

2011-08-29 Thread nillehammer
Don't inject it in the constructor. That isn't possible. Define the Messages
as an (additional) parameter to your service method. (This is sometimes
referred to as method-Injection, a misleading term in my humble opinion).

-
http://www.winfonet.eu
--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/component-scope-service-with-injected-messages-tp4724993p4748239.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: component scope service with injected messages

2011-08-29 Thread Paul Stanton

Do you mean I should do the following:

public Object doSomethingUseful(Object someParameter, Messages messages)
{...}

and thereby call:

t:output value=myService.doSomethingUseful(something,message) ... /

for example?

On 30/08/2011 10:14 AM, nillehammer wrote:

Don't inject it in the constructor. That isn't possible. Define the Messages
as an (additional) parameter to your service method. (This is sometimes
referred to as method-Injection, a misleading term in my humble opinion).

-
http://www.winfonet.eu
--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/component-scope-service-with-injected-messages-tp4724993p4748239.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



Re: component scope service with injected messages

2011-08-29 Thread Thiago H. de Paula Figueiredo
On Mon, 29 Aug 2011 20:53:00 -0300, Paul Stanton p...@mapshed.com.au  
wrote:



just injecting messages didn't work when i tried it.

Caused by: java.lang.RuntimeException: No service implements the  
interface org.apache.tapestry5.ioc.Messages.

Maybe a 'service' isn't what I'm after,


Messages isn't a service. It's injection is specially handled for  
components, pages and mixins only. This is implemented in  
CommonResourcesInjectionProvider, if you want to check the source. :) It  
just delegates to the getMessages() method of ComponentResources.


but there MUST be a way to do this. Similar to how ComponentResources is  
configured.


Just like ComponentResources: only injectable in the object (component,  
page or mixin) itself. In your component (or page or mixin class)


@Inject
private Messages messages;

--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor

Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br

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



Re: Validate without a form field

2011-08-29 Thread David Rees
On Sat, Aug 27, 2011 at 9:14 AM, Robert Zeigler
robert.zeig...@roxanemy.com wrote:
 FieldValidatorSource is heavily geared for form fields; form field validation 
 involves potentially hooking up client-side js to the form field, displaying 
 error messages to the user, tracking the field that generated the error, etc. 
  If you don't have a form field, where does the request parameter come from?

It's a REST style API use for data services.

 If you're using tapestry 5.3, you could try using the alerts service + 
 components.  Check the request parameter in onActivate with whatever logic 
 you need, then if there's an issue, you can display an alert to the user.

Unfortunately, I'm not using T5.3 yet.

What I've done in the mean time is embed a form into a block which is
never rendered.  A bit of a hack but works well for now. :-)

-Dave

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



Re: @Property and @Parameter

2011-08-29 Thread robert baker
Maybe I'm confused here, but @Parameter and @Property seem to be
orthogonal and not mutually exclusive.

(from the point-of-view of the component)
@Parameter : data flows from container to this field (and vice versa)
@Property : data flows from contained components to this field (and vice versa)

I've had components where both @Parameter and @Property were placed on
the same field, like when I wrapped a Checkbox.  (Though, most use
cases where you would put both annotations (like wrappers) seem to be
covered by publishing the necessary parameters.)

I think, though, the original problem that was put forth of having a
parameter constructor called at component instantiation time sounds
interesting.  I know that you can have a parameter programmatically
default if unbound, but I don't think there is a shadow setter that
you can wire to get called all the time for property-bound parameters.

Just my $.02

Thanks,
Les Baker

On Mon, Aug 29, 2011 at 10:52 AM, Taha Hafeez tawus.tapes...@gmail.com wrote:
 Yes, please

 On Mon, Aug 29, 2011 at 8:20 PM, Jens Breitenstein mailingl...@j-b-s.de 
 wrote:
 Hi Taha, hi Josh!

 well, that's what my gut feeling told me too. Should I raise a jira issue?



 Am 29.08.11 16:36, schrieb Taha Hafeez:

 I agree.

 On Mon, Aug 29, 2011 at 7:41 PM, Josh Canfieldjoshcanfi...@gmail.com
  wrote:

 Sounds like a defect. If there is setter I can't think of a reason that
 @Parameter shouldn't use it.
 On Aug 29, 2011 6:15 AM, Taha Hafeeztawus.tapes...@gmail.com  wrote:

 @Parameters do not use setters. They create a conduit to set/get the
 values directly , so setters are never used.

 You can look at the code of ParameterWorker for details

 you can always use setupRender to setup things

 On Mon, Aug 29, 2011 at 6:16 PM, Jens Breitensteinmailingl...@j-b-s.de

 wrote:

 Hi All!

 I tried to use a combination of @Property and @Parameter.


 @Property(read = true, write = false)
 @Parameter(required = true)
 private String _myParam;


 unfortunately it seems to be impossible to intercept a set in such a

 case

 //   NEVER CALLED
 public void String setMyParam(final String param)
 {
    _myParam = param;
    // do more...
 }


 Is there any reason this is not allowed?


 Jens


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




 --
 Regards

 Taha Hafeez Siddiqi (tawus)
 http://tawus.wordpress.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





 --
 Regards

 Taha Hafeez Siddiqi (tawus)
 http://tawus.wordpress.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



Re: @Property and @Parameter

2011-08-29 Thread Geoff Callender
Maybe I'm confused too. 
It's OK to use @Property together with @Parameter. eg. 


http://jumpstart.doublenegative.com.au/jumpstart/examples/component/creatingcomponents

It's not OK to use @Property AND a getter or setter. It SHOULD HAVE thrown a 
runtime exception. if it didn't, then I'd say please file in JIRA.

From 
http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/annotations/Property.html
 : 
The annotation will not overwrite an existing getter or setter method; 
if you put a Property annotation on a field that already has a getter or a 
setter you will see a runtime exception.

As for having Tapestry call the setter during component activation, I'm not 
keen. The setter is for use by component event requests. To me, sharing it with 
component activation sounds like a recipe for trouble. Better to stick to 
setupRender.

BTW, I wonder whether the need for, and intention of, getters/setters/@Property 
should be spelled out more clearly early in the Users Guide?

Cheers,

Geoff

On 30/08/2011, at 12:58 PM, robert baker wrote:

 Maybe I'm confused here, but @Parameter and @Property seem to be
 orthogonal and not mutually exclusive.
 
 (from the point-of-view of the component)
 @Parameter : data flows from container to this field (and vice versa)
 @Property : data flows from contained components to this field (and vice 
 versa)
 
 I've had components where both @Parameter and @Property were placed on
 the same field, like when I wrapped a Checkbox.  (Though, most use
 cases where you would put both annotations (like wrappers) seem to be
 covered by publishing the necessary parameters.)
 
 I think, though, the original problem that was put forth of having a
 parameter constructor called at component instantiation time sounds
 interesting.  I know that you can have a parameter programmatically
 default if unbound, but I don't think there is a shadow setter that
 you can wire to get called all the time for property-bound parameters.
 
 Just my $.02
 
 Thanks,
 Les Baker
 
 On Mon, Aug 29, 2011 at 10:52 AM, Taha Hafeez tawus.tapes...@gmail.com 
 wrote:
 Yes, please
 
 On Mon, Aug 29, 2011 at 8:20 PM, Jens Breitenstein mailingl...@j-b-s.de 
 wrote:
 Hi Taha, hi Josh!
 
 well, that's what my gut feeling told me too. Should I raise a jira issue?
 
 
 
 Am 29.08.11 16:36, schrieb Taha Hafeez:
 
 I agree.
 
 On Mon, Aug 29, 2011 at 7:41 PM, Josh Canfieldjoshcanfi...@gmail.com
  wrote:
 
 Sounds like a defect. If there is setter I can't think of a reason that
 @Parameter shouldn't use it.
 On Aug 29, 2011 6:15 AM, Taha Hafeeztawus.tapes...@gmail.com  wrote:
 
 @Parameters do not use setters. They create a conduit to set/get the
 values directly , so setters are never used.
 
 You can look at the code of ParameterWorker for details
 
 you can always use setupRender to setup things
 
 On Mon, Aug 29, 2011 at 6:16 PM, Jens Breitensteinmailingl...@j-b-s.de
 
 wrote:
 
 Hi All!
 
 I tried to use a combination of @Property and @Parameter.
 
 
 @Property(read = true, write = false)
 @Parameter(required = true)
 private String _myParam;
 
 
 unfortunately it seems to be impossible to intercept a set in such a
 
 case
 
 //   NEVER CALLED
 public void String setMyParam(final String param)
 {
_myParam = param;
// do more...
 }
 
 
 Is there any reason this is not allowed?
 
 
 Jens
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
 For additional commands, e-mail: users-h...@tapestry.apache.org
 
 
 
 
 --
 Regards
 
 Taha Hafeez Siddiqi (tawus)
 http://tawus.wordpress.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
 
 
 
 
 
 --
 Regards
 
 Taha Hafeez Siddiqi (tawus)
 http://tawus.wordpress.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
 



Re: @Property and @Parameter

2011-08-29 Thread Robert Zeigler
Tapestry will only throw an exception if there's a getter and read (from 
@Property) is true, or there's a setter and write is true.  If write is 
false, then tapestry doesn't attempt to generate a setter, and you're fine.  In 
the case of the original post, write=false, so no exception was thrown.

Robert

On Aug 30, 2011, at 8/3012:43 AM , Geoff Callender wrote:

 Maybe I'm confused too. 
 It's OK to use @Property together with @Parameter. eg. 
 
   
 http://jumpstart.doublenegative.com.au/jumpstart/examples/component/creatingcomponents
 
 It's not OK to use @Property AND a getter or setter. It SHOULD HAVE thrown a 
 runtime exception. if it didn't, then I'd say please file in JIRA.
 
   From 
 http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/annotations/Property.html
  : 
   The annotation will not overwrite an existing getter or setter method; 
 if you put a Property annotation on a field that already has a getter or a 
 setter you will see a runtime exception.
 
 As for having Tapestry call the setter during component activation, I'm not 
 keen. The setter is for use by component event requests. To me, sharing it 
 with component activation sounds like a recipe for trouble. Better to stick 
 to setupRender.
 
 BTW, I wonder whether the need for, and intention of, 
 getters/setters/@Property should be spelled out more clearly early in the 
 Users Guide?
 
 Cheers,
 
 Geoff
 
 On 30/08/2011, at 12:58 PM, robert baker wrote:
 
 Maybe I'm confused here, but @Parameter and @Property seem to be
 orthogonal and not mutually exclusive.
 
 (from the point-of-view of the component)
 @Parameter : data flows from container to this field (and vice versa)
 @Property : data flows from contained components to this field (and vice 
 versa)
 
 I've had components where both @Parameter and @Property were placed on
 the same field, like when I wrapped a Checkbox.  (Though, most use
 cases where you would put both annotations (like wrappers) seem to be
 covered by publishing the necessary parameters.)
 
 I think, though, the original problem that was put forth of having a
 parameter constructor called at component instantiation time sounds
 interesting.  I know that you can have a parameter programmatically
 default if unbound, but I don't think there is a shadow setter that
 you can wire to get called all the time for property-bound parameters.
 
 Just my $.02
 
 Thanks,
 Les Baker
 
 On Mon, Aug 29, 2011 at 10:52 AM, Taha Hafeez tawus.tapes...@gmail.com 
 wrote:
 Yes, please
 
 On Mon, Aug 29, 2011 at 8:20 PM, Jens Breitenstein mailingl...@j-b-s.de 
 wrote:
 Hi Taha, hi Josh!
 
 well, that's what my gut feeling told me too. Should I raise a jira issue?
 
 
 
 Am 29.08.11 16:36, schrieb Taha Hafeez:
 
 I agree.
 
 On Mon, Aug 29, 2011 at 7:41 PM, Josh Canfieldjoshcanfi...@gmail.com
 wrote:
 
 Sounds like a defect. If there is setter I can't think of a reason that
 @Parameter shouldn't use it.
 On Aug 29, 2011 6:15 AM, Taha Hafeeztawus.tapes...@gmail.com  wrote:
 
 @Parameters do not use setters. They create a conduit to set/get the
 values directly , so setters are never used.
 
 You can look at the code of ParameterWorker for details
 
 you can always use setupRender to setup things
 
 On Mon, Aug 29, 2011 at 6:16 PM, Jens Breitensteinmailingl...@j-b-s.de
 
 wrote:
 
 Hi All!
 
 I tried to use a combination of @Property and @Parameter.
 
 
 @Property(read = true, write = false)
 @Parameter(required = true)
 private String _myParam;
 
 
 unfortunately it seems to be impossible to intercept a set in such a
 
 case
 
 //   NEVER CALLED
 public void String setMyParam(final String param)
 {
   _myParam = param;
   // do more...
 }
 
 
 Is there any reason this is not allowed?
 
 
 Jens
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
 For additional commands, e-mail: users-h...@tapestry.apache.org
 
 
 
 
 --
 Regards
 
 Taha Hafeez Siddiqi (tawus)
 http://tawus.wordpress.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
 
 
 
 
 
 --
 Regards
 
 Taha Hafeez Siddiqi (tawus)
 http://tawus.wordpress.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