Re: Best practice for new/edit object page?

2006-07-10 Thread Andreas Bulling
On 10. Jul 2006 - 11:21:49, Gentry, Michael (Contractor) wrote:
| The down side to embedding database IDs in your HTML form is they can be
| changed by the user before POSTing them back to your application, which
| can cause all sorts of problems.

Exactly, this creates _really huge_ security issues...

Anyway, I took the same approach but I've implemented a HiveMind SecurityService
which is called before the object is written back to the database and which
checks if the current user is allowed to execute the requested operation
(read, write, delete, ...) on the object with the id. Otherwise it throws
a SecurityException which is handled by the page class.

This is a quite simple approach but I don't need more so it's sufficient
for my needs. ACEGI integration would be more powerful and flexible - perhaps
in a future version ;-)

HTH
  Andreas

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



Re: Securing Tapestry Applications

2006-07-10 Thread Andreas Bulling
| Problem 3:  Protecting the application from logged-in users who are
| spoofing form parameters
|
| [...]  
| 
| However, we don't want to violate the DRY principle: if there are
| multiple places where a given Entity can be selected for editing, we
| would have to add this check in each place.

That's what I've done in my application: For example before an object
is written back to the database a HiveMind SecurityService checks if
the current user is allowed to execute the requested operation (edit, delete, 
...)
on the object with the given id.

If a AOP solution was possible I'd prefer that one because as you mentioned
I had to add the security check to every page that handles objects which
is not very clean (but not as bad as you might think IMHO as the code is
still modular due to the fact that I'm using a HiveMind service).

Kind regards,
  Andreas

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



Re: tapestry-acegi

2006-07-10 Thread Andreas Bulling
On 10. Jul 2006 - 18:00:40, Norbert Sándor wrote:
| Hello,
| 
| I tried to download tapestry-acegi but SVN access does not seem to be 
| public.
| How can I download it?

Do you know
http://www.carmanconsulting.com/tapestry-acegi/source-repository.html

HTH
  Andreas

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



Re: xml parse error if the jakarta site is not accessible

2006-06-27 Thread Andreas Bulling
On 27. Jun 2006 - 19:40:01, Norbert Sándor wrote:
| Hello!
| 
| Sometimes the jakarta site is not accessible, in such cases I get the 
| following exception:
| 
| Unable to parse file:/blablabla.script: Connection timed out: connect
| java.net.ConnectException
| Connection timed out: connect
| http://jakarta.apache.org/tapestry/dtd/Script_3_0.dtd

IMO it should be possible to copy the DTD from the jakarta server
to your local one and change the xml files appropriately.
Please correct me if I'm wrong... ;)

Regards,
  Andreas

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



Re: Indicating required fields to user?

2006-06-15 Thread Andreas Bulling
Nice one - thanks for that! ;)
Perhaps that's something for the Wiki...

Andreas

On 14. Jun 2006 - 17:18:28, Bryan Lewis wrote:
| Here's what's been working well for us.  Our custom ValidationDelegate
| extends Tapestry's ValidationDelegate and overrides the
| writeAttributes() method, which is documented as Does nothing. Override
| in a subclass to decorate fields.  We emit a
| class=required-field attribute.  It's up to the app's stylesheet to
| define the appearance.
| 
|public void writeAttributes(IMarkupWriter writer,
| IRequestCycle cycle,
| IFormComponent component,
| IValidator validator)
| {
| if (isInError()) {
| writer.attribute(class, error);
| }
| else if (isRequired(component)) {
| writer.attribute(class, required-field);
| }
| }
| 
| /** Returns true if the component has a Required validator. */
| public boolean isRequired(IFormComponent component)
| {
| boolean retval = false;
| 
| if (component instanceof ValidatableField) {
| Object validators = ((ValidatableField)
| component).getValidators();
| if (validators != null
| // The docs say getValidators() is coerced into an Iterator
| // of Validators, but I get a Collection.  Allow for
| either.
| Iterator it = null;
| if (validators instanceof Iterator) {
| it = (Iterator) validators;
| }
| else if (validators instanceof Collection) {
| it = ((Collection) validators).iterator();
| }
| assert it != null;
| 
| while (it.hasNext()) {
| Validator validator = (Validator) it.next();
| if (validator.isRequired()) {
| retval = true;
| break;
| }
| }
| }
| }
| return retval;
| }

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



Re: Injecting Service Error

2006-06-15 Thread Andreas Bulling
Well, IMO HiveMind isn't able to find your ImageService service point
and defaults to tapestry.ImageService where it can't be found, too.
Try to put something like this in your hivemodule.xml

module id=your_application_id version=1.0.0 
package=path.to.the.package.with.ImageService

hth
  Andreas

