[T5] Custom component parameter value within a loop

2008-08-09 Thread Brendan McNichols
Hi All,

 

I have been struggling with the following problem for quite a while.  I
have a custom component for which I have defined a parameter with a
binding type of property.  I have the component within a form that is
within a loop on my page.  The parameter of my component is bound to the
value of the "value" parameter of the loop.  The value of my parameter
ends up always being null, when the value is requested in my component,
a PropBinding calls the getter on my page class.  Everything is good so
far as rendering goes. The problem is that when I submit the form, I
want to access my value, so the PropBinding again calls the getter on my
page class.  At this point, I get a NullPointerException since the value
of the property in my page class is now null since the loop is no longer
being rendered.  So my question is this:  Is there a way to retaint the
value of the property in the component instead of it always being null
and having the PropBinding call the getter on the page?  (BTW, I am
using version 5.0.13)

 

Here's a snippet of the component java class:

 

public class MenuEntry {

 // This setter never gets called.

public void setModel(Model model) {

this.model = model;

}

 

 // This works fine because it is only called when rendering.

public String getModelName() {

return model.getName();

}

 

 // NullPointerException gets thrown because the PropBinding calls
the getter

 // on the page class and the property is null since the loop is no
longer being renderes.

public void setModelName(String name) {

model.setName(name);

}

 

// a bunch of non-relevant methods not shown...

 

@Parameter(required = true, principal = true)

private Model model;

 

// bunch of non-relevant fields not shown...

}

 

And a snippet of the page class:

 

public class Build {

// bunch of non-relevant methods not shown...

 

public Model getMenuModel() {

return menuModel;

}

 

public void setMenuModel(Model model) {

menuModel = model;

}

 

// bunch of non-relevant fields not shown...

 

private Model menuModel;

}

 

And finally, a snippet of the page tml:

 



















 

 

Thanks very much in advance for any help!

 

Brendan McNichols



Re: T5: Unpredictable deploy behaviour in tomcat 6 error - TapestryException FormSupport at ... corelib/pages/ExceptionReport.tml

2008-08-09 Thread adasal
All good.
I notice I sent this seven hours ago, so 4 hours of work later ...
1. I deployed into Jetty which has far better error messages. There may be a
setting in tomcat for this? It told me there were bad class versions. Of
course!
2. In Eclipse land it is necessary to compile and run the container using
the same version. If using ant to compile - I do as everything is packed
into a war as needed by tomcat - then ant must use the same java version. OK
I new that just didn't think!
3. Troubles not completely over, also necessary to take out of the container
launch config any conflicting jars, probably put in then when running
something else indiscriminately, or just trying to make it work and
forgotten they were there.

Bottom line - jetty has more useful error messages and that can really
matter to someone like me!
Adam

2008/8/9 adasal <[EMAIL PROTECTED]>

> org.apache.tapestry.ioc.internal.util.TapestryException:
> org.apache.tapestry.services.FormSupport [at
> classpath:org/apache/tapestry/corelib/pages/ExceptionReport.tml, line 11,
> column 45]
>
> Does anyone know the way round this?
> This is the basic test application - Tapestry5Test1.
> I have been able to deploy this once into tomcat 6 with tapestry 06 libs.
> I changed to 13 and then to 14 usually getting a class not found exception
> forg.apache.tapestry.ioc.annotations.InjectService.
> This exception has disappeared with the following issues.
>
> I have reverted to 06 and also deployed the 06 tutorial into tomcat 5. -
> Both OK
>
> I have redeployed Tapestry5Test1 under tomcat 6. - KO.
>
> When testing with newer libs I made necessary edits as I understand for the
> new tapestry5 package name and also in web.xml.
> I cannot understand why it would work once but not again, I assume I have
> made a mistake in the libs I have included, but I placed the originals
> elsewhere and just copied them back, so this doesn't make sense to me.
> What are the issues with tomcat 6?
> Jetty seems fine.
> BTW I have tried with 3 versions of javassist - javassist-3.4.jar,
> javassist-3.7.ga.jar, javassist-3.8.ga.jar. I can't trace the difficulties
> to this jar.
> Any ideas?
>
> Adam
>
>


