Re: Authorization Filter in Tapestry ?

2007-01-19 Thread andyhot

Check out the conf.points of tapestry.request
http://tapestry.apache.org/tapestry4.1/tapestry-framework/hivedoc/module/tapestry.request.html

Did you contribute your filter to the WebRequestServicer Pipeline ?

sunilmanu wrote:

Hello Everyone,

I want to implement an Authorization Filter in Tapestry that simply checks
for the Logged In USER in Session,.

public class AuthorizationFilter  implements WebRequestServicerFilter{
	 
public void service(WebRequest request, WebResponse response,	
			 WebRequestServicer servicer) throws IOException {	  
 if (user exists)

 {
  //then process
 }
  else
  {
  //redirect to Loginpage.
 }


---hivemodule.xml---
service-point id=AuthorizationFilter
interface=org.apache.tapestry.services.WebRequestServicerFilter 		   
invoke-factory
	construct class=com.ui.web.filter.AuthorizationFilter /	   
/invoke-factory	   
/service-point 


Above is my code but somehow filter is not intercepting the request.What
wrong am i doing ? Can someone point to a working example ?

We are short on time for implementing the AcegiSecurity, so we decided to go
with the Filter initially and later add Acegi.


Thanks,
Sunil
  



--
Andreas Andreou - [EMAIL PROTECTED] - http://andyhot.di.uoa.gr
Tapestry / Tacos developer
Open Source / J2EE Consulting 



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



Re: Tapestry 4.1 and Ajax enabled Contrib TablePages component

2007-01-19 Thread jiju

you can try tacos:Table it implements ajax features in contrib table


karthik G wrote:
 
 Hi All,
 
 I tried using the TablePages component in my tapestry component that in
 turn
 is being refreshed through Ajax. TablePages doesnt seem to be working in
 Ajax mode.
 
 How are you guys handling this requirement now?
 
 I need a Ajax enabled custom Contrib Table component (and hence am using
 TableView)
 
 thanks
 Karthik
 
 

-- 
View this message in context: 
http://www.nabble.com/Tapestry-4.1-and-Ajax-enabled-Contrib-TablePages-component-tf3039629.html#a8448483
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



Re: Acegi and Visit object

2007-01-19 Thread James Carman

This is the main reason that I wrote Tapestry-Acegi, so that you get
the best of both worlds.  You can get at all the good Tapestry
framework stuff and have the Acegi stuff too.


On 1/19/07, andyhot [EMAIL PROTECTED] wrote:

Actually, I'm not sure that the UserDetailsService is the best option
for setting up visit,
(cause the user may not eventually have the correct password) but anyway,
here's how it can be done using hivemind and tapestry-acegi:

implementation service-id=hivemind.acegi.dao.UserDetailsService

invoke-factory service-id=hivemind.BuilderFactory
model=singleton
   construct class=my.custom.UserDetailsService
   set-service property=userDao service-id=.../
   set-service property=stateManager
service-id=tapestry.state.ApplicationStateManager/
   /construct
/invoke-factory
/implementation

and also take a look at
http://tapestry.apache.org/tapestry4.1/tapestry-framework/apidocs/org/apache/tapestry/engine/state/ApplicationStateManager.html



Srinivas Yermal wrote:
 Hi Andreas,

 Thanks for the response. Does tapestry-acegi automagically fill-in the
 user
 details into the visit object? Or should I do something?

 I use spring for my acegi declarations and specify my
 UserDetailsService in
 the DaoAuthenticationProvider.  You mention ASO. How would I go about
 doing
 it through state objects?

 Regards,
 Srini.

 On 1/19/07, andyhot [EMAIL PROTECTED] wrote:

 i've been using tapestry-acegi, so perhaps this might not be helpful in
 your case...

 so, how are you declaring the UserDetailsService implementation to be
 used by acegi ?

 If you could inject into hivemind's ApplicationStateManager you would be
 able to
 access any ASO you'd like.





--
Andreas Andreou - [EMAIL PROTECTED] - http://andyhot.di.uoa.gr
Tapestry / Tacos developer
Open Source / J2EE Consulting


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




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



Re: Acegi and Visit object

2007-01-19 Thread andyhot

James Carman wrote:

This is the main reason that I wrote Tapestry-Acegi, so that you get
the best of both worlds.  You can get at all the good Tapestry
framework stuff and have the Acegi stuff too.


James, it was useful for me to have the hivedocs for the tapestry.acegi and
the hivemind.acegi modules... I did got them generated using Marcus new
hivedoc-plugin and now have them all (manually) combined in one xdoc. 
D'you want them
emailed so you can include them at 
http://www.carmanconsulting.com/tapestry-acegi ?





On 1/19/07, andyhot [EMAIL PROTECTED] wrote:

Actually, I'm not sure that the UserDetailsService is the best option
for setting up visit,
(cause the user may not eventually have the correct password) but 
anyway,

here's how it can be done using hivemind and tapestry-acegi:

implementation service-id=hivemind.acegi.dao.UserDetailsService

invoke-factory service-id=hivemind.BuilderFactory
model=singleton
   construct class=my.custom.UserDetailsService
   set-service property=userDao service-id=.../
   set-service property=stateManager
service-id=tapestry.state.ApplicationStateManager/
   /construct
/invoke-factory
/implementation

and also take a look at
http://tapestry.apache.org/tapestry4.1/tapestry-framework/apidocs/org/apache/tapestry/engine/state/ApplicationStateManager.html 





Srinivas Yermal wrote:
 Hi Andreas,

 Thanks for the response. Does tapestry-acegi automagically fill-in the
 user
 details into the visit object? Or should I do something?

 I use spring for my acegi declarations and specify my
 UserDetailsService in
 the DaoAuthenticationProvider.  You mention ASO. How would I go about
 doing
 it through state objects?

 Regards,
 Srini.

 On 1/19/07, andyhot [EMAIL PROTECTED] wrote:

 i've been using tapestry-acegi, so perhaps this might not be 
helpful in

 your case...

 so, how are you declaring the UserDetailsService implementation to be
 used by acegi ?

 If you could inject into hivemind's ApplicationStateManager you 
would be

 able to
 access any ASO you'd like.





--
Andreas Andreou - [EMAIL PROTECTED] - http://andyhot.di.uoa.gr
Tapestry / Tacos developer
Open Source / J2EE Consulting


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




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





--
Andreas Andreou - [EMAIL PROTECTED] - http://andyhot.di.uoa.gr
Tapestry / Tacos developer
Open Source / J2EE Consulting 



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



Re: Acegi and Visit object

2007-01-19 Thread jake123



James Carman wrote:
 
 This is the main reason that I wrote Tapestry-Acegi, so that you get
 the best of both worlds.  You can get at all the good Tapestry
 framework stuff and have the Acegi stuff too.
 

Hi James,
We are about to implement Acegi to our application and we are using Spring
2.0.2, Hibernate 3, Tapestry 4.02.
Are tapestry-acegi.jar a replacement for doing the Acegi mappings in Spring?
What do we need to configure to make it work? If you could give some example
that would bee really nice

Thanks a lot

Jacob
-- 
View this message in context: 
http://www.nabble.com/Acegi-and-Visit-object-tf3025484.html#a8449953
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



Re: Difference between @InjectState @Persist

2007-01-19 Thread RonPiterman
while state objects are shared between all pages / components, 
persistant properties are only accessed by the page / component which 
declares them.

Cheers,
Ron



jiju wrote:

Hi All,
can you explain whats the difference if we are saving a page property as ASO
with scope=session
and 
if we are saving a page property using @Persist in our basepage and

extending this basepage where ever it is required.


secondly i have noticed that if am setting an @Persist property in
pageAttached(); event, then it is not saving in session scope. what could be
the reason ?





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



RE: OT: Better Java performance on Linux

2007-01-19 Thread Mark Stang
Inge,
The SE should be a client version and designed for quick GUI start-up.  Whereas 
the EE version is the server version and starts slower, but is designed for 
long-time running.  They have different garbage collection strategies.

HTH,

Mark

Mark J. Stang
Senior Engineer/Architect
office: +1 303.468.2900
mobile: +1 303.507.2833
Ping Identity



-Original Message-
From: Inge Solvoll [mailto:[EMAIL PROTECTED]
Sent: Fri 1/19/2007 1:37 AM
To: Tapestry users
Subject: Re: OT: Better Java performance on Linux
 
Thanks for great help to all of you!

When I said performance gap, I meant for example starting tomcat in 5 sec
instead of 20 sec, much faster eclipse, and so on.

I'm a little confused when downloading JDK from Sun's pages, does it matter
if I download SE or EE? Does it matter at all what JDK version I download,
or is this only a question of configuring it correctly when installed?

I already have tried setting a couple of VM parameters on both eclipse,
tomcat and jboss on startup, and gotten some minor improvements on
OutOfMemory crashes, but I would love to try to increase the actual speed
performance as well. I will try to read a bit and get smarter on this
subject :)

For reference, here's my Eclipse startup on my Windows XP machine:

C:\dev\eclipse\eclipse.exe  -data C:\dev\eclipse_workspace -vm
C:\dev\jdk1.6\bin\javaw.exe  -nosplash -vmargs -Xms128m -Xmx256m
-XX:MaxPermSize=128m

Thanks again!

Inge

On 1/16/07, Danny Angus [EMAIL PROTECTED] wrote:

 Inge Solvoll [EMAIL PROTECTED] wrote on 16/01/2007 09:53:50:


  A friend of mine (big linux fan) told me that tests at his workplace
  indicated a huge (up to 500%) java performance gap between linux and
  windows

 Of course you have to also ask what he calls performance, what did he
 measure, response time, throughput, resource consumption, transaction
 rates, concurrency, something else?

 d.


 ***
 The information in this e-mail is confidential and for use by the
 addressee(s) only. If you are not the intended recipient please delete the
 message from your computer. You may not copy or forward it or use or
 disclose its contents to any other person. As Internet communications are
 capable of data corruption Student Loans Company Limited does not accept any
 responsibility for changes made to this message after it was sent. For this
 reason it may be inappropriate to rely on advice or opinions contained in an
 e-mail without obtaining written confirmation of it. Neither Student Loans
 Company Limited or the sender accepts any liability or responsibility for
 viruses as it is your responsibility to scan attachments (if any). Opinions
 and views expressed in this e-mail are those of the sender and may not
 reflect the opinions and views of The Student Loans Company Limited.

 This footnote also confirms that this email message has been swept for the
 presence of computer viruses.


 

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





Re: Ajax Loading Indicator (google style)

2007-01-19 Thread Markus Joschko

Can't help with the previous issue but have someone tried this for a form?

This would mean to connect against the tapestry.form.submitAsync method
I can't get it to work because when addOnLoad fires the corresponding
tapestry js file is not yet fetched so the method does not exist.
I can't see another interception point but really want inform the user
that his form is currently submitted.

regards,
Markus

On 1/16/07, Daniel Anguita O. [EMAIL PROTECTED] wrote:

Thanks mkreis.

I was trying to work this out like you told me, but i can't get the
hide/show effect when is loading..
I've been many hours searching on the web for an explination but i still
can't get it. So i dicede to show you the html rendered, maybe you can
find easely what's my problem.
html rendered:

html
head
meta name=generator content=Tapestry Application Framework, version 4.1.1 
/
meta http-equiv=content content=no-cache /
meta http-equiv=Content-Type content=text/html;charset=UTF-8 /
titleRemote Control/title
script type=text/javascriptdjConfig = 
{isDebug:true,debugContainerId:debug,baseRelativePath:/RemoteControl/app?service=assetpath=%2Fdojo%2F,preventBackButtonFix:false,parseWidgets:false,locale:es-ar}
 /script

 script type=text/javascript 
src=/RemoteControl/app?service=assetpath=%2Fdojo%2Fdojo.js/script

script type=text/javascript
dojo.registerModulePath(tapestry, 
/RemoteControl/app?service=assetpath=%2Ftapestry%2F);
/script
script type=text/javascript 
src=/RemoteControl/app?service=assetpath=%2Ftapestry%2Fcore.js/script
script type=text/javascript
dojo.require(dojo.logging.Logger);
dojo.log.setLevel(dojo.log.getLevel(WARNING));
dojo.require(tapestry.namespace);
/script
link rel=stylesheet type=text/css media=all href=stylesheets/main.css 
/
/head
head
titleRemote Control/title

script type=javascript
dojo.require(dojo.lfx.html.*);
dojo.event.connect(around, tapestry, loadContent, this, 
postLoading);
dojo.event.connect(around, tapestry, linkOnClick, this, 
preLoading);
function preLoading(miObj){
//
// Get the id of updated component
var id = miObj.args[1];
//
// Here your code
dojo.lfx.html.fadeShow(dojo.byId('loader'), 500).play();

return miObj.proceed();
}

function postLoading(miObj){
//
// Get the id of updated component
var id = miObj.args[0];
//
// Here your code
dojo.lfx.html.fadeHide(dojo.byId('loader'), 500).play();

return miObj.proceed();
}
/script
/head


body onload=dojo.lfx.html.fadeHide(dojo.byId('loader'), 500).play(); 
id=Body

script type=text/javascript!--
dojo.require(tapestry.event);
// --/script
div id=loader class=loaderLoading.../div


...etc...

and when i make a componentUpdate with an EventListener nothing happens.. no 
loading indicator appears.. and the ldx fade effect works fine in onload...
i think the functions are'nt called... or maybe i'm just doing the hole thing 
wrong!?

please help!

Cheers



[EMAIL PROTECTED] escribió:
 I think I forgot to mention that fx.js was my inspiration ;)