On 15. Jun 2006 - 15:08:56, Deon Visagie wrote:
| Hi 
| 
| I am trying to inject a service so that I preview images stored in a blob in
| the database. I have the following code but it gives me an error that the
| service can't be found when I view that particular page.
| 
| 
| hivemodule.xml
| --
|   contribution configuration-id=tapestry.url.ServiceEncoders
|   page-service-encoder id=page extension=html
| service=page/
|   direct-service-encoder id=direct
| stateless-extension=direct stateful-extension=sdirect/
|   /contribution
| 
|   contribution configuration-id=tapestry.services.FactoryServices
|  service name=ImageService object=service:ImageService/
|   /contribution 
| 
|   service-point id=ImageService
| interface=org.apache.tapestry.engine.IEngineService
|  invoke-factory
| construct class=mypackagename.ImageService
|   set-object property=linkFactory
| value=infrastructure:linkFactory/
| /construct
|  /invoke-factory
|   /service-point 
| 
| 
| ImageService.java
| -
| 
| public class ImageService
|   implements IEngineService
| {
|   private LinkFactory linkFactory;
| 
|   public ILink getLink(boolean isPost, Object parameters)
|   {
|   Object[] parameterArray = (Object[]) parameters;
|   Object reportId = parameterArray[0];
|   
|   Map serviceParameters = new HashMap();
|   serviceParameters.put(ServiceConstants.SERVICE, getName());
|   serviceParameters.put(ServiceConstants.PARAMETER, new
| Object[] {reportId});
|   
|   return linkFactory.constructLink(this, isPost,
| serviceParameters, true);
|   }
|   
|   public String getName()
|   {
|   return ImageService;
|   }
|   
|   public void service(IRequestCycle cycle)
|   throws IOException
|   {
|   // ...
|   }
| 
|   /**
|* @return Returns the linkFactory.
|*/
|   public LinkFactory getLinkFactory()
|   {
|   return linkFactory;
|   }
| 
|   /**
|* @param linkFactory The linkFactory to set.
|*/
|   public void setLinkFactory(LinkFactory linkFactory)
|   {
|   this.linkFactory = linkFactory;
|   }
| }
| 
| And my java class for the page
| --
| 
| @InjectObject(service:ImageService)
| public abstract IEngineService getImageService();
| 
| 
| The @InjectObject line throws the following error: Service point
| tapestry.ImageService does not exist
| 
| What am I missing? I know my hivemodule.xml file is being read as the
| friendly urls work fine.

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



Re: tapernate for maven ignorants?

2006-06-13 Thread Andreas Bulling
On 13. Jun 2006 - 02:23:38, Henri Dupre wrote:
| Ok I tried to download tapernate from the svn repository. I have the maven
| eclipse plugin installed but other than that I don't know anything about
| maven (shame on me).
| The eclipse plugin did download a bunch of stuff but then insulted me and
| asked to manually download some file and to type some long command lines.
| Then I give up on the source version and I found out on James website some
| binaries.
| To what I understand it seems to depend on hivemind-hibernate? I was looking
| for the sessionfactory definition in the hivemodule.xml but it seems it
| belongs to a hivemind extension?
| Where can I find that?

My request to James was to release the different jars seperately - for all the
people who don't want to/can't use maven (including me). ;-)
That would be a lot easier than the download nightmare you and me have
gone through.

Perhaps we can start a vote for it here?! One +1 from me already... *g

Here you can find the hivermind-hibernate3 stuff:
http://svn.javaforge.com/svn/hivemind/hivemind-hibernate3

You also need
http://svn.javaforge.com/svn/hivemind/hivemind-transaction
and
http://svn.javaforge.com/svn/hivemind/hivemind-utils

Kind regards,
  Andreas

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



Re: tapernate for maven ignorants?

2006-06-13 Thread Andreas Bulling
On 13. Jun 2006 - 08:55:34, Andreas Bulling wrote:
| Here you can find the hivermind-hibernate3 stuff:
| http://svn.javaforge.com/svn/hivemind/hivemind-hibernate3
| 
| You also need
| http://svn.javaforge.com/svn/hivemind/hivemind-transaction
| and
| http://svn.javaforge.com/svn/hivemind/hivemind-utils

Login/Passwort: anonymous/anon

Andreas

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



Re: tapernate for maven ignorants?

2006-06-13 Thread Andreas Bulling
On 13. Jun 2006 - 08:12:42, Chris Chiappone wrote:
| The easiest way to get tapernate up and running is to download his war file
| example.  Un-jar it and then just pull out all the jar files in
| WEB-INF/lib/  That way you will have all dependencies needed.

Yes, that's what James proposed some days ago and what I've done
in the end. The problem with this is that the war file doesn't
seem to get updated (or at least I don't know for sure).

@Henri
You can find the war file here:
www.carmanconsulting.com/mvn/com/carmanconsulting/tapernate-example/0.1

Cheers,
  Andreas

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



Re: tapernate for maven ignorants?

2006-06-13 Thread Andreas Bulling
| James is doing a great job, the only small thing missing for tapernate are
| IMO a home page with straightforward links for jars.

+1 from me for both points ;)