Re: T5: contributeValueEncoderSource

2008-08-09 Thread Howard Lewis Ship
Currently, it is all or nothing.

It would be easy to add support for making entity value encoding
optional (triggered by a symbol).

Please add a JIRA issue.

On Sat, Aug 9, 2008 at 3:37 PM, Ned Jackson Lovely <[EMAIL PROTECTED]> wrote:
> I'm using tapestry-hibernate, and I'm enjoying all the magic that it
> provides, but I'm having one issue.
>
> I'd like to provide my own ValueEncoderSources for my mapped entities.
> I need to do some security checks and other housekeeping as I load
> them.
>
> Unfortunately, when I attempt to do something like this:
>
> public static void
> contributeValueEncoderSource(MappedConfiguration ValueEncoderFactory> configuration, final ThingDao dao) {
>configuration.add(Thing.class, new ThingValueEncoderFactory());
> }
>
> I get the following warning:
>
> [WARN] TapestryModule.ValueEncoderSource Service contribution (to
> service 'ValueEncoderSource', by
> njl.webapp.services.AppModule.contributeValueEncoderSource(MappedConfiguration,
> ThingDao) (at AppModule.java:76)) conflicts with existing contribution
> (by 
> org.apache.tapestry5.hibernate.HibernateModule.contributeValueEncoderSource(MappedConfiguration,
> HibernateSessionSource, Session, TypeCoercer, PropertyAccess,
> LoggerSource) (at HibernateModule.java:149)) and has been ignored.
>
> I realize I'm running up against the work done by the
> contributeValueEncoderSource function in
> org.apache.tapestry5.hibernate.HibernateModule
>
> Is there a simple way to override this, or do I have to do something ugly?
>
> --
> njl
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>



-- 
Howard M. Lewis Ship

Creator Apache Tapestry and Apache HiveMind

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



T5: contributeValueEncoderSource

2008-08-09 Thread Ned Jackson Lovely
I'm using tapestry-hibernate, and I'm enjoying all the magic that it
provides, but I'm having one issue.

I'd like to provide my own ValueEncoderSources for my mapped entities.
I need to do some security checks and other housekeeping as I load
them.

Unfortunately, when I attempt to do something like this:

public static void
contributeValueEncoderSource(MappedConfiguration configuration, final ThingDao dao) {
configuration.add(Thing.class, new ThingValueEncoderFactory());
}

I get the following warning:

[WARN] TapestryModule.ValueEncoderSource Service contribution (to
service 'ValueEncoderSource', by
njl.webapp.services.AppModule.contributeValueEncoderSource(MappedConfiguration,
ThingDao) (at AppModule.java:76)) conflicts with existing contribution
(by 
org.apache.tapestry5.hibernate.HibernateModule.contributeValueEncoderSource(MappedConfiguration,
HibernateSessionSource, Session, TypeCoercer, PropertyAccess,
LoggerSource) (at HibernateModule.java:149)) and has been ignored.

I realize I'm running up against the work done by the
contributeValueEncoderSource function in
org.apache.tapestry5.hibernate.HibernateModule

Is there a simple way to override this, or do I have to do something ugly?

-- 
njl

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



Re: Snapshot repository down - alternative?

2008-08-09 Thread Howard Lewis Ship
The tapestry.formos.com server is currently in transit between Formos'
old and new offices.

On Sat, Aug 9, 2008 at 2:15 AM, Dragan Djuric <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> It seems that the repository at
> http://tapestry.formos.com/maven-snapshot-repository is down (at least I
> cannot access it). Due to other dependencies and code refactoring I cannot
> use versions earlier then the latest snapshot.
> Two short questions:
> 1. What is the problem with the repository and when you expect it to be
> available (maybe it's a matter of someone issuing one command to unblock it,
> or maybe it works for other people)?
> 2. Is there an alternative location (mirror)?
> --
> View this message in context: 
> http://www.nabble.com/Snapshot-repository-down---alternative--tp18903369p18903369.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>