 @ShowOnAjax should also have a parameter with a list of components. 
@ShowOnAjax then only reacts on Ajax-Events within those components. @ShowOnAjax 
could also have two subcomponents like a4j:status.

 ciao.michael.


 -Ursprüngliche Nachricht-
 Von: Tapestry users users@tapestry.apache.org
 Gesendet: 16.01.07 15:27:12
 An: Tapestry users users@tapestry.apache.org
 Betreff: Re: Ajax Loading Indicator (google style)




 Yep, that's a nice way of doing this...

 It's also how effects are currently implemented
 
http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/tapestry/fx.js?view=markup

 Anyway, Daniel, it wouldn't hurt adding a JIRA request for this feature
 - i know i'll need something like this
 in the very near future.

 I also think i like the Microsoft way of doing this, i.e. with a component
 div jwcid=@contrib:ShowOnAjax ... /div
 instead of the tacos way, i.e. with the statusElement parameter for
 every link of form
 component ( http://tacos.sourceforge.net/components/AjaxDirectLink.html )


 [EMAIL PROTECTED] wrote:

 Hi Daniel,

 in the onLoad of Dojo you have to registered two functions

 dojo.event.connect(around, tapestry, loadContent, this, postLoading);
 dojo.event.connect(around, tapestry, linkOnClick, this, preLoading);

 These functions surround the tapestry functions responsible for updating 
content.

 function preLoading(miObj)
 {
 //
 // Get the id of updated component
 var id = miObj.args[1];
 //
 // Here your code
 Dojo.byId(loader).Show

 

Re: Acegi and Visit object

2007-01-19 Thread James Carman

Basically, tapestry-acegi just allows you to glue all of the Acegi
stuff together using HiveMind, rather than Spring (it's all just
object soup right?).  Actually, the majority of the configuration of
the services goes on outside of tapestry-acegi itself (it's in
hivemind-acegi and hivemind-acegi-dao, so it can be used in a
generalized fashion).  The cool part of tapestry-acegi is that it lets
you use Acegi's @Secured annotation (found in the acegi-tiger jar
file) to annotate your listener methods and page classes so that you
can declaratively secure them to specific roles.  As for examples, I
don't really have one, but somebody wrote a nice Wiki page detailing
how to set it up.


On 1/19/07, jake123 [EMAIL PROTECTED] wrote:




James Carman wrote:

 This is the main reason that I wrote Tapestry-Acegi, so that you get
 the best of both worlds.  You can get at all the good Tapestry
 framework stuff and have the Acegi stuff too.


Hi James,
We are about to implement Acegi to our application and we are using Spring
2.0.2, Hibernate 3, Tapestry 4.02.
Are tapestry-acegi.jar a replacement for doing the Acegi mappings in Spring?
What do we need to configure to make it work? If you could give some example
that would bee really nice

Thanks a lot

Jacob
--
View this message in context: 
http://www.nabble.com/Acegi-and-Visit-object-tf3025484.html#a8449953
Sent from the Tapestry - User mailing list archive at Nabble.com.


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




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



Re: Acegi and Visit object

2007-01-19 Thread James Carman

Sure, send it along.  Actually, if the plugin is available via some
maven repo, then I can just include it in my maven build and have it
in there as one of the reports.

On 1/19/07, andyhot [EMAIL PROTECTED] wrote:

James Carman wrote:
 This is the main reason that I wrote Tapestry-Acegi, so that you get
 the best of both worlds.  You can get at all the good Tapestry
 framework stuff and have the Acegi stuff too.

James, it was useful for me to have the hivedocs for the tapestry.acegi and
the hivemind.acegi modules... I did got them generated using Marcus new
hivedoc-plugin and now have them all (manually) combined in one xdoc.
D'you want them
emailed so you can include them at
http://www.carmanconsulting.com/tapestry-acegi ?



 On 1/19/07, andyhot [EMAIL PROTECTED] wrote:
 Actually, I'm not sure that the UserDetailsService is the best option
 for setting up visit,
 (cause the user may not eventually have the correct password) but
 anyway,
 here's how it can be done using hivemind and tapestry-acegi:

 implementation service-id=hivemind.acegi.dao.UserDetailsService

 invoke-factory service-id=hivemind.BuilderFactory
 model=singleton
construct class=my.custom.UserDetailsService
set-service property=userDao service-id=.../
set-service property=stateManager
 service-id=tapestry.state.ApplicationStateManager/
/construct
 /invoke-factory
 /implementation

 and also take a look at
 
http://tapestry.apache.org/tapestry4.1/tapestry-framework/apidocs/org/apache/tapestry/engine/state/ApplicationStateManager.html




 Srinivas Yermal wrote:
  Hi Andreas,
 
  Thanks for the response. Does tapestry-acegi automagically fill-in the
  user
  details into the visit object? Or should I do something?
 
  I use spring for my acegi declarations and specify my
  UserDetailsService in
  the DaoAuthenticationProvider.  You mention ASO. How would I go about
  doing
  it through state objects?
 
  Regards,
  Srini.
 
  On 1/19/07, andyhot [EMAIL PROTECTED] wrote:
 
  i've been using tapestry-acegi, so perhaps this might not be
 helpful in
  your case...
 
  so, how are you declaring the UserDetailsService implementation to be
  used by acegi ?
 
  If you could inject into hivemind's ApplicationStateManager you
 would be
  able to
  access any ASO you'd like.
 
 
 


 --
 Andreas Andreou - [EMAIL PROTECTED] - http://andyhot.di.uoa.gr
 Tapestry / Tacos developer
 Open Source / J2EE Consulting


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



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




--
Andreas Andreou - [EMAIL PROTECTED] - http://andyhot.di.uoa.gr
Tapestry / Tacos developer
Open Source / J2EE Consulting


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




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



Tap 4.1.2 Snapshot : Using Dojo TabContainer

2007-01-19 Thread Shing Hing Man
I have noticed  the static way of defining a Dojo
TabContainer 
in a Tapestry page html template does not work.

div id=testTabContainer dojoType=TabContainer
style=width: 100%; height: 20em; 

div id=tab1 dojoType=ContentPane  label=Tab
One
This is a piece of static content.

/div

div id=tab2 dojoType=ContentPane  label=Tab
TwoThis is tab2/div
/div

However it works when the TabContainer widget is
created dynamically.
Eg :
  
div id=testTabContainer 

div id=tab1  label=Tab One
This is a piece of static content.

/div

div id=tab2 This is tab2/div
/div



  var containernode=dojo.byId(testTabContainer);
// Could have used
tapestry.widget.synchronizeWidgetState to create
widget
 var tabContainer =
dojo.widget.createWidget(TabContainer,
{id:testTabContainer,style:height:20em},
containernode);
 var param;
 // Create contentPane for tab1
 var tab1 =
dojo.widget.createWidget(ContentPane, {label:Tab
One},dojo.byId(tab1)); 
 tabContainer.addChild(tab1);

   // Create contentPane for tab1
 var tab2 =
dojo.widget.createWidget(ContentPane, {label:Tab
Two},dojo.byId(tab2)); 
 tabContainer.addChild(tab2);

 tabContainer.select(tab1);


It would be appreciated if someone can explain why
doesn't the static way work ?

Shing 

Home page :
  http://uk.geocities.com/matmsh/index.html



___ 
The all-new Yahoo! Mail goes wherever you go - free your email address from 
your Internet provider. http://uk.docs.yahoo.com/nowyoucan.html

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



Re: Acegi and Visit object

2007-01-19 Thread Thiago H de Paula Figueiredo
On Fri, 19 Jan 2007 15:09:58 -0200, James Carman  
[EMAIL PROTECTED] wrote:



Basically, tapestry-acegi just allows you to glue all of the Acegi
stuff together using HiveMind, rather than Spring (it's all just
object soup right?).

[snip]

The cool part of tapestry-acegi is that it lets
you use Acegi's @Secured annotation (found in the acegi-tiger jar


What do I do if I want to use tapestry-acegi leaving the acegi  
configuration in spring instead of HiveMind?
I tried to use tapestry-acegi, but its lack of complete documentation on  
how to properly configure it (including hivemind-acegi-dao) and my lack of  
time prevented me of doing it successfully. :(


--

hasta la vista!!!

|8) |8p |8) |8p |8) |8p |8) |8p |8) |8p |8) |8p |8) |8p |8) |8p |8) |8p