Andreas

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



[OT] Application below /

2006-06-12 Thread Andreas Bulling
Hi folks,

sorry for this off-topic question but as I know that quite a lot
people reading this list also use Tomcat I decided to ask it
here instead of subscribing to the tomcat mailinglist.

What's the right way to make my application available directly
below / using Apache mod_jk2 and Tomcat?
That means instead of using http://some.server.com/my_application
I would like to be able to use http://some.server.com/ to use
my_application.

Thanks and sorry again,
  Andreas

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



Re: [OT] Application below /

2006-06-12 Thread Andreas Bulling
On 12. Jun 2006 - 12:54:40, Danny Angus wrote:
| Andreas Bulling [EMAIL PROTECTED] wrote on 12/06/2006 12:45:14:
| 
|  Hi folks,
| 
|  sorry for this off-topic question but as I know that quite a lot
|  people reading this list also use Tomcat I decided to ask it
|  here instead of subscribing to the tomcat mailinglist.
| 
| I guess you know what the answer will be then ;-)

Well, there are always people who don't like it that much (including me)
but it's not unusual anyway on many lists (especially if you tag the
message with [OT]). But this was an exception, yes ;)

 
|  What's the right way to make my application available directly
|  below / using Apache mod_jk2 and Tomcat?
|  That means instead of using http://some.server.com/my_application
|  I would like to be able to use http://some.server.com/ to use
|  my_application.
| 
| Context path=/ docBase=${catalina.home}/webapps/MY_APP debug=0 
| /Context

Thanks for this!

Andreas

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



Re: image service?

2006-06-11 Thread Andreas Bulling
On 11. Jun 2006 - 10:11:00, Peter Svensson wrote:
| I have a simple image service which is not very well packaged, but depends
| on an Image class, and uses the trails frameworks Hibernate DAO to get and
| do stuff to images stored as byte[]s in the Image class. Could any of that
| be of use?

I'd also be interested in it ;-)

Andreas

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



Re: image service?

2006-06-11 Thread Andreas Bulling
| That would be *exactly* what I need... Do you have any pointers to
| Stiches?
| Is that a tapestry framework??

- http://stitches.authsum.org/

Cheers,
  Andreas

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



Re: Problems with @Bean annotation

2006-06-07 Thread Andreas Bulling
On 07. Jun 2006 - 16:09:42, Travis Romney wrote:
| I'm trying to use the @Bean annotation. I have a very simple
| Bean with a no-arg constructor that I'm trying to create.
| 
| @Bean
| public abstract InpoweredErrorDelegate getInpoweredErrorDelegate();
| 
| The page loads just fine on the first pass.
| If I try to reload the page, there after I get an exception.
| The error message states that my bean has already been declared.

Do you have -Dorg.apache.tapestry.disable-caching=true?
I see a similar exception with caching disabled while trying
to load my page with different browsers simultaneously.

The problem has also been mentioned on this list some weeks ago
but as I remember without any solution :-(

Andreas

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



Re: Hivemind SpringLookupFactory

2006-06-06 Thread Andreas Bulling
| So i send here my SOS !
| Has anybody already used the SpringLookupFactory and could show me a 
| configuration sample ?

For the Visit ASO you should find examples easily on this list...

Concerning the LookupFactory I'm not sure if you really need
it. AFAIK if you use Howards tapestry-spring jar you can just inject
your bean with @InjectObject(spring:visit). But please correct me if I'm 
wrong...

- http://howardlewisship.com/tapestry-javaforge/tapestry-spring/

HTH,
  Andreas

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



Re: Tapestry 4 / Acegi integration examples

2006-06-06 Thread Andreas Bulling
I'd also be very interested in such an example... ;-)

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



Re: Hivemind SpringLookupFactory

2006-06-06 Thread Andreas Bulling
On 06. Jun 2006 - 12:53:04, Andreas Bulling wrote:
| | So i send here my SOS !
| | Has anybody already used the SpringLookupFactory and could show me a 
| | configuration sample ?
| 
| For the Visit ASO you should find examples easily on this list...
| 
| Concerning the LookupFactory I'm not sure if you really need
| it. AFAIK if you use Howards tapestry-spring jar you can just inject
| your bean with @InjectObject(spring:visit). But please correct me if I'm 
wrong...

Should read spring:your_dao for sure ;)

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



Re: Tapernate Squeezer...

2006-06-06 Thread Andreas Bulling
Hi James,

I'd vote for the hashCode() approach, why:

1) It's the approach already used and widely accepted (for example
in Hibernate)

2) using Hibernate (which is what Tapernate is dedicated to) you
are advised to implement hashCode() and equals() anyway (according
to the Hibernate homepage) so it's no additional expense to use
it for Tapernate.

Just my two cents...
  Andreas