-- 
Howard M. Lewis Ship

Creator Apache Tapestry and Apache HiveMind

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



Tapestry5, grid and checkbox

2008-08-09 Thread Argo Vilberg
hi,


Is it possible to user T5 GRID with combobox component?

I want use grid in form component, and after form submits save checked items
to database.

Is this possible after all?

I cant find any example.



Argo


Re: Transmitting a javascript-value to the server using JSON

2008-08-09 Thread Peer Brink
Dear Toby,

thanks for your comments on this. But I decided to use a hidden form
field (from t5components) and fill it with the offset-value using
javascript. It seems to me that this is the simpler solution.

I described the details in another thread (subject: "Getting users
timezone-offset (javascript)".

Nevertheless I would very much appreciate a simple T5-support for
transfering values from the client to the server.

Regards,
Peer.

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



Re: Getting users timezone-offset (javascript)

2008-08-09 Thread Peer Brink
On Tue, Aug 5, 2008 at 18:59, Josh Canfield <[EMAIL PROTECTED]> wrote:
> I looked around a bit for a solution once and ended up just sticking the
> offset into a hidden form field.

Dear Josh,

this in fact is working and seems to be a quite simple solution
compared to other possibilties I was thinking of (JSON-Object for
example). Thanks a lot for this hint!

If anyone is interested in the details: I used the hidden field from
t5components:
http://87.193.218.134:8080/t5components/t5c-commons/ref/org/apache/tapestry/commons/components/Hidden.html
inside the form like this:


And added some javascript to the site:
void setupRender() {
  renderSupport.addScript("document.myFormName.tzOffset.value = new
Date().getTimezoneOffset();");
}

Make sure to add attribute
name="myFormName"
to the -element in your html.

The timeZone-Offset will then be transmitted using the usual
setter-method upon submission of the form.

This could be used for transmitting any data retrieved by javascript
from the client to the server unless there is no direct support in T5
for this.

Regards,
Peer.

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



Re: [T5] How to handle DAOs?

2008-08-09 Thread Chris Lewis
Onno,

The thing to know about tapestry-hibernate is that it creates a proxy
for the actual hibernate session. When you use the injected session it
actually gets the session for the current thread, via the
HibernateSessionManager I believe. So when you instantiate your DAO with
a session in the constructor, they will always get the session for the
current thread transparently.

Onno Scheffers wrote:
> Hi,
>
> I am having some troubles figuring out the proper way to use DAO services
> using tapestry-hibernate. The documentation describes how to write the DAO
> service interfaces and how to register them, but it doesn't show an example
> of an actual DAO implementation.
>
> As far as I know I cannot inject a Hibernate Session into the DAO service
> implementation, so I must create a constructor for that.
> If I do that it works fine, but every example I was able to find (not many!)
> seem to use the default scope for the DAO service, which is singleton. It
> works on my local machine, but I don't quite understand how this would work
> in a multi-user, multi-threaded environment. Shouldn't the scope be
> perthread?
>
> Does anyone have a bit of example code for a DAO interface, its
> implementation and the way they are registered in the AppModule?
>
>
> regards,
>
> Onno
>
>   

-- 
http://thegodcode.net


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



T5: Unpredictable deploy behaviour in tomcat 6 error - TapestryException FormSupport at ... corelib/pages/ExceptionReport.tml

2008-08-09 Thread adasal
org.apache.tapestry.ioc.internal.util.TapestryException:
org.apache.tapestry.services.FormSupport [at
classpath:org/apache/tapestry/corelib/pages/ExceptionReport.tml, line 11,
column 45]

Does anyone know the way round this?
This is the basic test application - Tapestry5Test1.
I have been able to deploy this once into tomcat 6 with tapestry 06 libs.
I changed to 13 and then to 14 usually getting a class not found exception
forg.apache.tapestry.ioc.annotations.InjectService.
This exception has disappeared with the following issues.

I have reverted to 06 and also deployed the 06 tutorial into tomcat 5. -
Both OK

I have redeployed Tapestry5Test1 under tomcat 6. - KO.

When testing with newer libs I made necessary edits as I understand for the
new tapestry5 package name and also in web.xml.
I cannot understand why it would work once but not again, I assume I have
made a mistake in the libs I have included, but I placed the originals
elsewhere and just copied them back, so this doesn't make sense to me.
What are the issues with tomcat 6?
Jetty seems fine.
BTW I have tried with 3 versions of javassist - javassist-3.4.jar,
javassist-3.7.ga.jar, javassist-3.8.ga.jar. I can't trace the difficulties
to this jar.
Any ideas?

Adam


Re: Tapestry5 and css in IE6 and IE7

2008-08-09 Thread Argo Vilberg
Ok thanx.

This version works very well!


package ee.softpro.components;

import org.apache.tapestry5.annotations.BeginRender;
import org.apache.tapestry5.annotations.AfterRender;
import org.apache.tapestry5.annotations.Parameter;
import org.apache.tapestry5.MarkupWriter;

public class ConditionalComments {


@Parameter(required=true,defaultPrefix="literal")
private String _condition;

@BeginRender
private void beginRender(MarkupWriter writer) {
writer.writeRaw("");
}

}




   



   




$(document).ready(function(){
$("#container").prepend('
Kasutate aegunud brauserit (Internet Explorer 6), palun uuendage versioonile 7 vƵi vahetage http://www.firefox.com";>Mozilla Firefoxi vastu. sulge [X]
').css("display", "none").slideDown("10");}); Argo 2008/8/5 Christian Gorbach <[EMAIL PROTECTED]> > hi, > search for 'conditional comment' in the list archives.. > the solution is to write a tiny custom component. > c)hristian > > > hi, >> >> >> In my web application are different css for IE6 and IE7. >> >> >> > href='${asset:context:css/main.css}' /> >> >> >> >> >> >> But IF IE7 and If IE6 are ordinary html comments, thats only browser >> understands. >> >> >> But Tapestry does not. >> >> >> Becouse of tapestry wants ${asset:context:css/main.css} to include css >> file, >> i have no chance to include ie7.css or ie6.css. >> >> >> >> >> Any ideas? >> >> >> >> Argo >> >> >> > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >

Re: T5 http - https redirect hang on IE6

2008-08-09 Thread Argo Vilberg
hi,


My solution is that i write login and rolechooser page together.

Problem is that if i use Login.page as redirection page then in ie6
redirection hangs.

But if i user Login page same as to do ssh+IDcard authentication and show
after that roles. Then all works fine.

Also i find new bug, if  i log out and https protocol page redirect to https
page, then ie6 do not understand
thant http port is 8080, but not 8443.
I made direct URL http://localhost:8080/myapp to sendRedirect method.
But in IE6, 8080 are changed strangly to 8443
IE7 and Firefox all works fine :)


I also use Appmodule.java-s, but this no success. Same bug without or with
Appmodule modification.


public void contributeAlias(Configuration
configuration)
   {
   BaseURLSource source = new BaseURLSource()
   {
  public String getBaseURL(boolean secure)
{
String protocol = secure ? "https" : "http";

int port = secure ? 8443: 8080;

return String.format("%s://localhost:%d", protocol,
port);
}
};

configuration.add(AliasContribution.create(BaseURLSource.class,source));

   }


Any comments?
Or bugfixes?


Argo



2008/8/7 Argo Vilberg <[EMAIL PROTECTED]>

> hi,
>
>
> I have situation.
> User authentication is over https and client authentication(estonian
> ID-Card www.id.ee).
>
>
> So authentication is occord after i use https protocol.
>
> 1 page Start page is http
>
> 2 page Login page is https(here are ID authentication)
> After succesfull autentication i tried in onActivation and also
> PageEndRender(and so on methods) to redirect to another page(roleChooser)
> But this is working in firefox  and ie7, but not in ie6.
>
> 3 page are rolechooser page https.
>
>
> Logical request process was:
>
> Start.page(http) -> Login.page(HTTPS)-> onActivate(redirect to
> rolechooser(https)
>
>
> If use only http protocol, everthing works fine.
> If use only https protocol, everthing works fine.
> (start.page https- login.page https- rolechooser.page https)
>
> Any ideas?
>
> Argo
>
>
>
>
>
>
>
>
> After
>


Re: Snapshot repository down - alternative?

2008-08-09 Thread Dragan Djuric

I tried building Tapestry from the source with no luck: some tests fail. So,
I really have to wait Snapshot rep to become available.
Here is the console output of this unsuccessfull build:
--
 T E S T S
---
Running TestSuite
[ERROR] SerializationSupport Setting a new service proxy provider when
there's already an existing provider. This may indicate that you have
multiple IoC Registries.
[ERROR] SerializationSupport Setting a new service proxy provider when
there's already an existing provider. This may indicate that you have
multiple IoC Registries.
[ERROR] SerializationSupport Setting a new service proxy provider when
there's already an existing provider. This may indicate that you have
multiple IoC Registries.
[ERROR] Pingable Construction of service Pingable failed: Error invoking
constructor
org.apache.tapestry5.ioc.internal.ExceptionInConstructorServiceImpl() (at
ExceptionInConstructorServiceImpl.java:23) (for service 'Pingable'): Yes, we
have no tomatoes.
java.lang.RuntimeException: Error invoking constructor
org.apache.tapestry5.ioc.internal.ExceptionInConstructorServiceImpl() (at
ExceptionInConstructorServiceImpl.java:23) (for service 'Pingable'): Yes, we
have no tomatoes.
at
org.apache.tapestry5.ioc.internal.ConstructorServiceCreator.createObject(ConstructorServiceCreator.java:63)
at
org.apache.tapestry5.ioc.internal.SingletonServiceLifecycle.createService(SingletonServiceLifecycle.java:29)
at
org.apache.tapestry5.ioc.internal.LifecycleWrappedServiceCreator.createObject(LifecycleWrappedServiceCreator.java:52)
at
org.apache.tapestry5.ioc.internal.InterceptorStackBuilder.createObject(InterceptorStackBuilder.java:50)
at
org.apache.tapestry5.ioc.internal.RecursiveServiceCreationCheckWrapper.createObject(RecursiveServiceCreationCheckWrapper.java:60)
at
org.apache.tapestry5.ioc.internal.services.JustInTimeObjectCreator.createObject(JustInTimeObjectCreator.java:65)
at $Pingable_11ba777c860.delegate($Pingable_11ba777c860.java)
at $Pingable_11ba777c860.ping($Pingable_11ba777c860.java)
at
org.apache.tapestry5.ioc.IntegrationTest.exception_in_autobuild_service_constructor(IntegrationTest.java:380)
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:597)
at
org.testng.internal.MethodHelper.invokeMethod(MethodHelper.java:552)
at org.testng.internal.Invoker.invokeMethod(Invoker.java:411)
at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:785)
at
org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:114)
at org.testng.TestRunner.privateRun(TestRunner.java:693)
at org.testng.TestRunner.run(TestRunner.java:574)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:241)
at org.testng.SuiteRunner.run(SuiteRunner.java:145)
at org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:901)
at org.testng.TestNG.runSuitesLocally(TestNG.java:863)
at org.testng.TestNG.run(TestNG.java:613)
at
org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:77)
at
org.apache.maven.surefire.testng.TestNGXmlTestSuite.execute(TestNGXmlTestSuite.java:92)
at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
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:597)
at
org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:334)
at
org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:980)
Caused by: java.lang.RuntimeException: Yes, we have no tomatoes.
at
org.apache.tapestry5.ioc.internal.ExceptionInConstructorServiceImpl.(ExceptionInConstructorServiceImpl.java:24)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at
org.apache.tapestry5.ioc.internal.ConstructorServiceCreator.createObject(ConstructorServiceCreator.java:52)
... 32 more
[ERROR] UnknownScope Construction of service UnknownScope failed: Unknown
service scope 'magic'.
java.lang.RuntimeException: Unknown service scope 'magic'.
at
org

