Re: BeanEditForm and Polymorphism

2011-01-17 Thread Elin

Of course. I started with tapestry some months ago so im not an expert but i
will share everything im learning with others through tutorials (hopefully i
will end some by the end of this week). The hardest part of tapestry is
starting with it. If we all share our knoledge with newbies, it will be much
easier and more people will start using this great framework.
-- 
View this message in context: 
http://tapestry.1045711.n5.nabble.com/BeanEditForm-and-Polymorphism-tp3343510p3344123.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: BeanEditForm and Polymorphism

2011-01-17 Thread Elin

Thanks Werner. The problem here was that i wanted a generic method. At first,
i dont know what kind of subclasses are avaliable because they are managed
by a service so i can add more subclasses just annotating them and i will
have more subproducts avaliable without any code changes. Because of this, i
needed to work with the superclass type. Im going to explain it a bit more
because may be usefull for anybody else.

Think on a extensible shop. I have my base products with the basic fields
(Id, Name..).

At any time, i need some new kinds of products with different fields so i
create some subclasses of my base class Product.

The problem, as i said, is that at first, i dont know what kind of products
i have avaliable since its dinamic depending on the classes i added and may
change at any time depending on my needs and i want it to be extensible
without having to hardcode the changes for the new subproduct. I want it to
be added as a Product subclass, annotate it and get it working without more
changes. Because of this, i annotate these Product subclasses and through
annotations and reflections they are registered into a custom service.

Now i want a page where i can select some kind of product through a select
box and get a beanEditForm where i can create a new "subproduct". The
problem is that the beanEditForm has to accept a generic type (the
superclass) and adapt the fields to the kind of product selected. 

I solved it setting the beanEditForm model through a method, and this metod
creates the BeanModel based on the selected suproduct.

I will make a tutorial about this asap.

Hope you understand.

Thx again for your help ;)
-- 
View this message in context: 
http://tapestry.1045711.n5.nabble.com/BeanEditForm-and-Polymorphism-tp3343510p3344059.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: BeanEditForm and Polymorphism

2011-01-16 Thread Elin

Thanks a lot, i managed to solve my problem thanks to your advice.
-- 
View this message in context: 
http://tapestry.1045711.n5.nabble.com/BeanEditForm-and-Polymorphism-tp3343510p3343792.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



BeanEditForm and Polymorphism

2011-01-16 Thread Elin

Hi all.

Im developing a new project and im having some problems with BeanEditForm
and inheritance, maybe you can help me.

I have a base class called product.

>From that base class (abstract class or interface, doesnt matter) i have
different subproducts extending from this base class.

I want to create a page where i can create different types of products so i
have a dropdown menu, where i select the type of subproduct and i want to
create, deppending on the type of product selected.

My .tml will show something like this




My .java will be something like this


   private SubProduct subProduct;

public Product getMyProduct(){
return subProduct;
}


so the BeanEditForm will show the Product superclass fields but subProduct
specific fields wont be shown.

The problem is that the beanEditForm takes the parameters from the
supreclass/interface so i only have the supreclass attributes fields. Any
idea about how to do this? 

Thx in advance



-- 
View this message in context: 
http://tapestry.1045711.n5.nabble.com/BeanEditForm-and-Polymorphism-tp3343510p3343510.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: Discussion- the verdict

2011-01-13 Thread Elin

I started  with tapestry 5.1.2 some months ago thanks to a book called
"Tapestry 5" from "Alexander Kolesnikov". It was a bit hard to understand
how to create sites with this framework and yes, i also noticed the lack of
documentation but with each new release it went better. Each time i had a
problem i just came to this board and it was solved very fast, the
documentation has increased by a lot on the last months and its going better
and better very fast. A "Tapestry in Action" book is on the way too and i
think this framework is great.

I near left tapestry because of that kind of comments on some forums but
finally i decided not to and im very happy with my decision. Im starting to
understand a lot of new things and the way Tapestry+Hibernate work is just
great. Its very easy to create new modules and componentes even if they need
new Hibernate Entities, add this component to your maven dependencies and
its working and the new entities created and managed by Hibernate without
aditional configuration making extensibility easier and fast. 

I think tapestry, with a bit more documentation will be a great framework
and will make things easier and faster. Its hard to start? Yes... and i will
try to help with simple tutorials from my own experiences since i was a
totally newbie some months ago, but i think think in a short time, we will
get our reward. We just need to show the people how easy it is and the
potential it has.   
-- 
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Re-Discussion-the-verdict-tp3337928p3339859.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: MultiZoneUpdate position param

2010-12-06 Thread Elin

I was planning to create some kind of component for a web based chat
following this "news feed" tutorial:

http://blog.bolkey.com/2010/05/creating-a-news-feed-in-tapestry-5/

Take alook, may be usefull for you.
-- 
View this message in context: 
http://tapestry.1045711.n5.nabble.com/MultiZoneUpdate-position-param-tp3288052p3294757.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 custom component + hibernate