On 06. Jun 2006 - 08:08:21, James Carman wrote:
| For those of you who are using Tapernate (and those of you who have done
| something similar in the past), I have a question for you.  Currently, the
| Tapernate entity squeezer uses an abbreviation for the class name (basically
| an integer).  However, I was thinking that this might not be a good thing
| for external links.  What would happen if the application is restarted and
| someone has bookmarked an external link?  So, I need to come up with a
| reliable/repeatable way to shrink the entity name down to a small string.
| Now, the situation gets even trickier when you consider the fact that your
| application may add entity classes between releases.  Therefore, I can't
| just sort the entity class names and then assign them a number (their index
| in a list).  I *really* don't want the entire entity name in the URLs.  That
| would look kind of cheesy.  The way I see it, there are some options...
| 
| 1.  Use a message digest of the entity name.  The message digests would all
| be the same length, so we wouldn't have to worry about the URLs growing
| when the entity name grew.  But, there *is* the chance for digest collisions
| (digest of entity name A is the same as digest of entity name B).
| 
| 2.  Use the hashCode() of the entity name Strings.  Again, we've got the
| possibility for collisions.
| 
| 3.  Just use the simple entity name (the part of the name after the last
| '.').  I don't think Hibernate requires that you have unique simple names
| for your entity classes.  In practice, this is typically not a problem.
| But, in general, it's not a robust solution.
| 
| 4.  Just use the entire entity name and don't worry about all of this!
| Users can override it if they wish and how they wish.
| 
| I will be creating a service point which does the translation to/from the
| entity name abbreviation and users can override it if they want.  Which of
| these (or if you have other ideas) would be the best default, though?  The
| entity squeezer will detect when there is a collision and either throw an
| exception or print an error message to the logs (haven't decided yet) to let
| you know that you need to come up with a better solution for entity name
| abbreviation.
| 
| James

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



Re: getting rid of cycle.activate

2006-06-06 Thread Andreas Bulling
Hi Daniel,

you can make your listener methods return the desired IPage directly...
Perhaps thats a solution to your problem?

hth,
  Andreas

On 06. Jun 2006 - 12:13:34, Daniel M Garland wrote:
| Hi all,
| 
| I've been using Tapestry 3.03, and I need help getting rid of 
| cycle.activate, because it is messing up my URL structure.
| 
| When I want to direct a user to a page, I might use cycle.activate, for 
| instance when i've completed a login procedure or inside a direct link. 
| Its very convenient to write java code like
| IPage mypage = cycle.getPage(mypage);
| cycle.activate(mypage);
| 
| Trouble is, that the url for this page is now somthing like
| 
| /app?service=direct/1/Someotherpage/$DirectLink$0
| 
| so I might have many URLs that point to the one page. Perhaps I could 
| use RedirectException, but would I then have to write a lot of code to 
| get the engine, get the service, get the link and finally throw the URL? 
| seems a lot of work. Whats the best way of doing it?
| 
| Thanks for taking the time to read this
| 
| -- 
| Dan Garland
| 
| [EMAIL PROTECTED]
| office: +44 (0) 207 803 1947
| mob: +44 (0) 7979 770053
| icq: 120963437
| aim: dmgarland1767

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



Re: getting rid of cycle.activate

2006-06-06 Thread Andreas Bulling
On 06. Jun 2006 - 16:03:27, Andreas Andreou wrote:
| That won't do, he's in 3.0.3...

I thought he has switched to T4 as he said I've been using...
@Daniel: Sorry, in this case just forget what I've said. ;)

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



Re: Tapernate trouble

2006-06-05 Thread Andreas Bulling
| if you are developing a brand new application I would suggest to just drop the
| jars from the zip file into WEB-INF/lib, add some very small of hivemodule.xml
| magic and it should work. At least it did for me...

I forgot the word amount and a list of the needed jars here:

hivemind-hibernate3-0.1-20060603.130015-5.jar
hivemind-transaction-0.1-20060603.130055-2.jar
hivemind-utils-0.1.jar
tapernate-0.1-20060603.130452-5.jar

You may also have to add some other jars (e.g. cglib, commons-collections, ...) 
-
just watch your logfiles for exceptions if you don't know which libraries you
need.

Andreas

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



Re: Tapernate-example and the former jars

2006-06-03 Thread Andreas Bulling
| The tapernate-example application (downloadable via SVN at
| http://www.carmanconsulting.com/svn/public/tapernate-example/trunk/) has
| been mavenized to reflect the dependencies.  You can download it and copy
| all the jars that it copies into the war (run mvn war:war) in your own
| application.

OK, so I checked tapernate-example out with subversion and changed to
the trunk subdirectory. Running mvn war:war returns:

mvn -e war:war
+ Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'war'.
[INFO] org.apache.maven.plugins: checking for updates from cc-repo
[WARNING] repository metadata for: 'org.apache.maven.plugins' could not be 
retrieved from repository: cc-repo due to an error: Error transferring file
[INFO] Repository 'cc-repo' will be blacklisted
[INFO] org.apache.maven.plugins: checking for updates from central
[WARNING] repository metadata for: 'org.apache.maven.plugins' could not be 
retrieved from repository: central due to an error: Error transferring file
[INFO] Repository 'central' will be blacklisted
[INFO] 

[ERROR] BUILD ERROR
[INFO] 

[INFO] The plugin 'org.apache.maven.plugins:maven-compiler-plugin' does not 
exist or no valid version could be found
[INFO] 

[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: The plugin 
'org.apache.maven.plugins:maven-compiler-plugin' does not exist or no valid 
version could be found
at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.verifyPlugin(DefaultLifecycleExecutor.java:1247)
at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.getMojoDescriptor(DefaultLifecycleExecutor.java:1430)
at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.segmentTaskListByAggregationNeeds(DefaultLifecycleExecutor.java:378)
at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:134)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:249)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.plugin.version.PluginVersionNotFoundException: The 
plugin 'org.apache.maven.plugins:maven-compiler-plugin' does not exist or no 
valid version could be found
at 
org.apache.maven.plugin.version.DefaultPluginVersionManager.resolvePluginVersion(DefaultPluginVersionManager.java:225)
at 
org.apache.maven.plugin.version.DefaultPluginVersionManager.resolvePluginVersion(DefaultPluginVersionManager.java:87)
at 
org.apache.maven.plugin.DefaultPluginManager.verifyPlugin(DefaultPluginManager.java:160)
at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.verifyPlugin(DefaultLifecycleExecutor.java:1218)
... 14 more
[INFO] 

[INFO] Total time: 1 second
[INFO] Finished at: Sat Jun 03 13:28:35 GMT 2006
[INFO] Final Memory: 1M/2M
[INFO] 


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



Re: Tapernate-example and the former jars

2006-06-03 Thread Andreas Bulling
I'm sorry but I'm totally confused now...
Where do I have to download/checkout/maven what to get the
precompiled jars?

Thanks!
  Andreas

On 03. Jun 2006 - 10:41:19, James Carman wrote:
| Well, I've committed all my changes and published everything to my mvn
| repository that is needed that you can't find on the public ones.  Let me
| know if it doesn't work for you?  FYI, I changed the build to look for
| ant-apt.jar at ${ant.home}/lib/ant-apt.jar.  So, if you want to build the
| example application, you just have to drop the ant-apt.jar file into your
| ant.home/lib dir.

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



Re: Tapernate-example and the former jars

2006-06-03 Thread Andreas Bulling
On 03. Jun 2006 - 10:54:22, James Carman wrote:
| Well, you can just download the war file if you want...
| 
| www.carmanconsulting.com/mvn/com/carmanconsulting/tapernate-example/0.1
| 
| Just unzip that and it will contain all dependencies you need. 

Thanks a lot, that's what I wanted! :-)

Without having testet it just two short questions
(as I know the different Tapernate hivemodule.xml files quite well
in the meanwhile *g):

1) Is the contribution configuration-id=DataClasses not needed anymore?

