Re: Generic DAO

2012-08-30 Thread Dmitry Gusev
Hi Markus!

> Stuff that is unique to an entity is handled by named queries defined in
the entities.

Can you share an example?

On Fri, Aug 31, 2012 at 10:10 AM, Markus Grell  wrote:

> Greetings!
>
> I'm no expert at all for this topic but I can't see your problem with
> generic DAOs. I wrote a couple of typical database apps and they all use
> generic DAOs. Stuff that is unique to an entity is handled by named
> queries defined in the entities.
>
> Works great and saves a lot of code to write.
>
> Markus
>
> > Why do you ever need such a generic DAOs at all?
> >
> >
> > For example, here's how my DAOs look like:
> > http://imgbin.org/images/9339.png
> >
> >
> > There's not so much common between them and I'm sure you will have
> > similar structure.
> >
> > You may also have some class hierarchy for you DAOs (say all your DAOs
> > will inherit CRUD methods from GenericDAO), but this doesn't relate to
> > Tapestry
> > at all.
> >
> > To let Tapestry create *instances* of your DAOs for you (with dependency
> > injection and all cool stuff) you should declare your DAOs in your
> > AppModule like this:
> >
> >
> > public static void bind(ServiceBinder binder) throws
> > ClassNotFoundException
> > {
> > binder.bind(UserDAO.class, UserDAOImpl.class); // etc.
> > }
> >
> >
> > Or you can try to auto-bind them like described here:
> >
> >
> >
> http://killertilapia.blogspot.com/2012/08/autobind-all-tapestry5-services
> > .html
> >
> >
> > On Fri, Aug 31, 2012 at 2:15 AM, Miguel O. Carvajal <
> > tapes...@carvajalonline.com> wrote:
> >
> >> Hey all,
> >>
> >>
> >> I am taking a look again at how we have implemented a generic DAO in
> >> our Tapestry application, since our currently implementation is a bit
> >> hackish.
> >>
> >> I was looking at the great article over at
> >> http://tawus.wordpress.com/**
> >> 2011/05/28/tapestry-magic-13-**generic-data-access-objects/<
> http://tawus
> >> .wordpress.com/2011/05/28/tapestry-magic-13-generic-data-access-objects
> >> />
> >>
> >>
> >> And while I do see it as an option, it seems a bit verbose for doing
> >> something that maybe I can do with less code in Tapestry.
> >>
> >> I saw in the issue 2550 (https://issues.apache.org/**
> >> jira/browse/TAPESTRY-2550<
> https://issues.apache.org/jira/browse/TAPESTRY
> >> -2550>)
> >> that ServiceBuilder was created exactly for this purpose, but since I
> >> have no way of determining the generic type (or other way of determining
> >> what Hibernate/JPA entity I am working with) within the ServiceBuilder
> >> implementation. I just don't see how this can be done with
> >> ServiceBuilder.
> >>
> >>
> >> Is there something obvious I am missing or is the article I mentioned
> >> above the only way it can be done?
> >>
> >> Thanks,
> >>
> >>
> >> Miguel
> >>
> >>
> >> --**--**---
> >> --
> >> To unsubscribe, e-mail:
> >> users-unsubscribe@tapestry.**apache.org >> he.org> For additional commands, e-mail: users-h...@tapestry.apache.org
> >>
> >>
> >>
> >
> >
> > --
> > Dmitry Gusev
> >
> >
> > AnjLab Team
> > http://anjlab.com
> >
> >
>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


-- 
Dmitry Gusev

AnjLab Team
http://anjlab.com


Re: Generic DAO

2012-08-30 Thread Markus Grell
Greetings!

I'm no expert at all for this topic but I can't see your problem with
generic DAOs. I wrote a couple of typical database apps and they all use
generic DAOs. Stuff that is unique to an entity is handled by named
queries defined in the entities.

Works great and saves a lot of code to write.

Markus