2010-11-08 Thread Elin

Problem solved. There was some kind of conflict with a previous version of my
entity... its working now ;)
-- 
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Tapestry-custom-component-hibernate-tp3254963p3255809.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 custom component + hibernate

2010-11-08 Thread Elin

Having problems again. My packaged component is working fine except the
hibernate part.

I have my main app and a custom componet packaged into a jar. This component
has:

com.udc.mylib.entities
com.udc.mylib.pages
com.udc.mylib.services
...


When i load the packaged component, its displayed correctly into my main
application but when it comes into action and hibernate part should work, it
fails giving me an exception:

Unknown entity: com.udc.mylib.entities.Hello

(Obviously my entity is called "Hello" and its into com.udc.mylib.entities
package)



When i try to add the package with 

public static void
contributeHibernateEntityPackageManager(Configuration configuration)
{
configuration.add("com.udc.mylib.entities");
}

i get an error saying:

Use of the same entity name twice: Hello

so i suppose it was correctly loaded but somehow, it cant be found.

Any advice?

Thx in advance

-- 
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Tapestry-custom-component-hibernate-tp3254963p3255669.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 custom component + hibernate

2010-11-08 Thread Elin

Thx a lot. I will keep investigating now until it works correctly now that i
know its possible.
-- 
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Tapestry-custom-component-hibernate-tp3254963p3254992.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 custom component + hibernate

2010-11-08 Thread Elin

Is it possible to create a component that uses some hibernate entities,
package it into a separated .jar and then import this component into my main
project being able to autocreate this new entities? 

Something like creating my custom component package following this tutorial
http://tapestry.apache.org/tapestry5.1/cookbook/lib.html

Inside that component, create the "entities" package like at any other
tapestry+hibernate project with my custom entities.

Will tapestry load those entities after adding this packaged component into
my project? so if i have the autocreate entities activated on the
hibernate.cfg.xml, those new entities will be added.


What im trying to do is an extensible application, where anyone can create
their own custom components, with the needed entities if this components
need to store their own data into the database, and being able to do this
without having to modify my main application. I just download the component
made by "someone", add it to my main project and i dont have to add the
mapping myself to my app because its included into that component. Hope you
understand what im trying to do. Would it be possible?

I would test myself but im still having troubles with components
packaging... 
-- 
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Tapestry-custom-component-hibernate-tp3254963p3254963.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

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



Re: How to display form success?

2010-09-15 Thread Elin

Im a bit newbie but im thinking that you could just check the boolean after
render is done and if the boolean is true, set it to false again :/
-- 
View this message in context: 
http://tapestry.1045711.n5.nabble.com/How-to-display-form-success-tp2840958p2841099.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: T5 Eventlink Query

2010-09-13 Thread Elin

Im just starting with tapestry but, why would you like to do that? As far as
i know, the eventlink is very similar to the actionlink, and its usually
used for some kind of ajax request. Could you explain a bit more what are
you trying to do with those 2 templates?
-- 
View this message in context: 
http://tapestry.1045711.n5.nabble.com/T5-Eventlink-Query-tp2837470p2837503.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

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



Re: How to set up Tapestry 5 on Tomcat 5

2010-09-12 Thread Elin

Well... if i understand u correctly u download tapestry from the website (so
u are not using maven). The needed libraries depends on what are u goning to
do. For a simple project you will need tapestry-core  and tapestry-ioc,
those are the main ones. Anyway, i would recommend u to use maven because
you need an specific files structure and its much easier with maven, since
its created automatically with it.

Take a look at http://tapestry.apache.org/tapestry5.2-dev/quickstart/

-- 
View this message in context: 
http://tapestry.1045711.n5.nabble.com/How-to-set-up-Tapestry-5-on-Tomcat-5-tp2836575p2836603.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 tree render without recursion?

2010-09-10 Thread Elin

Ok just found this
http://ars-machina.svn.sourceforge.net/viewvc/ars-machina/tapestry-crud/branches/1.1/src/main/java/br/com/arsmachina/tapestrycrud/components/TreeSelect.java?revision=595&view=markup
 
so i will take a look on it.

I will come back if i have some kind of problem with this. Just when i wrote
this message i found the link to this. Sorry for posting before searching a
bit more ;)
-- 
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Tapestry-tree-render-without-recursion-tp2834784p2834788.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 tree render without recursion?

2010-09-10 Thread Elin

Im making a component for rendering my categories tree but i have seen that i
cant use recursive components (calling themselves not even indirectly) so,
any advice about how to do this (your own ideas or something u have read
around)?


Example:


  
Coffee
  
Tea


  
Black tea
  
Green tea


  
  
Milk



Thx in advance

-- 
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Tapestry-tree-render-without-recursion-tp2834784p2834784.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


Re: Problem with components TML files

2010-09-09 Thread Elin