2) Are the
 interceptor service-id=spring.transaction.TransactionInterceptor
method name=find* attribute=PROPAGATION_REQUIRED,readOnly/
method name=insert* attribute=PROPAGATION_REQUIRED/
method name=update* attribute=PROPAGATION_REQUIRED/
method name=delete* attribute=PROPAGATION_REQUIRED/
method name=get* attribute=PROPAGATION_REQUIRED,readOnly/
/interceptor
not needed or not available anymore?

Thanks and kind regards,
  Andreas

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



Re: Tapernate-example and the former jars

2006-06-03 Thread Andreas Bulling
OK, thanks! ;)

What I did was to remove all the old configuration stuff (Tapernate version: 
Even
before the split of the different persistence strategies...) from my 
hivemodule.xml
file and dropped the new tapernate/hivemind jars in.
This should be enough and work, shouldn't it?

I get the following exception:

17:26:51,219 ERROR [plattform]:253 - Servlet.service() for servlet 
meet-europeans threw exception
java.lang.IllegalArgumentException: No SessionFactory specified
at org.springframework.util.Assert.notNull(Assert.java:116)
at 
org.springframework.orm.hibernate3.SessionFactoryUtils.doGetSession(SessionFactoryUtils.java:294)
at 
org.springframework.orm.hibernate3.SessionFactoryUtils.getSession(SessionFactoryUtils.java:195)
at 
com.javaforge.tapestry.tapernate.filter.TapernateFilter.createNewSession(TapernateFilter.java:176)
at 
com.javaforge.tapestry.tapernate.filter.TapernateFilter.createSession(TapernateFilter.java:171)
at 
com.javaforge.tapestry.tapernate.filter.TapernateFilter.service(TapernateFilter.java:70)
at 
$WebRequestServicerFilter_10b9a7fb168.service($WebRequestServicerFilter_10b9a7fb168.java)
at 
$WebRequestServicerFilter_10b9a7fb167.service($WebRequestServicerFilter_10b9a7fb167.java):

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