Re: [T5] How to handle DAOs?

2008-08-09 Thread Sven Homburg
myself is using the chenillekit modules
for my own customer projects but the libraries
are poorly documented.

for the future i suggest the using of chenillekit
http://code.google.com/p/chenillekit/

2008/8/9 Onno Scheffers <[EMAIL PROTECTED]>

> Hi Sven,
>
> you are right, that does help me, thanks a lot!
>
> It's quite different from the directions the official tapestry-hibernate
> user guide gave me about DAOs, but it works very well.
> Just wondering if the code in the t5c-contrib package is production-ready?
>
> regards,
>
> Onno Scheffers
>
>
>
> 2008/8/9 Sven Homburg <[EMAIL PROTECTED]>
>
> > eventualy this helps you
> > http://87.193.218.134:8080/t5components/t5c-contrib/howto_dao.html
> >
> > 2008/8/9 Onno Scheffers <[EMAIL PROTECTED]>
> >
> > > Hi,
> > >
> > > I am having some troubles figuring out the proper way to use DAO
> services
> > > using tapestry-hibernate. The documentation describes how to write the
> > DAO
> > > service interfaces and how to register them, but it doesn't show an
> > example
> > > of an actual DAO implementation.
> > >
> > > As far as I know I cannot inject a Hibernate Session into the DAO
> service
> > > implementation, so I must create a constructor for that.
> > > If I do that it works fine, but every example I was able to find (not
> > > many!)
> > > seem to use the default scope for the DAO service, which is singleton.
> It
> > > works on my local machine, but I don't quite understand how this would
> > work
> > > in a multi-user, multi-threaded environment. Shouldn't the scope be
> > > perthread?
> > >
> > > Does anyone have a bit of example code for a DAO interface, its
> > > implementation and the way they are registered in the AppModule?
> > >
> > >
> > > regards,
> > >
> > > Onno
> > >
> >
> >
> >
> > --
> > with regards
> > Sven Homburg
> > http://tapestry5-components.googlecode.com
> > http://chenillekit.googlecode.com
> >
>