> Why do you ever need such a generic DAOs at all?
>
>
> For example, here's how my DAOs look like:
> http://imgbin.org/images/9339.png
>
>
> There's not so much common between them and I'm sure you will have
> similar structure.
>
> You may also have some class hierarchy for you DAOs (say all your DAOs
> will inherit CRUD methods from GenericDAO), but this doesn't relate to
> Tapestry
> at all.
>
> To let Tapestry create *instances* of your DAOs for you (with dependency
> injection and all cool stuff) you should declare your DAOs in your
> AppModule like this:
>
>
> public static void bind(ServiceBinder binder) throws
> ClassNotFoundException
> {
> binder.bind(UserDAO.class, UserDAOImpl.class); // etc.
> }
>
>
> Or you can try to auto-bind them like described here:
>
>
> http://killertilapia.blogspot.com/2012/08/autobind-all-tapestry5-services
> .html
>
>
> On Fri, Aug 31, 2012 at 2:15 AM, Miguel O. Carvajal <
> tapes...@carvajalonline.com> wrote:
>
>> Hey all,
>>
>>
>> I am taking a look again at how we have implemented a generic DAO in
>> our Tapestry application, since our currently implementation is a bit
>> hackish.
>>
>> I was looking at the great article over at
>> http://tawus.wordpress.com/**
>> 2011/05/28/tapestry-magic-13-**generic-data-access-objects/> .wordpress.com/2011/05/28/tapestry-magic-13-generic-data-access-objects
>> />
>>
>>
>> And while I do see it as an option, it seems a bit verbose for doing
>> something that maybe I can do with less code in Tapestry.
>>
>> I saw in the issue 2550 (https://issues.apache.org/**
>> jira/browse/TAPESTRY-2550> -2550>)
>> that ServiceBuilder was created exactly for this purpose, but since I
>> have no way of determining the generic type (or other way of determining
>> what Hibernate/JPA entity I am working with) within the ServiceBuilder
>> implementation. I just don't see how this can be done with
>> ServiceBuilder.
>>
>>
>> Is there something obvious I am missing or is the article I mentioned
>> above the only way it can be done?
>>
>> Thanks,
>>
>>
>> Miguel
>>
>>
>> --**--**---
>> --
>> To unsubscribe, e-mail:
>> users-unsubscribe@tapestry.**apache.org> he.org> For additional commands, e-mail: users-h...@tapestry.apache.org
>>
>>
>>
>
>
> --
> Dmitry Gusev
>
>
> AnjLab Team
> http://anjlab.com
>
>



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



Re: Generic DAO

2012-08-30 Thread Dmitry Gusev
Hi!

Why do you ever need such a generic DAOs at all?

For example, here's how my DAOs look like: http://imgbin.org/images/9339.png

There's not so much common between them and I'm sure you will have similar
structure.

You may also have some class hierarchy for you DAOs (say all your DAOs will
inherit CRUD methods from GenericDAO), but this doesn't relate to Tapestry
at all.

To let Tapestry create *instances* of your DAOs for you (with dependency
injection and all cool stuff) you should declare your DAOs in your
AppModule like this:

public static void bind(ServiceBinder binder) throws ClassNotFoundException
{
binder.bind(UserDAO.class, UserDAOImpl.class);
// etc.
}

Or you can try to auto-bind them like described here:

http://killertilapia.blogspot.com/2012/08/autobind-all-tapestry5-services.html

On Fri, Aug 31, 2012 at 2:15 AM, Miguel O. Carvajal <
tapes...@carvajalonline.com> wrote:

> Hey all,
>
> I am taking a look again at how we have implemented a generic DAO in our
> Tapestry application, since our currently implementation is a bit hackish.
>
> I was looking at the great article over at http://tawus.wordpress.com/**
> 2011/05/28/tapestry-magic-13-**generic-data-access-objects/
>
> And while I do see it as an option, it seems a bit verbose for doing
> something that maybe I can do with less code in Tapestry.
>
> I saw in the issue 2550 (https://issues.apache.org/**
> jira/browse/TAPESTRY-2550)
> that ServiceBuilder was created exactly for this purpose, but since I have
> no way of determining the generic type (or other way of determining what
> Hibernate/JPA entity I am working with) within the ServiceBuilder
> implementation. I just don't see how this can be done with ServiceBuilder.
>
> Is there something obvious I am missing or is the article I mentioned
> above the only way it can be done?
>
> Thanks,
>
> Miguel
>
> --**--**-
> To unsubscribe, e-mail: 
> users-unsubscribe@tapestry.**apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


-- 
Dmitry Gusev

AnjLab Team
http://anjlab.com


Re: T5 Auto Binding of DAOs

2012-08-30 Thread Dmitry Gusev
There's a typo in the code snippet, should be:

String className = interfacesPackage.getName() + ".impl." +
intf.getSimpleName() + "Impl";

We need just package name, not its toString() presentation which is
"package com.x.y.z"

On Thu, Aug 16, 2012 at 11:34 AM, Dmitry Gusev wrote:

> Thanks for sharing, Norman!
>
> Here's mine implementation:
>
> public static void bind(ServiceBinder binder) throwsClassNotFoundException
>
> {
>
> autobindServices(binder, ProjectDAO.class.getPackage());
>
> autobindServices(binder, ProjectManager.class.getPackage());
>
>
>
> ...
>
> }
>
>
> @SuppressWarnings({"unchecked", "rawtypes"})
>
> private static void autobindServices(ServiceBinder binder, Package
> interfacesPackage) throws ClassNotFoundException
>
> {
>
> List> interfaces =
> Utils.getClassesForPackage(interfacesPackage.getName());
>
> for (Class intf : interfaces) {
>
> String className = interfacesPackage + ".impl." +
> intf.getSimpleName() + "Impl";
>
> try {
>
> Class impl = Class.forName(className);
>
> binder.bind(intf, impl);
>
> }
>
> catch (ClassNotFoundException e) {
>
> logger.warn("Class not found during autobinding: {}",
> className);
>
> }
>
> }
>
> }
>
>
> On Thu, Aug 16, 2012 at 2:33 AM, Norman Franke  wrote:
>
>> Something similar was asked in another thread, but I figured others may
>> find this helpful.
>>
>> I wanted to automatically bind my interfaces and implementations of my
>> numerous DAOs in my AppModule. It's pretty easy, so here is what I idd.
>> This is called from the bind static method. Obviously you'd need to change
>> the package names. My naming convention is to put the implementation
>> packages in a sub ".impl" package, e.g. com.myasd.db.dao.impl in my case.
>> Classes then are suffixed with "Impl" to make Eclipse's package
>> auto-complete suggestions work better. I've been using this for a few
>> years, at lest.
>>
>> @SuppressWarnings({ "unchecked", "rawtypes" })
>> static void bindDAOs(ServiceBinder binder) {
>> try {
>> ClassLoader contextClassLoader =
>> Thread.currentThread().getContextClassLoader();
>> List> daos =
>> PackageEnumerator.getClassesForPackage("com.myasd.db.dao");
>> for (Class dao : daos) {
>> String pkg = dao.getPackage().getName();
>> String cls = dao.getSimpleName();
>> try {
>> Class impl =
>> contextClassLoader.loadClass(pkg+".impl."+cls+"Impl");
>> binder.bind(dao,
>> impl).scope(ScopeConstants.PERTHREAD);
>> } catch (ClassNotFoundException e) {
>> // Ignore, we just won't bind that class.
>> }
>> }
>> } catch (ClassNotFoundException e) {
>> e.printStackTrace();
>> }
>> }
>>
>>
>> Helper method borrowed from who-knows-where:
>>
>> public static List> getClassesForPackage(String packageName)
>> throws ClassNotFoundException {
>> // This will hold a list of directories matching the pckgname.
>> // There may be more than one if a package is split over multiple
>> // jars/paths
>> List> classes = new ArrayList>();
>> ArrayList directories = new ArrayList();
>> try {
>> ClassLoader cld =
>> Thread.currentThread().getContextClassLoader();
>> if (cld == null) {
>> throw new ClassNotFoundException("Can't get class
>> loader.");
>> }
>> // Ask for all resources for the path
>> Enumeration resources =
>> cld.getResources(packageName.replace('.', '/'));
>> while (resources.hasMoreElements()) {
>> URL res = resources.nextElement();
>> if (res.getProtocol().equalsIgnoreCase("jar")) {
>> JarURLConnection conn = (JarURLConnection)
>> res.openConnection();
>> JarFile jar = conn.getJarFile();
>> for (JarEntry e : Collections.list(jar.entries())) {
>>
>> if
>> (e.getName().startsWith(packageName.replace('.', '/')) &&
>> e.getName().endsWith(".class")
>> && !e.getName().contains("$")) {
>> String className = e.getName().replace("/",
>> ".").substring(0, e.getName().length() - 6);
>> System.out.println(className);
>> classes.add(Class.forName(className));
>> }
>> }
>> } else
>> directories.add(new
>> File(URLDecoder.decode(res.getPath(), "UTF-8")));
>> }
>> } catch (NullPointerException x) {
>> throw new ClassNotFoundException(packageName + 

Re: Generic DAO

2012-08-30 Thread Miguel O. Carvajal

Thanks for the reply Thiago.

I see what you mean, but then doing this requires me to create a new 
ServiceBuilder instance for each entity. This can get pretty lengthy 
with an application that has a lot of entities.


This is why I was looking for a way to automagically create a generic 
DAO instance for each entity.


Any other ideas?

Obrigado,

Miguel


On 30.08.2012 18:27, Thiago H de Paula Figueiredo wrote:

On Thu, 30 Aug 2012 19:15:11 -0300, Miguel O. Carvajal
 wrote:


Hey all,


Hi!

I saw in the issue 2550  
(https://issues.apache.org/jira/browse/TAPESTRY-2550) that  
ServiceBuilder was created exactly for this purpose, but since I have 
no  way of determining the generic type (or other way of determining 
what  Hibernate/JPA entity I am working with) within the 
ServiceBuilder  implementation. I just don't see how this can be done 
with  ServiceBuilder.


ServiceBuilder is an interface, so you should create at least one
implementation for it. Pass the entity class in the constructor of
your  ServiceBuilder implementation. Something like this (not 
tested):


public class DaoBuilder implements DaoBuilder {
final private Class entityClass;
public DaoBuilder(Class entityclass) {
this.entityClass = entityClass;
}
Dao buildService(ServiceResources resources) {
// use entityClass to create the Dao and return it.
}
}



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



Re: Tapestry 5 code completion for TML files

2012-08-30 Thread Bob Harner
You could add a new page to http://wiki.apache.org/tapestry/ if you
want. There's a "Tapestry IDE Support" section about half way down.

On Thu, Aug 30, 2012 at 3:21 PM, ZiciuM  wrote:
> I have template for Tapestry in NetBeans, if you want I can post it so
> somewhere on the net, if needed?
>
>
>
> --
> View this message in context: 
> http://tapestry.1045711.n5.nabble.com/Tapestry-5-code-completion-for-TML-files-tp5715916p5715922.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>

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



Re: Generic DAO

2012-08-30 Thread Thiago H de Paula Figueiredo
On Thu, 30 Aug 2012 19:15:11 -0300, Miguel O. Carvajal  
 wrote:



Hey all,


Hi!

I saw in the issue 2550  
(https://issues.apache.org/jira/browse/TAPESTRY-2550) that  
ServiceBuilder was created exactly for this purpose, but since I have no  
way of determining the generic type (or other way of determining what  
Hibernate/JPA entity I am working with) within the ServiceBuilder  
implementation. I just don't see how this can be done with  
ServiceBuilder.


ServiceBuilder is an interface, so you should create at least one  
implementation for it. Pass the entity class in the constructor of your  
ServiceBuilder implementation. Something like this (not tested):


public class DaoBuilder implements DaoBuilder {
final private Class entityClass;
public DaoBuilder(Class entityclass) {
this.entityClass = entityClass;
}
Dao buildService(ServiceResources resources) {
// use entityClass to create the Dao and return it.
}
}

--
Thiago H. de Paula Figueiredo

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



Generic DAO

2012-08-30 Thread Miguel O. Carvajal

Hey all,

I am taking a look again at how we have implemented a generic DAO in 
our Tapestry application, since our currently implementation is a bit 
hackish.


I was looking at the great article over at 
http://tawus.wordpress.com/2011/05/28/tapestry-magic-13-generic-data-access-objects/


And while I do see it as an option, it seems a bit verbose for doing 
something that maybe I can do with less code in Tapestry.


I saw in the issue 2550 
(https://issues.apache.org/jira/browse/TAPESTRY-2550) that 
ServiceBuilder was created exactly for this purpose, but since I have no 
way of determining the generic type (or other way of determining what 
Hibernate/JPA entity I am working with) within the ServiceBuilder 
implementation. I just don't see how this can be done with 
ServiceBuilder.


Is there something obvious I am missing or is the article I mentioned 
above the only way it can be done?


Thanks,

Miguel

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



Re: Tapestry 5.3.5

2012-08-30 Thread robert baker
Tapestry Team,

It should be explicitly said: Thanks for the continued development on
Tapestry 5.

Les Baker

On Thu, Aug 30, 2012 at 2:42 PM, Christian Riedel
 wrote:
> Yay, that would make 2 more releases before christmas!
>
>
> Am 30.08.2012 um 19:47 schrieb Howard Lewis Ship:
>
>> Catch it while it's hot!  Yet another bug fix release for 5.3:
>>
>> Apache Tapestry 5.3.5
>>
>> http://tapestry.apache.org/2012/08/30/announcing-tapestry-535.html
>>
>> There may be an issue with DateField inside Internet Explorer that
>> will have to be addressed in 5.3.6.  Since the switch from SVN to Git
>> (and from Maven to Gradle) it has become much easier to backport fixes
>> and generate releases.  We've created six releases since last November
>> ... that's about one every two months.
>>
>> --
>> Howard M. Lewis Ship
>>
>> Creator of Apache Tapestry
>>
>> The source for Tapestry training, mentoring and support. Contact me to
>> learn how I can get you up and productive in Tapestry fast!
>>
>> (971) 678-5210
>> http://howardlewisship.com
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>> For additional commands, e-mail: users-h...@tapestry.apache.org
>>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>

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



Re: Tapestry 5 code completion for TML files

2012-08-30 Thread ZiciuM
I have template for Tapestry in NetBeans, if you want I can post it so
somewhere on the net, if needed?



--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Tapestry-5-code-completion-for-TML-files-tp5715916p5715922.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

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



Re: Tapestry Hibernate Statistics class

2012-08-30 Thread ZiciuM
Not bad at all! I am now tickled about how to upgrade this to monitor some
more processes about Hibernate and in general Tapestry flows.



--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Tapestry-Hibernate-Statistics-class-tp5715906p5715921.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

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



Re: Tapestry 5.3.5

2012-08-30 Thread Christian Riedel
Yay, that would make 2 more releases before christmas! 


Am 30.08.2012 um 19:47 schrieb Howard Lewis Ship:

> Catch it while it's hot!  Yet another bug fix release for 5.3:
> 
> Apache Tapestry 5.3.5
> 
> http://tapestry.apache.org/2012/08/30/announcing-tapestry-535.html
> 
> There may be an issue with DateField inside Internet Explorer that
> will have to be addressed in 5.3.6.  Since the switch from SVN to Git
> (and from Maven to Gradle) it has become much easier to backport fixes
> and generate releases.  We've created six releases since last November
> ... that's about one every two months.
> 
> -- 
> Howard M. Lewis Ship
> 
> Creator of Apache Tapestry
> 
> The source for Tapestry training, mentoring and support. Contact me to
> learn how I can get you up and productive in Tapestry fast!
> 
> (971) 678-5210
> http://howardlewisship.com
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
> 


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



Re: Tapestry 5 code completion for TML files

2012-08-30 Thread Dmitry Gusev
Hi,

Try this one:
http://code.google.com/p/tapestrytools/wiki/Install_Guide_Lightweight_TapestryTools

On Thu, Aug 30, 2012 at 9:33 PM, Diego Barreto  wrote:

> Hi,
>
> I'm new to Tapestry development and i would like to know if anyone here
> uses Tapestry 5 in Netbeans 7 and has the "code completion" or "code
> sugestion" for the TML files? I try to search but i cannot make it works in
> Netbeans or Eclipse. I can compile and run the project in the two IDEs but
> without the code completion for the TML files.
>
> I tried to use the plugin http://github.com/exanpe/tapestry-tldgen to
> generate the TLD to import in Eclipse, but i don't know why, this plugins
> fails to use my tools.jar. I'm using Mac OS.
>
> Thanks,
>
> Diego Barreto
>



-- 
Dmitry Gusev

AnjLab Team
http://anjlab.com


Re: Tapestry 5 code completion for TML files

2012-08-30 Thread Thiago H de Paula Figueiredo
On Thu, 30 Aug 2012 14:33:40 -0300, Diego Barreto   
wrote:



Hi,


Hi!


I'm new to Tapestry development and i would like to know if anyone here
uses Tapestry 5 in Netbeans 7 and has the "code completion" or "code
sugestion" for the TML files? I try to search but i cannot make it works  
in Netbeans or Eclipse. I can compile and run the project in the two  
IDEs but without the code completion for the TML files.


I tried to use the plugin http://github.com/exanpe/tapestry-tldgen to
generate the TLD to import in Eclipse, but i don't know why, this plugins
fails to use my tools.jar. I'm using Mac OS.


Try this instead: http://code.google.com/p/tapestrytools/

--
Thiago H. de Paula Figueiredo

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



Tapestry 5.3.5

2012-08-30 Thread Howard Lewis Ship
Catch it while it's hot!  Yet another bug fix release for 5.3:

Apache Tapestry 5.3.5

http://tapestry.apache.org/2012/08/30/announcing-tapestry-535.html

There may be an issue with DateField inside Internet Explorer that
will have to be addressed in 5.3.6.  Since the switch from SVN to Git
(and from Maven to Gradle) it has become much easier to backport fixes
and generate releases.  We've created six releases since last November
... that's about one every two months.

-- 
Howard M. Lewis Ship

Creator of Apache Tapestry

The source for Tapestry training, mentoring and support. Contact me to
learn how I can get you up and productive in Tapestry fast!

(971) 678-5210
http://howardlewisship.com

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



Tapestry 5 code completion for TML files

2012-08-30 Thread Diego Barreto
Hi,

I'm new to Tapestry development and i would like to know if anyone here
uses Tapestry 5 in Netbeans 7 and has the "code completion" or "code
sugestion" for the TML files? I try to search but i cannot make it works in
Netbeans or Eclipse. I can compile and run the project in the two IDEs but
without the code completion for the TML files.

I tried to use the plugin http://github.com/exanpe/tapestry-tldgen to
generate the TLD to import in Eclipse, but i don't know why, this plugins
fails to use my tools.jar. I'm using Mac OS.

Thanks,

Diego Barreto


Re: [t5.3.4] What does (zone="^") mean ?

2012-08-30 Thread Muhammad Gelbana
I originally tried that on google (searched the whole tapestry "site:") but
I obviously failed to escape ^ as a special character on google.

Thanks for the link.

On Thu, Aug 30, 2012 at 6:28 PM, Bob Harner  wrote:

> Longer answer: search for ^ at
> http://tapestry.apache.org/ajax-and-zones.html
>
> On Thu, Aug 30, 2012 at 11:47 AM, Lenny Primak 
> wrote:
> > Short answer:  yes and yes.
> >
> >
> >
> > On Aug 30, 2012, at 10:27 AM, Muhammad Gelbana 
> wrote:
> >
> >> So what does (zone="^") mean ?!
> >>
> >> The .tml snippet is:
> >> increment (via
> >> Ajax)
> >>
> >> Does that mean to update the enclosing zone ? Is that documented
> somewhere ?
> >>
> >> --
> >> *Regards,*
> >> *Muhammad Gelbana
> >> Java Developer*
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> > For additional commands, e-mail: users-h...@tapestry.apache.org
> >
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


-- 
*Regards,*
*Muhammad Gelbana
Java Developer*


Re: [t5.3.4] What does (zone="^") mean ?

2012-08-30 Thread Bob Harner
Longer answer: search for ^ at http://tapestry.apache.org/ajax-and-zones.html

On Thu, Aug 30, 2012 at 11:47 AM, Lenny Primak  wrote:
> Short answer:  yes and yes.
>
>
>
> On Aug 30, 2012, at 10:27 AM, Muhammad Gelbana  wrote:
>
>> So what does (zone="^") mean ?!
>>
>> The .tml snippet is:
>> increment (via
>> Ajax)
>>
>> Does that mean to update the enclosing zone ? Is that documented somewhere ?
>>
>> --
>> *Regards,*
>> *Muhammad Gelbana
>> Java Developer*
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>

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



Re: Tapestry Hibernate Statistics class

2012-08-30 Thread Bob Harner
Does this provide what you're looking for?

http://tapestry.apache.org/hibernate-statistics.html

On Thu, Aug 30, 2012 at 8:20 AM, ZiciuM  wrote:
> I am reading Tap Hibernate src and I have found class Statistics in the
> package Tapestry Hibernate. I am not sure what does it do since only desc it
> has is "used for Hibernate stats". Is it possible to give more detailed
> introduction about this class. Thanks in advance.

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



Re: [t5.3.4] What does (zone="^") mean ?

2012-08-30 Thread Lenny Primak
Short answer:  yes and yes. 



On Aug 30, 2012, at 10:27 AM, Muhammad Gelbana  wrote:

> So what does (zone="^") mean ?!
> 
> The .tml snippet is:
> increment (via
> Ajax)
> 
> Does that mean to update the enclosing zone ? Is that documented somewhere ?
> 
> -- 
> *Regards,*
> *Muhammad Gelbana
> Java Developer*

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



[t5.3.4] What does (zone="^") mean ?

2012-08-30 Thread Muhammad Gelbana
So what does (zone="^") mean ?!

The .tml snippet is:
increment (via
Ajax)

Does that mean to update the enclosing zone ? Is that documented somewhere ?

-- 
*Regards,*
*Muhammad Gelbana
Java Developer*


Re: Passing form component into service

2012-08-30 Thread George Christman
Thanks Guys for the alternate suggestions. I'll keep them in mind when I run
into this again. For now the app is just to small to make it worth it. 



--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Passing-form-component-into-service-tp5715894p5715910.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

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



Re: Passing form component into service

2012-08-30 Thread Lance Java
The Form component implements FormValidationControl. If this interface
provides what you need, there is no need for a domain object.



--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Passing-form-component-into-service-tp5715894p5715909.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

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



Re: Passing form component into service

2012-08-30 Thread Thiago H de Paula Figueiredo
On Thu, 30 Aug 2012 10:33:45 -0300, George Christman  
 wrote:


Thanks Lance, management asked me to put all my validation's in a  
service, however I figured there would be an issue passing the tapestry  
form

component into the service. I think the domain object would be the best
option although I don't see any cost benefit in this extra layer of
abstraction.


You have absolutely nothing you can do with the Form component instance  
itself passed to a service, as you can't pull the values to be validated  
from it. You need to pass the service the object(s) being edited, as you  
said. On the other hand, you may pass the ValidationTracker so you can  
register errors in it directly.


--
Thiago H. de Paula Figueiredo

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



Re: Passing form component into service

2012-08-30 Thread George Christman
Thanks Lance, management asked me to put all my validation's in a service,
however I figured there would be an issue passing the tapestry form
component into the service. I think the domain object would be the best
option although I don't see any cost benefit in this extra layer of
abstraction. 



--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Passing-form-component-into-service-tp5715894p5715907.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

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



Populate second dropdown from database after first dropdown change

2012-08-30 Thread samifarooq

Hi

I want to populate the second drop down base on the first dropdown
selection, i need to get the data from database using the Tapestry 4.

Anyone has sample code in Tapestry 4.

Thanks
Sami



--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Populate-second-dropdown-from-database-after-first-dropdown-change-tp5715898.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

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



Tapestry Hibernate Statistics class

2012-08-30 Thread ZiciuM
I am reading Tap Hibernate src and I have found class Statistics in the
package Tapestry Hibernate. I am not sure what does it do since only desc it
has is "used for Hibernate stats". Is it possible to give more detailed
introduction about this class. Thanks in advance.



--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Tapestry-Hibernate-Statistics-class-tp5715906.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

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



Re: confused using tapestry page to return json data

2012-08-30 Thread Lance Java
After re-reading your code, I see that you have two onActivate() methods with
different parameter counts. Perhaps you are witnessing the behaviour
mentioned here
http://tapestry.1045711.n5.nabble.com/multiple-onActivate-methods-in-page-handler-td2434569.html

Whenever I need to handle a variable number of arguments, I always use a
SINGLE onActivate(EventContext) method. 





--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/confused-using-tapestry-page-to-return-json-data-tp5715865p5715904.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

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



Request Filter not called if declared with addInstance (vs add)

2012-08-30 Thread Lance Java
I think that you are seeing the expected behavior of OrderedConfiguration. By
specifying a constraint of "after:CheckForUpdates", you are not guaranteed
that your filter will occur directly after CheckForUpdates. You are only
guaranteed that it will occur at some stage after CheckForUpdates (possibly
last).

I *think* that you want to add one (or more) "before:X" constraints to
guarantee that your filter occurs before some other filter(s).

The diagram on this page might help
http://tapestry.apache.org/request-processing.html





--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Request-Filter-not-called-if-declared-with-addInstance-vs-add-tp5715859p5715903.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

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