Re: Tapernate-example and the former jars

2006-06-03 Thread Andreas Bulling
On 03. Jun 2006 - 12:22:16, James Carman wrote:
| Okay, that's weird.  I apologize for all the confusion.  But, getting used
| to Maven2 is not quite as easy as I had hoped.  It's tough to figure out
| exactly where everything is going during the build.

No problem, it's weekend and I have enough time to convert my application
to the new Tapernate version... ;)

|  Anyway, the war that's
| out there in my maven repo works on my machine by just dropping it in a
| Tomcat installation's webapps directory.  Let me know if it works for you.

Nope, I just installed the war in my local Tomcat installation but I get
the following exception:

root cause:
org.apache.hivemind.ApplicationRuntimeException: Unable to construct service 
hivemind.hibernate3.SessionFactory: Hibernate Dialect must be explicitly set 
[jar:file:/home/andreas/apache-tomcat/webapps/tapernate-example-0.1/WEB-INF/lib/hivemind-hibernate3-0.1-20060603.130015-5.jar!/META-INF/hivemodule.xml,
 line 46, column 61]

org.apache.hivemind.impl.servicemodel.AbstractServiceModelImpl.constructNewServiceImplementation(AbstractServiceModelImpl.java:166)

org.apache.hivemind.impl.servicemodel.AbstractServiceModelImpl.constructServiceImplementation(AbstractServiceModelImpl.java:140)

org.apache.hivemind.impl.servicemodel.SingletonServiceModel.getActualServiceImplementation(SingletonServiceModel.java:69)
$SessionFactory_10b9abe4d86._service($SessionFactory_10b9abe4d86.java)

$SessionFactory_10b9abe4d86.openSession($SessionFactory_10b9abe4d86.java)

$SessionFactory_10b9abe4d85.openSession($SessionFactory_10b9abe4d85.java)

Probably this is because I didn't provide any hivemind configuration?
Anyway: As my application works again this doesn't matter anymore ;)

| As for your error below, do you have two service points that support the
| SessionFactory interface?  If so, then HiveMind can't autowire it in, since
| it doesn't know which one to choose.  That's the only way I can think of
| that you might not have a SessionFactory with all of the jars from the
| example war file in your WEB-INF/lib directory.

Sorry for the excitement: I removed everything from the hivemodule.xml file but 
I forgot
to also remove the old libraries (spring-hibernate3 and spring-transaction) 
*slap*
Now everything works as expected ;)

Kind regards,
  Andreas

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



Re: Border question

2006-06-02 Thread Andreas Bulling
Hi Mark,

thanks for your explanations which made it a little bit clearer for me ;)
But just another short question: How would you implement a multi-level
page menue? Especially would you use a external file to describe the
page hierarchy/structure?

Thanks!
  Andreas

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



Tapernate-example and the former jars

2006-06-02 Thread Andreas Bulling
Hi James,

so that also other people are able to read your answer I'm asking on the list...