-- 
with regards
Sven Homburg
http://tapestry5-components.googlecode.com
http://chenillekit.googlecode.com


Re: Snapshot repository down - alternative?

2008-08-09 Thread Toby Hobson
The repo isn't working for me (in England) :-(

Toby

2008/8/9 Dragan Djuric <[EMAIL PROTECTED]>

>
> Hi,
>
> It seems that the repository at
> http://tapestry.formos.com/maven-snapshot-repository is down (at least I
> cannot access it). Due to other dependencies and code refactoring I cannot
> use versions earlier then the latest snapshot.
> Two short questions:
> 1. What is the problem with the repository and when you expect it to be
> available (maybe it's a matter of someone issuing one command to unblock
> it,
> or maybe it works for other people)?
> 2. Is there an alternative location (mirror)?
> --
> View this message in context:
> http://www.nabble.com/Snapshot-repository-down---alternative--tp18903369p18903369.html
> 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: [T5] How to handle DAOs?

2008-08-09 Thread Onno Scheffers
Hi Sven,

you are right, that does help me, thanks a lot!

It's quite different from the directions the official tapestry-hibernate
user guide gave me about DAOs, but it works very well.
Just wondering if the code in the t5c-contrib package is production-ready?

regards,

Onno Scheffers



2008/8/9 Sven Homburg <[EMAIL PROTECTED]>