thiago h. de paula figueiredo
mestre em ciência da computação pelo dcc/ufmg
ate' porque bobagem pouca e' bobagem . . .

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



Re: Acegi and Visit object

2007-01-19 Thread andyhot

James Carman wrote:

Sure, send it along.  Actually, if the plugin is available via some
maven repo, then I can just include it in my maven build and have it
in there as one of the reports.


just add

   plugin
   groupIdch.marcus-schulte.maven/groupId
   artifactIdhivedoc-plugin/artifactId
   version1.0.1/version   
   configuration

   extraResources
   
extraResourcecustom/hivemind/folder/if/needed/extraResource
  
   /extraResources

   /configuration

in your reporting

the plugin is in the central repo, no need to do anything else...


AFAIK, it currently doesn't handle submodules,
i just had it run twice (for tapestry.acegi and hivemind.acegi) and 
concatenated the output.







On 1/19/07, andyhot [EMAIL PROTECTED] wrote:

James Carman wrote:
 This is the main reason that I wrote Tapestry-Acegi, so that you get
 the best of both worlds.  You can get at all the good Tapestry
 framework stuff and have the Acegi stuff too.

James, it was useful for me to have the hivedocs for the 
tapestry.acegi and

the hivemind.acegi modules... I did got them generated using Marcus new
hivedoc-plugin and now have them all (manually) combined in one xdoc.
D'you want them
emailed so you can include them at
http://www.carmanconsulting.com/tapestry-acegi ?



 On 1/19/07, andyhot [EMAIL PROTECTED] wrote:
 Actually, I'm not sure that the UserDetailsService is the best option
 for setting up visit,
 (cause the user may not eventually have the correct password) but
 anyway,
 here's how it can be done using hivemind and tapestry-acegi:

 implementation service-id=hivemind.acegi.dao.UserDetailsService

 invoke-factory service-id=hivemind.BuilderFactory
 model=singleton