In the old tapernate-example the different jars had been included but
they seem to have gone in the current one. :( Do I have to install maven
and build them on my own? If not where can I find them?

Is there still a tapernate jar available (that can be dropped in
and used right out of the box)?

Thanks!
  Andreas

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



Re: Visit object

2006-06-01 Thread Andreas Bulling
| Following your advice, I've created my own class, called Visit
| (original isn't it? :-) and added this to hivemind.xml
| 
|  contribution configuration-id=tapestry.state.ApplicationObjects
|state-object name=user-visit scope=session
|  create-instance class=com.icom.crm_feup.Visit/
|/state-object
|  /contribution
| 
| This is the code I've used to try accessing the Visit object:
| 
| @InjectState(user-visit)
| public abstract Visit getVisit();
| 
| But it isn't work. It complains, on runtime, about the annotation
| being done before.

Could you post the stack trace?

Andreas

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



Re: Border question

2006-06-01 Thread Andreas Bulling
On 01. Jun 2006 - 14:06:48, Mark Stang wrote:
| The other option is to create your own menuing component.  Start with 
manually coding a couple of HTML pages to get the LF.  Then abstract it 
backwards into a component that creates the HTML on-the-fly. Then just add that 
component/components to each page.  Or put them all in a border page and change 
out the interior.

Is this the best practice for implementing for example a breadcrumb
or a multi-level menue?

The problem is caused by Tapestry's component-based approach:
You have to define the logical order (the tree-structure) of your pages 
manually
in a seperate file, directly in the pages or in a not portable component.
That's more difficult than in a actions/operations-based approach... :-(

Andreas

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



Re: Border question

2006-06-01 Thread Andreas Bulling
Hi Mark,

sounds as a solution even if I don't understand what you were trying to 
explain...
Some sample code would help a lot, is there something you can show us/commit
to one of the widely known Tapestry repositories?

Cheers,
  Andreas

On 01. Jun 2006 - 14:51:00, Mark Stang wrote:
| There is another option to get around that restriction.  It is what Howard 
calls my mutant application.  I have one Frame.html/Frame.page/Frame.java.  
All of my other pages are popups.  There are about 5 or 6 of those.  In 
addition, I have 130 components.  None of my components have any border 
content, it is all in the Frame.  As part of the Frame I have Breadcrumbs and 
something we call Headcrumbs.  Headcrumbs are a higher level menu.  So, we can 
have a bunch of breadcrumbs within each headcrumb.  Headcrumbs are a group of 
breadcrumbs.  Breadcrumbs are reusable across multiple Headcrumbs.  Any one 
breadcrumb knows nothing about any of its fellow breadcrumbs in a headcrumb.
| 
| Basically, we have a wizard application with 130 screens.
| 
| The border component replaces pages, we have one page that replaces 
components.  There is an age-old Tapestry question about whether you create 
components or pages?  What is your level of re-use?  We chose re-use at the 
level of components.
| 
| regards,
| 
| Mark


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



Re: Dynamic assigning component id

2006-05-30 Thread Andreas Bulling
On 30. Mai 2006 - 16:19:37, Pratibha Gopalam wrote:
| Thanks for the reply.
| 
| In the template (.html) we normally use the jwcid to give a id and tell 
| tapestry what type of component to instantiate. How do I do the same 
| thing with id?
| 
| span [EMAIL PROTECTED]  -- /span -- this works, but the id  
| 'someid' is static. Now I want to make that dynamic.
| 
| span id =ognl:myId type=Block  -- span : This doesn't work 
| because tapestry looks for jwcid to create the components. If I move the 
| component declaration to the page file, the id is again static there.

From my understanding of his mail I'd use _both_ jwcid and the id
attribute - perhaps that works?

Cheers,
  Andreas

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



Re: contrib:Palette question

2006-05-29 Thread Andreas Bulling
Hi,

and thanks for your answer!

| Why don't you use:
| component id=inputPersons type=contrib:Palette
| binding name=selected value=persons/
| binding name=model value=modelSource.getPersonModel(null, 
'true')/
| binding name=selectedTitleBlock value=component:selBlock/
| binding name=availableTitleBlock value=component:availBlock/
| binding name=selectImage value=selectImage/
| binding name=deselectImage value=deselectImage/
| binding name=validators value=validators:required/
| /component
| 
| and in your .html
| span jwcid=[EMAIL PROTECTED].../span
| e.t.c.

Thanks, works like a charme!
But I thought the Blocks would be displayed twice on the page in this case,
but they are not... Why?

Cheers,
  Andreas

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



contrib:Palette question

2006-05-26 Thread Andreas Bulling
Hi folks,

after some time of silence I have a new problem/question:
I want to use contrib:Palette and replace selectedTitleBlock,
availableTitleBlock and the image assets. Do I really
have to provide for example a getSelectedTitleBlock() method
in my page class which returns a custom Block component?
Doesn't look clean to me if that's the case...

Thanks in advance,
  Andreas

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



Re: contrib:Palette question

2006-05-26 Thread Andreas Bulling
Well, I've tried the following:

component id=inputPersons type=contrib:Palette
binding name=selected value=persons/
binding name=model value=modelSource.getPersonModel(null, 'true')/
binding name=selectedTitleBlock value=selectedTitleBlock/
binding name=availableTitleBlock value=availableTitleBlock/
binding name=selectImage value=selectImage/
binding name=deselectImage value=deselectImage/
binding name=validators value=validators:required/
/component

and in the page class:

@Component(type = Insert, bindings = { value=message:selected })
public abstract Insert getSelectedTitleBlock();

@Component(type = Insert, bindings = { value=message:available })
public abstract Insert getAvailableTitleBlock();

@Asset(/images/select.gif)
public abstract IAsset getSelectImage();

@Asset(/images/deselect.gif)
public abstract IAsset getDeselectImage();

But this doesn't work... :(
Any ideas?

On 26. Mai 2006 - 12:17:26, Andreas Bulling wrote:
| Hi folks,
| 
| after some time of silence I have a new problem/question:
| I want to use contrib:Palette and replace selectedTitleBlock,
| availableTitleBlock and the image assets. Do I really
| have to provide for example a getSelectedTitleBlock() method
| in my page class which returns a custom Block component?
| Doesn't look clean to me if that's the case...
| 
| Thanks in advance,
|   Andreas


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



Re: contrib:Palette question

2006-05-26 Thread Andreas Bulling
The replacements for the image assets work now...

For the titleBlocks I get the following exception:
org.apache.hivemind.ApplicationRuntimeException
No type converter for type org.apache.tapestry.components.Block is available.
Stack Trace:

* 
org.apache.tapestry.coerce.ValueConverterImpl.coerceValue(ValueConverterImpl.java:105)
* $ValueConverter_10b7061d2ec.coerceValue($ValueConverter_10b7061d2ec.java)
* 
org.apache.tapestry.binding.AbstractBinding.getObject(AbstractBinding.java:91)
* $Palette_428.getAvailableTitleBlock($Palette_428.java)
* sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
* 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
* 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
* java.lang.reflect.Method.invoke(Method.java:585)
* ognl.OgnlRuntime.invokeMethod(OgnlRuntime.java:491)
* ognl.OgnlRuntime.getMethodValue(OgnlRuntime.java:904)
* 
ognl.ObjectPropertyAccessor.getPossibleProperty(ObjectPropertyAccessor.java:54)
* ognl.ObjectPropertyAccessor.getProperty(ObjectPropertyAccessor.java:122)
* ognl.OgnlRuntime.getProperty(OgnlRuntime.java:1616)
* ognl.ASTProperty.getValueBody(ASTProperty.java:96)
* ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:170)
* ognl.SimpleNode.getValue(SimpleNode.java:210)
* ognl.Ognl.getValue(Ognl.java:333)
* ognl.Ognl.getValue(Ognl.java:310) 

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



Re: subscribing to this list

2006-05-19 Thread Andreas Bulling
Hi,

| So to Paul Cantrell, Robin Ericsson and Andreas Bulling, thank you for your 
pointless replies. You could have at least answered my question aside from just 
being rude and then we would all be happy.

I don't apologize for anything I've written as _you_ have been rude to all 
people reading
this list by sending the same mail several times and harshly shout for help.
A mailinglist is nothing where you can scream in as loud as you can, expect to 
get
an answer within 30s and if not demand your rights several times again.

Probably you should read
http://linux.sgms-centre.com/misc/netiquette.php

Andreas

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



Re: I do not like the new tapestry logo (constructive criticism)

2006-05-16 Thread Andreas Bulling
On 16. Mai 2006 - 11:03:11, Schulte Marcus wrote:
| ha, now I feel compelled to throw in my wisdom ;)
| 
| I'd try to make something which contains the Apache-feather.
| Lots of other apache projects do it. And the Apache-Connection 
| IS important for Tapestry. I know I would have had a much 
| harder time selling tapestry in my corp if it wasn't under
| the apache umbrella ...