> eventualy this helps you
> http://87.193.218.134:8080/t5components/t5c-contrib/howto_dao.html
>
> 2008/8/9 Onno Scheffers <[EMAIL PROTECTED]>
>
> > Hi,
> >
> > I am having some troubles figuring out the proper way to use DAO services
> > using tapestry-hibernate. The documentation describes how to write the
> DAO
> > service interfaces and how to register them, but it doesn't show an
> example
> > of an actual DAO implementation.
> >
> > As far as I know I cannot inject a Hibernate Session into the DAO service
> > implementation, so I must create a constructor for that.
> > If I do that it works fine, but every example I was able to find (not
> > many!)
> > seem to use the default scope for the DAO service, which is singleton. It
> > works on my local machine, but I don't quite understand how this would
> work
> > in a multi-user, multi-threaded environment. Shouldn't the scope be
> > perthread?
> >
> > Does anyone have a bit of example code for a DAO interface, its
> > implementation and the way they are registered in the AppModule?
> >
> >
> > regards,
> >
> > Onno
> >
>
>
>
> --
> with regards
> Sven Homburg
> http://tapestry5-components.googlecode.com
> http://chenillekit.googlecode.com
>


Snapshot repository down - alternative?

2008-08-09 Thread Dragan Djuric

Hi,