construct class=my.custom.UserDetailsService
set-service property=userDao service-id=.../
set-service property=stateManager
 service-id=tapestry.state.ApplicationStateManager/
/construct
 /invoke-factory
 /implementation

 and also take a look at
 
http://tapestry.apache.org/tapestry4.1/tapestry-framework/apidocs/org/apache/tapestry/engine/state/ApplicationStateManager.html 






 Srinivas Yermal wrote:
  Hi Andreas,
 
  Thanks for the response. Does tapestry-acegi automagically 
fill-in the

  user
  details into the visit object? Or should I do something?
 
  I use spring for my acegi declarations and specify my
  UserDetailsService in
  the DaoAuthenticationProvider.  You mention ASO. How would I go 
about

  doing
  it through state objects?
 
  Regards,
  Srini.
 
  On 1/19/07, andyhot [EMAIL PROTECTED] wrote:
 
  i've been using tapestry-acegi, so perhaps this might not be
 helpful in
  your case...
 
  so, how are you declaring the UserDetailsService implementation 
to be

  used by acegi ?
 
  If you could inject into hivemind's ApplicationStateManager you
 would be
  able to
  access any ASO you'd like.
 
 
 


 --
 Andreas Andreou - [EMAIL PROTECTED] - http://andyhot.di.uoa.gr
 Tapestry / Tacos developer
 Open Source / J2EE Consulting


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



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