Thx a lot howard. U are always the man making the things easier for the
people whos starting with tapestry. I have seen the 2 different paths u are
talking about so i will try to configure my IDE with the different outputs.
Thx again ;)
-- 
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Problem-with-components-TML-files-tp2834319p2834331.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



Problem with components TML files

2010-09-09 Thread Elin

I created a simple project with Maven archetype (the 4.2.0 version from the
tapestry.apache.org catalog) . I open it on Netbans 6.9.1 as a maven
project, everything is ok, i create a custom component at the "components"
package adding the java and the .tml file. After adding this component to my
Index page I run this project on jetty and the page loads nice but the
custom component is not displayed. 

After looking into the compiled version, i see that the component TML page
is missing... just the component .class appears. If i manually add the .TML
file to the compiled folder, then the page displays my custom component
correctly but this should be done automatically by the compiler

Any idea? Am i doing something wrong? I was able to work without problems 1
month ago but after formatting my computer i changed my Netbeans version,
the tapestry version etc...
-- 
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Problem-with-components-TML-files-tp2834319p2834319.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 + GAE + Eclipse + Maven

2010-09-03 Thread Elin

Hi. Just discovered Google App Engine and im trying to upload 1 single
tapestry application to the server. Im using eclipse with the GAE plugin. I
made a new project with maven on the archetype 5.2.1. I imported it on
eclipse but i cant get it work with the GAE plugin. Any advice step by step
on this? Or any tutorial... if i create a new project with GAE eclipse
plugin it works but the project structure is different from the tapestry one
built after the maven archetype load(and atm im starting with tapestry... im
not an advance user :/ )

Thx in advance
-- 
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Tapestry-GAE-Eclipse-Maven-tp2802841p2802841.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



Capturing hibernate exception

2010-08-20 Thread Elin

I have a project where im using hibernate with Tapestry. Everything works
fine. Following the tutorials, i created my Hibernate entities, i created my
DAOs where i inject the hibernate session at and i use them for my data
access. The problem comes when my database fails (its down, unreachable or
whatever). I get a weird tapestry error page cause of the components trying
to access to data.

Is it possible to configure tapestry (or tomcat, dunno who should manage the
exception at this point) so i can capture if database connection with
hibernate fails and im redirected to a custom error page? Alternative
options are wellcome too.

Thx in advance.
-- 
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Capturing-hibernate-exception-tp2642048p2642048.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: Events and multizone update

2010-08-19 Thread Elin

Thx a lot. Thats all i needed :)
-- 
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Events-and-multizone-update-tp2641385p2641538.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



Events and multizone update

2010-08-19 Thread Elin

I have a custom component based on an "ajaxformloop" that displays rows with
a delete buttom for them.

I need to update several zones afer deleting a row from the ajaxformloop and
cant find a way to do it. From here i have some questions about events (im
sorry im starting with tapestry and im a bit newbie)


- Since "onRemoveRow" event can only return void (cant return a
multizoneupdate), would be possible to capture when i delete a row and
update several zones from it?

- Is it possible to generate custom events on my custom components so i can
capture them into the pages i insert them into?

If you link me examples where i can see this and analize them it would be
enough. I couldnt find any by myself.

Thx in advance.
-- 
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Events-and-multizone-update-tp2641385p2641385.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: Update zones after session object changes

2010-08-18 Thread Elin

Thx a lot for your answers. Gonna experiment a bit with the information u
gave me. I will be back if i need help again. 

Thx a lot for your help 
-- 
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Update-zones-after-session-object-changes-tp2639152p2639567.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: Update zones after session object changes

2010-08-18 Thread Elin

The problem is that i know how to multiupdate. Thats not the problem. The
problem is that i need some kind of event for that. 

I have my page. Inside my page i have a custom component that displays the
shopping cart items with a delete buton for each one.

Well... i need some kind of event from my custom component that alerts the
page where its inserted that something has changed (an item has been deleted
fron the cart), so the page refreshes all the other components.
-- 
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Update-zones-after-session-object-changes-tp2639152p2639269.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



Update zones after session object changes

2010-08-18 Thread Elin

Hi. Im new to tapestry and im trying to do some projects but its a bit hard
because of the lack of documentation.

Well im doing a simple shopping cart. The cart is stored into my session and
im developing some components for showing the data.  I made this with the
ajaxformloop component so im able to delete a product from the shopping cart
with an ajax request. Everything works fine but i want other zones to be
notified someway so they reload their content (they show the cart content
too) updated after changes.

So:

I have a component developed by myself that recieves the shopping cart
stored into my session as parameter.



This shows a list of my shopping cart products with delete buttons for each
one and works fine but i have more components into my page showing this cart
contents and i want them to be updated (or notified that something has
changed) once i delete one product from the cart. I could reload the page
too but didnt want to (that way using ajaxformloop would be stupid... i
would use page redirections).

Is it possible?

Thx in advance 
-- 
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Update-zones-after-session-object-changes-tp2639152p2639152.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