It seems that the repository at
http://tapestry.formos.com/maven-snapshot-repository is down (at least I
cannot access it). Due to other dependencies and code refactoring I cannot
use versions earlier then the latest snapshot.
Two short questions:
1. What is the problem with the repository and when you expect it to be
available (maybe it's a matter of someone issuing one command to unblock it,
or maybe it works for other people)?
2. Is there an alternative location (mirror)?
-- 
View this message in context: 
http://www.nabble.com/Snapshot-repository-down---alternative--tp18903369p18903369.html
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: T5: Form using Zone with two submits - possible bug?

2008-08-09 Thread Stephane Decleire

Hi Mike,

This is a bug tracked in JIRA as TAPESTRY-2324 and TAPESTRY-2505.

Stephane

Mike Leonardo a écrit :

Hello,
I have a form that uses the zone parameter so that the submission is handled as 
an Ajax reload.
The problem is that my form has two submit buttons, but Tapestry seems to always trigger the "selected" event for the first button, regardless of which one I click. 


I've created this small test page to prove it to myself:

MyTestPage.tml
--


Value: ${value}







MyTestPage.java
---
public class MyTestPage {
@Property private int value;
@InjectComponent private Form form;

void onSelectedFromFirstButton() {
System.out.println("Reached First Button");
}

void onSelectedFromSecondButton() {
System.out.println("Reached Second Button");
}
}

Only my method "OnSelectedFromFirstButton" is visited, never the 
"OnSelectedFromSecondButton".
I also tried an onchange javascript event to just submit the form (i.e. not 
pushing any buttons) and it still triggers the first button event.
Is this is a bug, or do I not understand how this works?

Thanks for any help!
- Mike



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

  


Re: [T5] How to handle DAOs?

2008-08-09 Thread Sven Homburg
eventualy this helps you
http://87.193.218.134:8080/t5components/t5c-contrib/howto_dao.html

2008/8/9 Onno Scheffers <[EMAIL PROTECTED]>

> Hi,
>
> I am having some troubles figuring out the proper way to use DAO services
> using tapestry-hibernate. The documentation describes how to write the DAO
> service interfaces and how to register them, but it doesn't show an example
> of an actual DAO implementation.
>
> As far as I know I cannot inject a Hibernate Session into the DAO service
> implementation, so I must create a constructor for that.
> If I do that it works fine, but every example I was able to find (not
> many!)
> seem to use the default scope for the DAO service, which is singleton. It
> works on my local machine, but I don't quite understand how this would work
> in a multi-user, multi-threaded environment. Shouldn't the scope be
> perthread?
>
> Does anyone have a bit of example code for a DAO interface, its
> implementation and the way they are registered in the AppModule?
>
>
> regards,
>
> Onno
>



-- 
with regards
Sven Homburg
http://tapestry5-components.googlecode.com
http://chenillekit.googlecode.com