--
Andreas Andreou - [EMAIL PROTECTED] - http://andyhot.di.uoa.gr
Tapestry / Tacos developer
Open Source / J2EE Consulting


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




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





--
Andreas Andreou - [EMAIL PROTECTED] - http://andyhot.di.uoa.gr
Tapestry / Tacos developer
Open Source / J2EE Consulting 



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



Aligning columns in external table to a contrib table

2007-01-19 Thread Daniel Jue

Hi all, I have an issue with some table columns that I was hoping to
solve without a lot of complex java. =)

I have a contrib table with sortable columns.  I also have a table
that has one row of aggregate data (totals, averages, etc), that needs
to line up with the corresponding columns in the contrib table.  Is
there anyway to handle this without putting the aggregate data inside
the contrib:table's list?  I don't want sorting (or paging for that
matter) to interfere with the aggregate's position.  Having the
aggregate row above or below the entire list/column headings is
preferable.

Thanks,
Daniel

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



@BeanForm for a Cat and its Owner (PropertySelection)

2007-01-19 Thread munich
I got it working now...I saw some helpful additional comments on the 
sourceforge page. I used the annotations now and did without a page file.
I also added a library line to the application file. Another error was that I 
forgot the PageBeginRender interface so that the object was null when the page 
loaded as the method to create an empty object was not called.