Arachne holding the Apache feather?! ;-)

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



Re: Content Type

2006-05-16 Thread Andreas Bulling
On 16. Mai 2006 - 10:21:13, yesidredondo wrote:
| Can anyone tell me how to put the content type of a page in tapestry, if i
| want a page to be of xml or xls format?

HttpServletResponse response = 
getRequestCycle().getRequestContext().getResponse();
try {
response.setContentType(text/xml);
} catch (IOException e) {
e.printStackTrace();
}

Hope this helps,
  Andreas

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



Re: Best pratice - CRUD Security - Tapestry 4.0

2006-05-16 Thread Andreas Bulling
On 16. Mai 2006 - 10:45:45, Brian K. Wallace wrote:
| This is where I stick with ACEGI being unobtrusive. Not discounting any
| other method of doing it at all, but I found that with ACEGI I add a
| hook into login/logout pages and there's no other intrusion into my
| Tapestry applications outside the configuration file (aka: no
| isUserInRole(...) of any kind.

But how is further access for example to the database checked?

Andreas

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



Re: Tapernate configuration questions

2006-05-16 Thread Andreas Bulling
On 16. Mai 2006 - 13:54:01, Chris Chiappone wrote:
| Ok, it appears most of my migration to Tapernate seems to be working well.
| My question is somewhat unrealated to tapernate but maybe someone could
| guide me in the right direction.  For pages and components that can inject
| the Dao seem to work like a charm.  The problem is I have a handfull of
| classes that are not pages or components that instantiate the Dao in them.
| Since these are now configured via tapernate the session is null and cannot
| be aquired by HibernateDaoSupport.   So my question is it possible to inject
| the dao's into other objects?

I think you have to make HiveMind services out of them - please
correct me if I'm wrong ;)

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



Re: [Tapestry]

2006-05-10 Thread Andreas Bulling
On 10. Mai 2006 - 11:28:17, Paul Cantrell wrote:
| Filter on the List-Id header (it should be  
| users.tapestry.apache.org).

As I've told before this is the easiest and most fail-safe
solution...


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



Re: tapestryforums.com

2006-05-09 Thread Andreas Bulling
On 09. Mai 2006 - 10:21:45, Jesse Kuhnert wrote:
| Ok it looks like there's a general consensus.
| 
| Any word from tapestryforums ? (I found the cc'ed email addy on the site)

I would say: Just do it!
I've never seen something similar on any other list I was subscribed to.
If the people using the forums want to reach a wider audience IMHO
they should subscribe to the list.

Furthermore as the mails forwarded from the forums are ugly HTML
and not readable (at least in mutt which I'm using) I would say
kick it ;)

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