But another questionI am trying to edit a an object that depends on another 
object/table which i would like to solve as a PropertySelection...preferrably 
without doing a PropertySelectionModel class for it.


E.g.:

Table with Cats
~~~

(mapped to Cat.java)

id  name   owner_id
1   Felix2
2   Garfield 1


Table with Owners
~~

(mapped to Owner.java)

id  name
1   Sally
2   Peter

So if I want to edit or create a new Cat I want the Owner to be selectable as 
PropertySelection.

span jwcid=@bf:BeanForm bean=ognl:cat save=listener:save 
delete=listener:delete/

Just displays a text field for the owner_id


has anyone got a good example how to do it? Or does it end up gettings a bit 
messy with lots of coding for a PropertySelectionModel class?

Thanks!

 Original-Nachricht 
Datum: Fri, 19 Jan 2007 00:52:55 +0100
Von: DJ Gredler [EMAIL PROTECTED]
An: Tapestry users users@tapestry.apache.org
Betreff: Re: @BeanForm How do you use it ???

 Hi,
 
 What version are you using? Can you post the full stack trace? I looked at
 the source code and I don't really see how line 149 of BeanForm.java can
 cause a NPE...
 
 Also, what library id are you using in the .application file? Those
 jwcid's
 should probably include the library id, no?
 
 Take care,
 
 Daniel
 
 
 On 1/18/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
 
  I have tried:
 
  span jwcid=@BeanForm bean=ognl:foo properties=ognl:'name'
  save=listener:onSave /
 
  as well as:
 
  span jwcid=@BeanForm bean=ognl:foo beanProperties=ognl:'name'
  save=listener:onSave /
 
  but it comes up with:
 
  ognl.OgnlException
  beanProperties
 
  java.lang.NullPointerException
  Stack Trace:
 
  *
 com.domain.components.BeanForm.getBeanProperties(BeanForm.java:149)
 
  Any pointing in the right direction?
 
  Thanks!
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 

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



Re: @BeanForm for a Cat and its Owner (PropertySelection)

2007-01-19 Thread DJ Gredler

You will need to create a small class that implements
IPropertySelectionModel (maybe inside your page class):

   private final static class OwnerPropertySelectionModel implements
IPropertySelectionModel {
   private ListOwner owners;
   public OwnerPropertySelectionModel( ListOwner owners ) {
   this.owners = owners;
   }
   public int getOptionCount() {
   return this.owners.size();
   }
   public Object getOption( int index ) {
   return this.owners.get( index );
   }
   public String getLabel( int index ) {
   Owner owner = this.owners.get( index );
   return ( owner != null ? owner.getName() : null );
   }
   public String getValue( int index ) {
   return String.valueOf( index );
   }
   public Object translateValue( String value ) {
   if( value == null ) return null;
   else return this.owners.get( Integer.valueOf( value ) );
   }
   }

You will then need to return an instance of this class from a method on your
page:

   public IPropertySelectionModel getOwnerPSM() {
   ListOwner owners = ...
   return new OwnerPropertySelectionModel( owners );
   }

Then just add another binding to your BeanForm component:

  owner_model=ognl:ownerPSM

All of this code was taken from the example webapp, specifically the binding
override examples page. Check it out if you get a chance.

Take care,

Daniel


On 1/20/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:


I got it working now...I saw some helpful additional comments on the
sourceforge page. I used the annotations now and did without a page file.
I also added a library line to the application file. Another error was
that I forgot the PageBeginRender interface so that the object was null when
the page loaded as the method to create an empty object was not called.

But another questionI am trying to edit a an object that depends on
another object/table which i would like to solve as a
PropertySelection...preferrably without doing a PropertySelectionModel class
for it.


E.g.:

Table with Cats
~~~

(mapped to Cat.java)

id  name   owner_id
1   Felix2
2   Garfield 1


Table with Owners
~~

(mapped to Owner.java)

id  name
1   Sally
2   Peter

So if I want to edit or create a new Cat I want the Owner to be selectable
as PropertySelection.

span jwcid=@bf:BeanForm bean=ognl:cat save=listener:save
delete=listener:delete/

Just displays a text field for the owner_id


has anyone got a good example how to do it? Or does it end up gettings a
bit messy with lots of coding for a PropertySelectionModel class?

Thanks!

 Original-Nachricht 
Datum: Fri, 19 Jan 2007 00:52:55 +0100
Von: DJ Gredler [EMAIL PROTECTED]
An: Tapestry users users@tapestry.apache.org
Betreff: Re: @BeanForm How do you use it ???

 Hi,

 What version are you using? Can you post the full stack trace? I looked
at
 the source code and I don't really see how line 149 of BeanForm.java can
 cause a NPE...

 Also, what library id are you using in the .application file? Those
 jwcid's
 should probably include the library id, no?

 Take care,

 Daniel


 On 1/18/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
 
  I have tried:
 
  span jwcid=@BeanForm bean=ognl:foo properties=ognl:'name'
  save=listener:onSave /
 
  as well as:
 
  span jwcid=@BeanForm bean=ognl:foo beanProperties=ognl:'name'
  save=listener:onSave /
 
  but it comes up with:
 
  ognl.OgnlException
  beanProperties
 
  java.lang.NullPointerException
  Stack Trace:
 
  *
 com.domain.components.BeanForm.getBeanProperties(BeanForm.java:149)
 
  Any pointing in the right direction?
 
  Thanks!
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 

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