Re: Lightweight TapestryTools update site

2012-10-04 Thread Davor Hrg
Hi,

I've just installed the TapestryTools but have no autocomplete in template
and CTRL+R is not working ... actually CTRL+R is the only feature
I' am really interested in for now.

waht can I do to check what is wrong ?





On Sun, Aug 19, 2012 at 4:30 PM, Gavin Lei gavingui2...@gmail.com wrote:

 Hi all,

 I have fixed issue
 37(http://code.google.com/p/tapestrytools/issues/detail?id=37can=1),
 it means that
 TapestryTools can custom components from Library component packages
 now, it is already in TapestryTools' update site, you guys can have a
 trial of it.

 Meanwhile, TapestryTools is now available in Eclipse Market place, you
 can find it by tapestry keyword :-)

 2012/8/16 Athneria, Mahendra mahendra.athne...@atos.net:
  Thanks in advance Gavin :-)
 
  Regards,
  Mahendra
 
  -Original Message-
  From: Gavin Lei [mailto:gavingui2...@gmail.com]
  Sent: Wednesday, August 15, 2012 8:24 PM
  To: Tapestry users
  Subject: Re: Lightweight TapestryTools update site
 
  Yeah, i am working for this feature, it will be available in the
  coming week. I will post here once it is available
 
  2012/8/9 Athneria, Mahendra mahendra.athne...@atos.net:
  Hi Gavin,
 
  Thanks for the reply. It would be great if you can add that feature
 too. I want to see the list of components from jar to the auto complete
 list.
 
  Thanks Gavin,
 
  Regards,
  Mahendra
 
  -Original Message-
  From: Gavin Lei [mailto:gavingui2...@gmail.com]
  Sent: Wednesday, August 08, 2012 6:54 PM
  To: Tapestry users
  Subject: Re: Lightweight TapestryTools update site
 
  Hi Athneria,
 
  This feature support only custom components in project's source
  directory, not consider components in jars, maybe i should also add
  jars support.
 
  2012/8/7 Athneria, Mahendra mahendra.athne...@atos.net:
  Hi Gavin,
 
  I took the update and trying to test the custom components support
 feature with different prefix.
  I have some doubts regarding the same.
 
  A) - We have a nice editor in which developer enters mapping : - we
 can only edit the custom components by right click on the project. And when
 I click on (+) button I can only see the packages from my project only. I
 am not able to see the components package from different libraries. So how
 I can do the same. I tried to achieve the same by editing components.tcc
 file. Below is the example.
 
  ?xml version=1.0 encoding=UTF-8?
  root
  packages
  package prefix=y path=net.awl.tapestry5.kawwa.components/ !--
 path is of components path of my libraries --
  /packages
  components !-- Breadcrumb is components inside my libraries --
  component id=Breadcrumb name=Breadcrumb text=Breadcrumb
 prefix=y path=net.awl.tapestry5.kawwa.components/
  /components
  /root
 
  Even thought I am not able to get the  Breadcrumb  name when I press
 ctrl+space on tml file.
 
  Any idea Gavin??
 
  Regards,
  Mahendra Athneria
 
 
  -Original Message-
  From: Gavin Lei [mailto:gavingui2...@gmail.com]
  Sent: Monday, August 06, 2012 6:21 PM
  To: Tapestry users
  Cc: Igor Drobiazko
  Subject: Re: Lightweight TapestryTools update site
 
 
  Hi all,
 
  In TapestryTools' components auto-complete feature, by default only
  components defined in these two packages are in the list:
 
  1.org.apache.tapestry5.corelib.components (Tapestry 5's build-in
 components)
  2.app-package.components, whereby app-package is the applications root
  package defined in the web.xml (Tapestry web application's root
  components)
 
  Now, I have add custom components support for TapestryTools. It means
  besides these components, TapestryTools support also custom components
  with different prefix with t:. It allow you to provide
  autocompletion for custom components from different libraries, and we
  have a nice editor in which developer enters mapping:
 
  x: org.example.components
  y: org.acme.lib.components
 
  In this mapping, a library prefix is mapped to a component package.
  So, every component from org.example.components package would have x
  prefix. For example:
 
  span t:type=x/MyComponent/span
  span t:type=y/Foo/span
 
  This feature is alreay available in TapestryTools' update site [1],
  and you can find detailed guide about this feature and the Custom
  components mapping editor here [2] (It is in Section 7).
 
  Looking forward to your feedbacks about TapestryTools and this new
  feature, thanks.
 
  [1] http://tapestrytools.googlecode.com/svn/TapestryTools/
  [2]
 http://code.google.com/p/tapestrytools/wiki/Install_Guide_Lightweight_TapestryTools
  --
  -
  Best Regards
  Gavin Lei (雷银)
  Email: gavingui2...@gmail.com
 
  -
  To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
  For additional commands, e-mail: users-h...@tapestry.apache.org
 
 
 
  --
  -
  Best Regards
  Gavin Lei (雷银)
  Email: gavingui2...@gmail.com
 
  

Re: Live class reloading very slow

2011-05-25 Thread Davor Hrg
Hi,

your suggestion did improve reload when only template is changed.

Still 6 seconds reload happens when I change page class.
Hope this is also abnormal and someone has some suggestions
how to fix it as well.


to clarify :
adding exclude ** for resources will stop eclipse from doing anything there,
and this was wrong until I restored defaults for m2eclipse.
by doing this maven added it's own resource processing to the build.
After that templates get copied as soon as edited,
Unlike with eclipse builder page reload is very fast 200ms for a page that
reloaded 6 seconds
before the changes were made.


Davor Hrg


On Tue, May 24, 2011 at 7:49 PM, Bryan Lewis jbryanle...@gmail.com wrote:

 I put it back into the src/main/resources line of .classpath, like:

classpathentry excluding=** kind=src output=target/classes
 path=src/main/resources/

 My templates are being copied to the expected place, like ...
 target\classes\com\companyname\appname\pages\PageName.tml.

 Maybe there's something else amiss with your maven/build configuration.
 Does your pom.xml have the resources section?  Maybe compare your
 configuration with a small new one like the Tapestry quickstart.



 On Tue, May 24, 2011 at 1:37 PM, Davor Hrg hrgda...@gmail.com wrote:

  I also removed excluding ** for src/main/resurces
 
  but without it templates do not get copied to calsses dir
 
  where did you put back the excluding ** ?
 
 
  Davor Hrg
 



Live class reloading very slow

2011-05-24 Thread Davor Hrg
Hi,

I may be wrong but since T5  5.2+
live class reloading is much slower.

I remember it being faster before 
for a page with maybe 10-20 components
reload lasts for 5-10 seconds.

it becomes worse with each component added.

This is far from productive and far from advertised by the framework.
It feels like going back to stone age of JSP and restarting whole server for
simple change.

We have been using tapestry since the beginning of T5, and a bit T4,
I could swear it was not this horribly slow before.


Another thing is the new handling of variables and page pool.
it is awful for debugging... is there a switch to use old page pool ?

Davor Hrg


Re: Live class reloading very slow

2011-05-24 Thread Davor Hrg
ok,

we are on 5.2.4 now,
I am running it from eclipse using run-jetty-run 1.1.1
I'll try newer jetty plugin 1.2.2.1

how long should I expect a page reload to last for:
 - page
 - editing component inside
   - two forms in the component
   - maybe 20 form fields total

Quad core  intel Core i7
4GB RAM

Davor Hrg

On Tue, May 24, 2011 at 5:50 PM, Howard Lewis Ship hls...@gmail.com wrote:

 For me as well, instantaneous under Jetty.

 5.2.5 adds field write-behind when in development mode, to assist
 with debugging.  This is also present in 5.3.

 There is a switch to use the page pool, please chck the documentation
 (configuration page).

 On Tue, May 24, 2011 at 8:37 AM, Davor Hrg hrgda...@gmail.com wrote:
  Hi,
 
  I may be wrong but since T5  5.2+
  live class reloading is much slower.
 
  I remember it being faster before 
  for a page with maybe 10-20 components
  reload lasts for 5-10 seconds.
 
  it becomes worse with each component added.
 
  This is far from productive and far from advertised by the framework.
  It feels like going back to stone age of JSP and restarting whole server
 for
  simple change.
 
  We have been using tapestry since the beginning of T5, and a bit T4,
  I could swear it was not this horribly slow before.
 
 
  Another thing is the new handling of variables and page pool.
  it is awful for debugging... is there a switch to use old page pool ?
 
  Davor Hrg
 



 --
 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




Re: Live class reloading very slow

2011-05-24 Thread Davor Hrg
I've updated run-jetty,
and tried with and without page-pool
still 5-6 seconds load time.


I decided to try to go as simple as possible ...

empty page with layout component takes 500 ms

- add a form .. it jumps to 700 ms

- add few submit buttons ... jumps to 800 ms

- add a component with a zone inside it .. jumps to 950 ms

- add two more of same component and few lines of text ... jumps to 1200 ms


This is awful ... I hope this can be fixed by configuring something ...
etc...
if this is T5 reality ... it is extremely unproductive and painful.


:( :( :(


Davor Hrg


On Tue, May 24, 2011 at 6:26 PM, Joel Halbert j...@su3analytics.com wrote:

 Hi Davor,

 I use a similar spec. Should take a second or two.

 - Joel

 On Tue, 2011-05-24 at 18:10 +0200, Davor Hrg wrote:
  ok,
 
  we are on 5.2.4 now,
  I am running it from eclipse using run-jetty-run 1.1.1
  I'll try newer jetty plugin 1.2.2.1
 
  how long should I expect a page reload to last for:
   - page
   - editing component inside
 - two forms in the component
 - maybe 20 form fields total
 
  Quad core  intel Core i7
  4GB RAM
 
  Davor Hrg
 
  On Tue, May 24, 2011 at 5:50 PM, Howard Lewis Ship hls...@gmail.com
 wrote:
 
   For me as well, instantaneous under Jetty.
  
   5.2.5 adds field write-behind when in development mode, to assist
   with debugging.  This is also present in 5.3.
  
   There is a switch to use the page pool, please chck the documentation
   (configuration page).
  
   On Tue, May 24, 2011 at 8:37 AM, Davor Hrg hrgda...@gmail.com wrote:
Hi,
   
I may be wrong but since T5  5.2+
live class reloading is much slower.
   
I remember it being faster before 
for a page with maybe 10-20 components
reload lasts for 5-10 seconds.
   
it becomes worse with each component added.
   
This is far from productive and far from advertised by the framework.
It feels like going back to stone age of JSP and restarting whole
 server
   for
simple change.
   
We have been using tapestry since the beginning of T5, and a bit T4,
I could swear it was not this horribly slow before.
   
   
Another thing is the new handling of variables and page pool.
it is awful for debugging... is there a switch to use old page pool ?
   
Davor Hrg
   
  
  
  
   --
   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: Live class reloading very slow

2011-05-24 Thread Davor Hrg
I also removed excluding ** for src/main/resurces

but without it templates do not get copied to calsses dir

where did you put back the excluding ** ?


Davor Hrg


Re: Alternating table rows

2010-09-14 Thread Davor Hrg
here is a neat and reusable trick on tapestry5howtos

http://wiki.apache.org/tapestry/Tapestry5HowToAddBindingPrefixCycle

Davor Hrg

On Tue, Sep 14, 2010 at 10:01 AM, John Doe nicu4...@yahoo.com wrote:

 Hello,

 I am new to Tapestry, but I am working on a project that uses it. The
 version is
 5.

 I am trying to make a HTML table in which even rows have one class, and odd
 rows
 have another class.

 So far, I tried the following (I am showing just the code that matters):

 t:loop index=index source=list value=element
tr class=${(index % 2 == 0) ? 'even' : 'odd'}/tr
 /t:loop

 This causes an exception: Could not convert '(index % 2 == 0) ? 'even' :
 'odd''
 into a component parameter binding: Error parsing property expression
 '(index %
 2 == 0) ? 'even' : 'odd'': Unable to parse input at character position 8..

 t:loop index=index source=list value=element
t:if test=index % 2 == 0
tr class=even
t:parameter name=else
tr class=odd
/t:parameter
/t:if
/tr
 /t:loop

 This causes an exception: Block parameters are only allowed directly
 within
 component elements..

 From this page http://tapestry.apache.org/tapestry5/guide/propexp.html I
 can't
 find any examples of conditionals.

 How can I make the alternating rows?






Re: T5.1 and Threaded Background Tasks

2010-09-01 Thread Davor Hrg
You can use ParallelExecutor service just fine,
and to use injection do not instantiate a task
yourself but make it a service with scope perthread.

Davor Hrg

On Wed, Sep 1, 2010 at 10:03 PM, Kalle Korhonen
kalle.o.korho...@gmail.comwrote:

 ParallelExecutor is a service that allows work to occur in parallel
 using a thread pool. I doubt it's usefulness in your case. Simply
 create a new service, spawn threads in it as needed to do work and
 implement a few get status operations that your page(s) can call. That
 way, keeping the page up-to-date via AJAX is a separate concern.

 Kalle


 On Wed, Sep 1, 2010 at 12:06 PM, Norman Franke nor...@myasd.com wrote:
  I need a page that will start a long-running process involving heavy use
 of
  a database. I'm trying to come up with an elegant way to integrate this
 into
  my T5.1 app. I'd like to use Tapestry's IoC to inject my Hibernate DAOs.
  Then I'd like to write status updates to a stack and have an AJAX process
  poll and update the web page with what's happening.
 
  I see there is a ParallelExecutor in Tapestry, but I don't think it does
  injection.
 
  Any good solutions out there?
 
  Norman Franke
  Answering Service for Directors, Inc.
  www.myasd.com
 
 
 
 

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




Re: OT: Web Services

2010-08-30 Thread Davor Hrg
I used CXF to generate java code from XSD-s,
CXF is easily used with maven, but in the end most newer
WS engines use JAXB for data binding.
JAXB is not perfect, and it took me a whole week
to make rules for jaxb to get desired output.
To be fair, he problem was not jaxb here but a very bad XSD,
so I had to try all JAXB tricks and plugins to get it done well.

.. bla .. bla .. what I mean is: CXF is just fine.

I've only used old axis before and it was a pain...


On Mon, Aug 30, 2010 at 4:43 AM, Kalle Korhonen
kalle.o.korho...@gmail.comwrote:

 Second that. CXF is the successor to XFire and its solid.

 Kalle


 On Sun, Aug 29, 2010 at 3:56 PM, Daniel Honig daniel.ho...@gmail.com
 wrote:
  I know of many projects using CXF without complaints.  I'd say that CXF
 is
  probably a good way to go.
 
  On Sun, Aug 29, 2010 at 1:35 PM, Jim O'Callaghan
  j...@peritussolutions.comwrote:
 
  I'm aware this is off topic, but since there are so many people on the
 list
  with a broad skill set am hoping I can learn from their experiences /
  heartbreak.  I am evaluating various WS stacks for interfacing with a
  system
  - currently I am using XFire as it requires very little configuration
 and
  performs quite efficiently.  XFire appears to qualify every xml element
  with
  a namespace, bloating the payload considerably, or, if using the patch
 from
  http://jira.codehaus.org/browse/XFIRE-687 appears to have unreliable /
  inconsistent namespace qualifiers.  Can anyone recommend a good WS stack
  they have positive experience of?  My constraints are quite liberal -
 java
  1.5 up, currently jetty as an AS, spring 3.0.2.RELEASE.  Is CXF any
 good?
   I
  want to find something with good performance obviously, minimal config,
 and
  hopefully something that consistently defines package level namespaces
 at
  an
  envelope level and reuses them.
 
 
 
  Many thanks,
 
  Jim.
 
 
 

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




Documentation improvement maybe ?

2010-08-30 Thread Davor Hrg
FAQ page
http://people.apache.org/~uli/tapestry-site/frequently-asked-questions.html#FrequentlyAskedQuestions-HowdoIstoremypageclassesinadifferentpackage
?
Question: How do I store my page classes in a different package?
Answer: you can't

The statement there is that pages must be in root-ackage.pages subpackage
and subpackages under it...

it is true for a single root-package, but by adding a library mapping you
can have multiple root-packages

if you stop using src/main/webapp as place for page templates and use
src/main/resources
same like you use for components then the following is done easy:

public static void
contributeComponentClassResolver(ConfigurationLibraryMapping
configuration){
configuration.add(new LibraryMapping(, my.app.tasks));
configuration.add(new LibraryMapping(, my.app.chat));
}

you are still bound to have pages under root-package.pages for each mapping

 this only a partial explanation ... a more detailed one should be
used...

I used this to separate my app into few sub-modules, each having own pages,
and to be able to add/remove module from production server by just omitting,
certain module's jar.


in the end the faq item mentioned could rephrased:
short answer: you can't original explanation...
long answer: you can but there are limitations, click here for a detailed
description on using library mappings.

Davor Hrg


Query parameters

2010-08-19 Thread Davor Hrg
I'm posting this to user group since it is mostly usage question.

The new query parameter binding is a welcome addition, especialy in
combination
with replacing the page pool with static instaces. All nice and well, but
how do I pass
query parameters through PageLink or AcionLink ?

Best to explain it through the example I'm using it with:
There is a page that lists documents, and there is a search form with few
fields.
One field is the year which tells the page to limit to docs from that
year.
So I changed the @Persist to @ActivationRequestParameter and after
submitting
the search form I get a nice ur: docs/list?year=2009.
Ok, this works well, I can have multiple tabs with different filters, much
like php which I
like very much and use often.
but there are more things that do not work:
1. using PageLink from another page to jump to @ActivationRequestParameter
2. using ActionLink to pass query parameters (annotated with
@RequestParameter)

3. If there are more than one such param there is no way to create a link to
it self with one of them changed
   for example on page: docs/list?year=2009type=FI I can not create a link
directly to docs/list?year=2010type=FI
   it would be nice to be able to write this: t:SelfLink
q:year=20102010/... to get the mentioned result

for that matter a namespace xmln:p=tapestry:parameter or new one like
xmlns:q=tapestry:query would be nice
for the ActionLink and PageLink.


Davor Hrg


Re: message that i do not understand

2009-04-30 Thread Davor Hrg
I had this issue when my tapestry dependencies got mixed.
The project uses  T 5.1.04 and an utility module declared T 5.0.7.

in runtime this created the issue, I guess because names changed for the
validators...
I aligned the versions, and the error is gone.


Davor Hrg



On Thu, Apr 23, 2009 at 8:39 PM, Joachim Van der Auwera joac...@progs.bewrote:

 Well, there may be similar issues in other code as well.
 In the equanda-tapestry5 library, some translators were registered, and
 these initialize by adding a validator. Removing one of the translators
 fixed the problem for me.

 The error message should give an indication of the validator or translator
 which causes the problem.

 Kind regards,
 Joachim


 Peter Stavrinides wrote:

 This is not likely an Equanda issue!
 I have seen this error too many times in my logs (not lately though), and
 I used Tapestry components and now ChenilleKit, but have never used Equanda.

 Peter

 - Original Message -
 From: Jorge Saridis jsari...@gmail.com
 To: Tapestry users users@tapestry.apache.org
 Sent: Friday, 17 April, 2009 15:08:06 GMT +02:00 Athens, Beirut,
 Bucharest, Istanbul
 Subject: Re: message that i do not understand

 Thanks leechj and Joachim

 On Fri, 2009-04-17 at 11:24 +0200, Joachim Van der Auwera wrote:



 Interesting. There is actually no validator added in equanda-tapestry5,
 but there is a string translator which probably caused this.
 On verification, it seems this translator is no longer needed, so I am
 removing it at this moment.

 Will release a new version over the weekend (also making it 5.1
 compatible and indluing a new component).

 Kind regards,
 Joachim

 leechj wrote:


 Jorge,
 We ran into this exact same problem. For us, we would get this error at
 random upon deployment. Sometimes when we would deploy, this error would
 occur. On other times we wouldn't experience this error at all.

 Today we realized that we weren't actually using anything from Equanda
 and
 took it out of our pom.xml file. (We then had to add the chenillekit
 dependency because the removal of equanda took away our chenille
 libraries)

 After we made this change, we haven't seen the issue come up again.
 Hope this helps! I'm not sure how much your project relies on Equanda,
 so I
 don't know if the removal of it's libraries is even an option for you...


 Jorge Saridis wrote:


 Howard, I use chenillekit and equanda.
 At the bottom of the js script generated by tapestry, I found this:


 Tapestry.init({validate:[[descripcionAperturaExportacion,[[string,[[missing
 key: string-format-exception]]],[required,Debe ingresar la
 descripción
 adicional]]],[talle,[[required,Tiene que ingresar un valor para
 Talle.]]],[moneda,[[required,Tiene que ingresar un valor para
 Moneda.]]],[nombreProducto,[[decimalnumber,'Nombre Producto'
 tiene
 que ser un valor numérico.],[required,Tiene que ingresar un valor
 para
 Nombre Producto.]]],[precio,[[decimalnumber,'Precio' tiene que
 ser
 un valor numérico.],[required,Tiene que ingresar un valor para
 Precio.]]],[color,[[required,Tiene que ingresar un valor para
 Color.]]],[codigoAperturaExportacion,[[string,[[missing key:
 string-format-exception]]],[required,Debe ingresar el
 código]]],[porcentajePrecio,[[decimalnumber,'Porcentaje Precio'
 tiene que ser un valor numérico.],[required,Debe ingresar el
 porcentaje del precio]]],[codigoProducto,[[string,[[missing key:
 string-format-exception]]],[required,Debe ingresar el código del

 producto,zone:[zoneProducto,zoneAperturaExportacion,zonePrecioSugerido,rubrosAlternativosZone,zoneDialogoEdicionProducto,zoneDialogoEliminacionProducto,zoneDialogoAperturaExportacion,zoneDialogoEliminacionAperturaExportacion,zoneDialogoPrecioSugerido,zoneDialogoEliminacionPrecioSugerido,dialogoRubroAlternativo,zoneResultadoBusquedaNombre],linkZone:[[nuevoProducto,zoneDialogoEdicionProducto,/iMartina/comercial/productos/edicion.nuevoproducto],[nuevoAperturaExportacion,zoneDialogoAperturaExportacion,/iMartina/comercial/productos/edicion.nuevoaperturaexportacion],[nuevoPrecioSugerido,zoneDialogoPrecioSugerido,/iMartina/comercial/productos/edicion.nuevopreciosugerido],[nuevoRubroAlternativo,dialogoAperturaExportacion,/iMartina/comercial/productos/edicion.nuevorubroalternativo],[edicionProducto,zoneProducto,/iMartina/comercial/productos/edicion.edicionproducto],[eliminacionProducto,zoneProducto,/iMartina/comercial/productos/edicion.eliminacionproducto],[edicionAperturaExportacion,zoneAperturaExportacion,/iMartina/comercial/productos/edicion.edicionaperturaexportacion],[eliminacionAperturaExportacion,zoneAperturaExportacion,/iMartina/comercial/productos/edicion.eliminacionaperturaexportacion],[edicionPrecioSugerido,zonePrecioSugerido,/iMartina/comercial/productos/edicion.edicionpreciosugerido],[eliminacionPrecioSugerido,zonePrecioSugerido,/iMartina/comercial/productos/edicion.eliminacionpreciosugerido],[edicionRubroAlternativo,rubrosAlternativosZone,/iMartina/comercial/productos

Re: Tapestry JSONObject : no 'function' type, any workaround ?

2009-03-09 Thread Davor Hrg
I have a solution :)
I needed it to make my own autocomplete


/**
 *
 */
package tapestryutil.mixins;

/** Workarround to add raw content to JSON, like function references and
such.
 * Number instances are not quoted and are trusted, so we use it.*/
final class JSONRaw extends Number {

private final String rawText;

JSONRaw(String rawText) {
this.rawText = rawText;
}

@Override public double doubleValue() {return 0;}

@Override public float floatValue() {return 0;}

@Override public int intValue() {return 0;}

@Override public long longValue() {return 0;}

@Override public String toString() {
return rawText;
}
}




On Mon, Mar 9, 2009 at 3:33 PM, Andreas Andreou andy...@di.uoa.gr wrote:

 For json responses, i think it's good that the json is strict (i.e. no
 objects or
 callbacks allowed as values)

 For constructing js objects to be included in the html (to configure
 other js components)
 it's clear that JSONObject isn't the correct answer (json != js object)

 Probably the autocmplete mixin needs to use a 'new' JsObject class

 On Mon, Mar 9, 2009 at 4:10 PM, ningdh ningd...@gmail.com wrote:
  Not aware of that, sorry.
 
  In my window component, I hack to replace double quote of all function to
 empty.
  JSONObject options= new JSONObject();
  options.put(showEffect, TO_BE_REPLACE +
 this.showEffect+TO_BE_REPLACE);
 
  getPageRenderSupport().addScript(%s = new Window(%s);, getUniqueId(),
 filterJsFunction(options.toString()));
 
  private String filterJsFunction(String jsonString) {
 // function begin
 jsonString = jsonString.replaceAll(\TO_BE_REPLACE, );
 // function end
 jsonString = jsonString.replaceAll(TO_BE_REPLACE\, );
 
 return jsonString;
 }
 
  Well, a bit stupid, but works.
 
  DH
  - Original Message -
  From: Francois Armand farm...@linagora.com
  To: Tapestry users users@tapestry.apache.org
  Sent: Monday, March 09, 2009 9:51 PM
  Subject: Re: Tapestry JSONObject : no 'function' type, any workaround ?
 
 
  ningdh wrote:
  toString method of JsonObject would double quote our value.
  One way is to create some data type extends jsonobject to encapsule
 your data and override the toString method. I haven't tried it yet.
 
 
  But JSONObject and JSONArray are final, that's not possible - it was my
  first plan. How can I workaround that ?
 
 
  --
  Francois Armand
  Etudes  Développements J2EE
  Groupe Linagora - http://www.linagora.com
  Tél.: +33 (0)1 58 18 68 28
  ---
  http://fanf42.blogspot.com
  InterLDAP - http://interldap.org
  FederID - http://www.federid.org/
  Open Source identities management and federation
 
 
  -
  To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
  For additional commands, e-mail: users-h...@tapestry.apache.org
 
 



 --
 Andreas Andreou - andy...@apache.org - http://blog.andyhot.gr
 Tapestry / Tacos developer
 Open Source / JEE Consulting

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




Re: Switch from Prototype to jQuery?

2009-02-12 Thread Davor Hrg
Tapestry core can benefit from using less library code as possible.Use few
utility functions from the days crossbrowser libraries just started,
and those that are not too much to implement.


high level stuff from jquery protoype dojo yui etc. are all different in the
approach.

a list should be made what utilities are of essence for tapestry js.
some tapestry functions that use library a lot but solve a specific problem
could be left for plugin lib to reimplement.

a good point to start would be removing this prototype centric stuff I
mentioned,
element.getFieldEventManager()
with something like:
Tapestry.getFieldEventManager(element)

although changing the prototype of the Function class and adding the bind
to it no big deal you might consider changing the code like this:
this.repositionBubble.bind(this)
to
Tapestry.bind(this.repositionBubble,this);

it is longer, and bit uglier but more neutral I guess.


One may think this is pretty:
this.form.getElements().each(function(element)
{
var fem = $T(element).fieldEventManager;

if (fem != undefined)
{
// Ask the FEM to validate input for the field, which fires
// a number of events.
var error = fem.validateInput();

if (error  ! firstErrorField)
{
firstErrorField = element;
}
}
});

but why not just replace the first line with:
var elems = Tapestry.form.getElements(this.form);
for(element in elems)


The impl of the func would be obviously
Tapestry.form.getElements = function(form){return form.getElements();}


Davor Hrg



On Thu, Feb 12, 2009 at 1:27 AM, Howard Lewis Ship hls...@gmail.com wrote:

 These are all good points.  When this last flared up, at least a year
 back, I didn't want to tackle it because I could not then say what the
 minimal set of functionality would be.  I think we're closer now.
 Coding in such a way that we can easily swap out or mix-n-match
 Prototype and jQuery will make people very happy.

 On Wed, Feb 11, 2009 at 2:07 PM, Davor Hrg hrgda...@gmail.com wrote:
  One small example from tapestry.js
  when looking at this as prototype centric app
  it is totaly ok, but from the angle of enabling other libs this approach
  is completely unnecessary and easily fixed.
 
  again this is one example (rewriting all may not be as easy)..
 
  this code is called (tapestry.js:551)
  Element.addMethods(['INPUT', 'SELECT', 'TEXTAREA'],
  ...
 getFieldEventManager : function(field)
  ...
 
  searching whole source for tapestry core reveals that this function is
 only
  used in tapestry.js
 
  tapestry.js:588
 element.getFieldEventManager().showValidationMessage(message);
 
  the code can easily be rewriten to use
 
  Tapestry.getFieldEventManager(element).showValidationMessage(message);
 
  this removes need for prototype and extending dome nodes for this example
 
  You can argue that other projects might rely on tapestry doing things
 like
  this,
  but an compatible version for prototype can be left like this and version
  for other libs
  with the new approach (the other libs don't like prototype.js anyway).
 This
  can mean
  that people with other js libs are fixed to tapestry core only but this I
  suppose is ok for many
 
 
  Davor Hrg
 
 
 
 
  On Wed, Feb 11, 2009 at 10:14 PM, Davor Hrg hrgda...@gmail.com wrote:
 
  I was even willing to do this wrapper thing almost a year ago,all this
 is
  from going through tapestry js code last spring
  some things are just thoughts on what should not be done, and some may
 be
  comments on tap.js 
 
  the Tapestry js code is not so complicated,
  and uses only a portion of prototype
 
  there can even be something like prototype slimmed for it to work as
 well.
 
  the components are not remotely close in complexity to any framework
  even prototype is overkill for tapestry.
 
  It definitely extensively used Function.bind which is a five-liner and
  is similar dojo.hitch, it also uses $ function which is a simple as well
 
  It should avoid prototype specific approach of expecting dom nodes
  prototypes upgraded and fallback to plain old utility functions
 
  why call :
  $(element).hide()
  when you can as well call (not saying code like this exists in tap.js) :
  Tapestry.hide($('elem'));
  and be more portable
 
  Tapestry core just needs to define a set of minimal js utility functions
  and use prototype for bas on how the funcs should work.
 
  example funcs:
  Tapestry.addClassName
  Tapestry.effect.fadeIn - total light version of js might do no fade and
  just display content
  Tapestry.calcPos - absolute pos for element so a floated one can be
 aligned
  to it
  some subset of jquery like funcs to more easily find nodes (but search
  only)
  no magic calls to change all nodes properties and shit.
 
  if a submit button can not get context why do crazy stuff in js

Re: Switch from Prototype to jQuery?

2009-02-11 Thread Davor Hrg
I was even willing to do this wrapper thing almost a year ago,all this is
from going through tapestry js code last spring
some things are just thoughts on what should not be done, and some may be
comments on tap.js 

the Tapestry js code is not so complicated,
and uses only a portion of prototype

there can even be something like prototype slimmed for it to work as well.

the components are not remotely close in complexity to any framework
even prototype is overkill for tapestry.

It definitely extensively used Function.bind which is a five-liner and
is similar dojo.hitch, it also uses $ function which is a simple as well

It should avoid prototype specific approach of expecting dom nodes
prototypes upgraded and fallback to plain old utility functions

why call :
$(element).hide()
when you can as well call (not saying code like this exists in tap.js) :
Tapestry.hide($('elem'));
and be more portable

Tapestry core just needs to define a set of minimal js utility functions
and use prototype for bas on how the funcs should work.

example funcs:
Tapestry.addClassName
Tapestry.effect.fadeIn - total light version of js might do no fade and just
display content
Tapestry.calcPos - absolute pos for element so a floated one can be aligned
to it
some subset of jquery like funcs to more easily find nodes (but search only)
no magic calls to change all nodes properties and shit.

if a submit button can not get context why do crazy stuff in js that is not
necessary

after that adding/using other js frameworks would be no problem for those
that like them.

unfortunately I lost a bit of interest after some of my patches not making
in
the framework for a long time :(:(

I don't mean to bash on T5, and I do hope I make more time for it in
following moths.

The blame could be on me as well, a year has almost passed since I looked
into this, and haven't done much since. :(:(

Davor Hrg


On Wed, Feb 4, 2009 at 8:17 AM, Peter Stavrinides 
p.stavrini...@albourne.com wrote:

 it would be nice if a component could indicate
 that the scripts should be at the top for the entire page
 Vote for this Jira, which requests exactly that:
 https://issues.apache.org/jira/browse/TAP5-369

 Peter

 - Original Message -
 From: Joachim Van der Auwera joac...@progs.be
 To: Tapestry users users@tapestry.apache.org
 Sent: Monday, 2 February, 2009 17:22:06 GMT +02:00 Athens, Beirut,
 Bucharest, Istanbul
 Subject: Re: Switch from Prototype to jQuery?

 I am not so sure.

 Do all pages/components work the same way if you move the scripts to the
 top?
 If that is the case, then it would be nice if a component could indicate
 that the scripts should be at the top for the entire page.
 If not, then there is a problem if you want to combine a component which
 requires scripts at the top with a component which requires scripts at
 the bottom.

 Joachim

 Kevin Menard wrote:
  This was an older app that I haven't needed to revisit.  At the time,
  no such directive existed.  If it does, great.  Then I guess there
  really aren't any problems after all.
 
 


 --
 Joachim Van der Auwera
 PROGS bvba, progs.be


 -
 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: Switch from Prototype to jQuery?

2009-02-11 Thread Davor Hrg
One small example from tapestry.js
when looking at this as prototype centric app
it is totaly ok, but from the angle of enabling other libs this approach
is completely unnecessary and easily fixed.

again this is one example (rewriting all may not be as easy)..

this code is called (tapestry.js:551)
Element.addMethods(['INPUT', 'SELECT', 'TEXTAREA'],
...
getFieldEventManager : function(field)
...

searching whole source for tapestry core reveals that this function is only
used in tapestry.js

tapestry.js:588
element.getFieldEventManager().showValidationMessage(message);

the code can easily be rewriten to use

Tapestry.getFieldEventManager(element).showValidationMessage(message);

this removes need for prototype and extending dome nodes for this example

You can argue that other projects might rely on tapestry doing things like
this,
but an compatible version for prototype can be left like this and version
for other libs
with the new approach (the other libs don't like prototype.js anyway). This
can mean
that people with other js libs are fixed to tapestry core only but this I
suppose is ok for many


Davor Hrg




On Wed, Feb 11, 2009 at 10:14 PM, Davor Hrg hrgda...@gmail.com wrote:

 I was even willing to do this wrapper thing almost a year ago,all this is
 from going through tapestry js code last spring
 some things are just thoughts on what should not be done, and some may be
 comments on tap.js 

 the Tapestry js code is not so complicated,
 and uses only a portion of prototype

 there can even be something like prototype slimmed for it to work as well.

 the components are not remotely close in complexity to any framework
 even prototype is overkill for tapestry.

 It definitely extensively used Function.bind which is a five-liner and
 is similar dojo.hitch, it also uses $ function which is a simple as well

 It should avoid prototype specific approach of expecting dom nodes
 prototypes upgraded and fallback to plain old utility functions

 why call :
 $(element).hide()
 when you can as well call (not saying code like this exists in tap.js) :
 Tapestry.hide($('elem'));
 and be more portable

 Tapestry core just needs to define a set of minimal js utility functions
 and use prototype for bas on how the funcs should work.

 example funcs:
 Tapestry.addClassName
 Tapestry.effect.fadeIn - total light version of js might do no fade and
 just display content
 Tapestry.calcPos - absolute pos for element so a floated one can be aligned
 to it
 some subset of jquery like funcs to more easily find nodes (but search
 only)
 no magic calls to change all nodes properties and shit.

 if a submit button can not get context why do crazy stuff in js that is not
 necessary

 after that adding/using other js frameworks would be no problem for those
 that like them.

 unfortunately I lost a bit of interest after some of my patches not making
 in
 the framework for a long time :(:(

 I don't mean to bash on T5, and I do hope I make more time for it in
 following moths.

 The blame could be on me as well, a year has almost passed since I looked
 into this, and haven't done much since. :(:(

 Davor Hrg


 On Wed, Feb 4, 2009 at 8:17 AM, Peter Stavrinides 
 p.stavrini...@albourne.com wrote:

 it would be nice if a component could indicate
 that the scripts should be at the top for the entire page
 Vote for this Jira, which requests exactly that:
 https://issues.apache.org/jira/browse/TAP5-369

 Peter

 - Original Message -
 From: Joachim Van der Auwera joac...@progs.be
 To: Tapestry users users@tapestry.apache.org
 Sent: Monday, 2 February, 2009 17:22:06 GMT +02:00 Athens, Beirut,
 Bucharest, Istanbul
 Subject: Re: Switch from Prototype to jQuery?

 I am not so sure.

 Do all pages/components work the same way if you move the scripts to the
 top?
 If that is the case, then it would be nice if a component could indicate
 that the scripts should be at the top for the entire page.
 If not, then there is a problem if you want to combine a component which
 requires scripts at the top with a component which requires scripts at
 the bottom.

 Joachim

 Kevin Menard wrote:
  This was an older app that I haven't needed to revisit.  At the time,
  no such directive existed.  If it does, great.  Then I guess there
  really aren't any problems after all.
 
 


 --
 Joachim Van der Auwera
 PROGS bvba, progs.be


 -
 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: Rendering messages in template

2008-10-26 Thread Davor Hrg
you can make a binding prefix to handle this,
but syntax would have to be without ${
${messages:${step.stepName}-step}

something like
${messages:prop:step.stepName+-step}

look at:
http://wiki.apache.org/tapestry/Tapestry5HowTos
under binding prefixes

Davor Hrg


On Fri, Oct 24, 2008 at 5:33 PM, Szemere Szemere 
[EMAIL PROTECTED] wrote:

 I don't think so, at least not in ordinary Tapestry. For your example, I'm
 not sure that even OGNL would help out.



Re: Hibernate example broken with 5.0.15

2008-10-06 Thread Davor Hrg
you should post the errors you get,
and, also methods that save data should have
@CommitAfter annotation now.

...and you need not close the session
it will get closed automatically,
and that is actualy the reason the exception occurs

Davor Hrg

On Mon, Oct 6, 2008 at 11:23 AM, János Jarecsni [EMAIL PROTECTED]wrote:

 Hi again,

 I made some investigations into the matter. Here's my modified onAction
 method from the page class HbAction:

public void onAction() {
Hello h = new Hello();
h.setMessage(Hello World);
_session.save(h);
List list = _session.createCriteria(Hello.class).list();
System.out.println(Hellos stored:  + list.size());
_session.close();
}

 So I included a close(). This reveled, why the newly inserted Hello
 entities
 are not persisted. I get the following exception now:

 11:20:15,889 [ WARN] PerthreadManager - Error invoking listener
 [EMAIL PROTECTED]
 :
 Session is closed
 org.hibernate.SessionException: Session is closed
at org.hibernate.jdbc.JDBCContext.connection(JDBCContext.java:139)
at

 org.hibernate.transaction.JDBCTransaction.rollbackAndResetAutoCommit(JDBCTransaction.java:217)
at

 org.hibernate.transaction.JDBCTransaction.rollback(JDBCTransaction.java:196)
at

 org.apache.tapestry5.internal.hibernate.HibernateSessionManagerImpl.threadDidCleanup(HibernateSessionManagerImpl.java:65)
at

 org.apache.tapestry5.ioc.internal.services.PerthreadManagerImpl.cleanup(PerthreadManagerImpl.java:86)
at

 org.apache.tapestry5.ioc.internal.RegistryImpl.cleanupThread(RegistryImpl.java:327)
at

 org.apache.tapestry5.ioc.internal.RegistryWrapper.cleanupThread(RegistryWrapper.java:36)
at
 org.apache.tapestry5.TapestryFilter.doFilter(TapestryFilter.java:185)

 So this means, that for some reason a rollback is issued after the method
 finished. Why? Any hints are welcome :)

 Cheers
 Janos


 2008/10/6 János Jarecsni [EMAIL PROTECTED]

  Hi All,
 
  I tested the simple Hibernate example (
  http://wiki.apache.org/tapestry/Tapestry5HowToUseTapestryHibernate)
 quite
  a while ago with T5.0.11. Now I restarted studying Tapestry, tried the
  application now with 5.0.15. It seems that the application can read from
  the table, but cannot insert into it. I found no exceptions. I tried with
  the 5.0.11 version, it still works. I replaced the Tapestry version with
  T5.0.15 and it breaks. Can it be that I have to upgrade Hibernate as
 well?
 
  Thx a lot
  Janos
 



announce wiki article

2008-09-23 Thread Davor Hrg
I've made an wiki article after a long time
http://wiki.apache.org/tapestry/Tapestry5HowToWorkQueue

it is an another  example of working with threads in tapestry

any suggestions are welcome

-- 
Davor Hrg


Re: LinkedIn and Facebook

2008-09-01 Thread Davor Hrg
it seems like it wa a png/gif with transparency
and server resized it or converted to jpg using black as bg

On Mon, Sep 1, 2008 at 12:09 AM, Filip S. Adamsen [EMAIL PROTECTED] wrote:

 Hi,

 It's nice to have a Tapestry group on Facebook. Is there any reason I'm
 only seeing 10 members?

 Also, the current logo looks kind of weird on my end. Is that just me?

 -Filip


 On 2008-08-31 21:18, Thiago H. de Paula Figueiredo wrote:

 Hi!

 I'm sorry for not approving everyone's request to join the LinkedIn
 Tapestry group more quickly. Strangely, it doesn't warn me about membership
 request. At this moment, there are 48 members, including almost everyone in
 this list. Sweet!

 Dariusz Dwornikowski suggested a Tapestry Facebook group, and it is here:
 http://www.facebook.com/group.php?gid=32765389972

 Howard: you asked me to rename it to Apache Tapestry web framework, and
 I had just did it. Is there any issue about using the Tapestry logo in the
 above groups?

 Thiago


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


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




Re: t5: Hibernate resultset with pagination

2008-09-01 Thread Davor Hrg
not sure what you are trying achieve exactly

paging, table, all can be simply generated even without grid
but you'll need to print each column manualy, or dig deeper
and use beanModel your self


Davor Hrg

On Mon, Sep 1, 2008 at 3:32 AM, Angelo Chen [EMAIL PROTECTED]wrote:


 Hi,

 I have a need to display some Hibernate resultset with pagination, but I
 can't use T5's grid. any hint how to do this in T5?  thanks.

 Angelo
 --
 View this message in context:
 http://www.nabble.com/t5%3A-Hibernate-resultset-with-pagination-tp19247842p19247842.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: LazyInitializationException

2008-08-26 Thread Davor Hrg
you should post some code,

but the most likely scenario is that you are persisting
Entities in your page

this is not good because every request has a different session,
and the session that loaded the collection  was closed in a previous
request,

you should remember your search parameters instead holding on to the
collection,

If you are trying to optimize performance by caching results
please don't, that is not the way hibernate supports it.
you should always query again and let hibernate handle performance,
to cache query results you'll need to get to know hibernate more
and it's caching configuration (second-level cache, query cache ...).


Davor Hrg

On Tue, Aug 26, 2008 at 10:35 AM, moritzgilsdorf
[EMAIL PROTECTED]wrote:


 Hi,

 I have a Problem with lazy loading. In my App I query a Database using
 Hibernate. The workflow is the following:

 Searchpage   -  Resultspage -  Detailspage
 
 search by keyword -  Results in Grid -  Details of picked result

 The queried Objects contain a collection that should be presented on the
 Detailspage and loaded there lazily. When a hit in the result grid is
 clicked, I pass the Id of the entry using the page activation context to
 Detailspage (I want the Details to be bookmarkable). But when accessing the
 collection on the Detailspage, the  LazyInitializationException is thrown.
 For Database-access I use an injected service interface.

 I believe this is not an unusual scenario so I hope anyone here can give me
 a hint on how to solve this problem.

 Thanks, Moritz
 --
 View this message in context:
 http://n2.nabble.com/LazyInitializationException-tp783491p783491.html
 Sent from the Tapestry Users mailing list archive at Nabble.com.


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




Re: LazyInitializationException

2008-08-26 Thread Davor Hrg
remove @Persist from:

 @Persist
   private Gene gene;

and your onActivate method seems strange
perhaps if you return null instead of GeneDetails.class;

the session is closed after renderring, not before
the renderring is part of the request, but you chose
to persist the Gene and redirect to your self
in that case a new request happens and your problems..

Davor Hrg


Davor Hrg

On Tue, Aug 26, 2008 at 11:17 AM, moritzgilsdorf
[EMAIL PROTECTED]wrote:


 I pass the Id of the Object to Detailspage and use onActivate() to query
 for
 the object I want to show in detail.

 My Details Page:

 public class GeneDetails {
...
@Persist
private Gene gene;

@Inject
private GeneDAO geneDAO;
...
Object onActivate(Long id){
if(userExists){
   gene = geneDAO.getGeneById(id);
   return GeneDetails.class;
}
else
   return Index.class;
}
...
 }

 My Gene.class

 public class Gene {
...
private SetReagent reagents;
...
 }

 The exception is thrown when i call:

 t:if t:test=gene.reagents.isEmpty()

 If I understand this right, the session is closed directly after the query
 was done and before the page is rendered. Do I have to query again for my
 collection when I want to access it or is there any way to keep the session
 open until the page-rendering has finished?

 Thanks

 ...

 Davor Hrg wrote:
 
  you should post some code,
 
  but the most likely scenario is that you are persisting
  Entities in your page
 
  this is not good because every request has a different session,
  and the session that loaded the collection  was closed in a previous
  request,
 
  you should remember your search parameters instead holding on to the
  collection,
 
  If you are trying to optimize performance by caching results
  please don't, that is not the way hibernate supports it.
  you should always query again and let hibernate handle performance,
  to cache query results you'll need to get to know hibernate more
  and it's caching configuration (second-level cache, query cache ...).
 
 
  Davor Hrg
 
  On Tue, Aug 26, 2008 at 10:35 AM, moritzgilsdorf
  [EMAIL PROTECTED]wrote:
 
 
  Hi,
 
  I have a Problem with lazy loading. In my App I query a Database using
  Hibernate. The workflow is the following:
 
  Searchpage   -  Resultspage -  Detailspage
  
  search by keyword -  Results in Grid -  Details of picked result
 
  The queried Objects contain a collection that should be presented on the
  Detailspage and loaded there lazily. When a hit in the result grid is
  clicked, I pass the Id of the entry using the page activation context to
  Detailspage (I want the Details to be bookmarkable). But when accessing
  the
  collection on the Detailspage, the  LazyInitializationException is
  thrown.
  For Database-access I use an injected service interface.
 
  I believe this is not an unusual scenario so I hope anyone here can give
  me
  a hint on how to solve this problem.
 
  Thanks, Moritz
  --
  View this message in context:
  http://n2.nabble.com/LazyInitializationException-tp783491p783491.html
  Sent from the Tapestry Users mailing list archive at Nabble.com.
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 

 --
 View this message in context:
 http://n2.nabble.com/LazyInitializationException-tp783491p783576.html
 Sent from the Tapestry Users mailing list archive at Nabble.com.


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




Re: Why you should consider T5

2008-08-21 Thread Davor Hrg
nice post,

i don't see mention of automatic template and class reloading..

:)

Davor Hrg

On Thu, Aug 21, 2008 at 7:13 AM, Partogi, Joshua [EMAIL PROTECTED]wrote:

 Dear all,

 I written a small blog post to evangelize people about T5 here:

 http://joshuajava.wordpress.com/2008/08/21/why-you-should-consider-tapestry-
 5/http://joshuajava.wordpress.com/2008/08/21/why-you-should-consider-tapestry-5/

 Please give me some feedback to make this post even better.

 Thanks in advance

 IMPORTANT NOTICE:
 The information in this email (and any attachments) is confidential. If you
 are not the intended recipient, you must not use or disseminate the
 information. If you have received this email in error, please immediately
 notify me by Reply command and permanently delete the original and any
 copies or printouts thereof.  Although this email and any attachments are
 believed to be free of any virus or other defect that might affect any
 computer system into which it is received and opened, it is the
 responsibility of the recipient to ensure that it is virus free and no
 responsibility is accepted by American International Group, Inc. or its
 subsidiaries or affiliates either jointly or severally, for any loss or
 damage arising in any way from its use.


Re: Decorating Grid rows

2008-08-18 Thread Davor Hrg
you can use rowClass to mark rows,
and set global context menu handler on the table,
and then in the handler find out row's class attribute : row.className
then based on that decide what to show in context menu...

Davor Hrg

On Mon, Aug 18, 2008 at 3:27 PM, Stranzenbach, Ralf 
[EMAIL PROTECTED] wrote:

 This seems to be a really good solution to create the zebar effect. I-ve
 tried this using the getter based solution - which worked pretty well. I'll
 give it a try later this evening.

 But i need to provide some additional JavaScript code to any row to provide
 parametrized JavaScript code to activate additional functionality based on
 the row selected.

 Sincerly
 Ralf


 

 Von: Marcelo Lotif [mailto:[EMAIL PROTECTED]
 Gesendet: Mo 18.08.2008 15:11
 An: Tapestry users
 Betreff: Re: Decorating Grid rows



 Maybe this thread helps you

 http://www.nabble.com/T5%3A-Grid%27s-rowClass-td13810748s302.html#a13810748

 read the third post from angelo chen, there's an explanation on how to
 do the zebra effect...

 Cheers.

 On Mon, Aug 18, 2008 at 9:10 AM, Ralf Edmund Stranzenbach [EMAIL PROTECTED]
 wrote:
  Hi,
 
  one of my application should provide some context aware assistance on the
  rows of a grid component. While it was really easy to provide some
 feedback
  by creating specific css classes for the rows, adding of a context aware
  menu is more complicated.
 
  How can i provide some additional code for any row visible in a grid
  component (a solution with additional columns is in place, but that's not
  what i want).
 
  With regards,
  Ralf E. Stranzenbach



 --
 Atenciosamente,

 Marcelo Lotif
 Programador Java e Tapestry
 FIEC - Federação das Indústrias do Estado do Ceará
 (85) 3477-5910

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





 ***
 The information in this email is confidential and may be legally
 privileged. Access to this email by anyone other than the intended addressee
 is unauthorized. If you are not the intended recipient of this message, any
 review, disclosure, copying, distribution, retention, or any action taken or
 omitted to be taken in reliance on it is prohibited and may be unlawful. If
 you are not the intended recipient, please reply to or forward a copy of
 this message to the sender and delete the message, any attachments, and any
 copies thereof from your system.

 ***

 BearingPoint GmbH
 Geschäftsführer: Peter Mockler (Vorsitzender), Marcel Nickler (stellv.
 Vorsitzender), Wilfried Erber, Werner Kreutzmann, Hans-Werner Wurzel
 Aufsichtsratsvorsitzender: Roderick McGeary
 Sitz: Frankfurt am Main
 Registergericht: Amtsgericht Frankfurt am Main HRB 55490

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




Re: [T5]How to make indentical validation on the client side.

2008-08-18 Thread Davor Hrg
you can use
@IncludeJavaScriptLibrary annotation
in your page or in a component

Davor Hrg

On Mon, Aug 18, 2008 at 3:44 PM, Geoff Callender 
[EMAIL PROTECTED] wrote:

 The problem with that How To is this line:

This javascript file needs to be included in all pages/components
 where the new validator is to be used (Is there a better way?)

 So, is there a better way?  Can we contribute javascript to the app?

 Geoff


 On 18/08/2008, at 10:50 PM, Filip S. Adamsen wrote:

  Hi,

 This should get you started:
 http://wiki.apache.org/tapestry/Tapestry5HowToAddValidators

 -Filip

 On 2008-08-18 09:39, luna_guo wrote:

 Confirm password checking is so common.
 It should happen on the client side,right?
 So,what should i do ?
 /luna


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





Re: Display String Array

2008-08-08 Thread Davor Hrg
is it String[] or String[][]

anyhow, you can use the loop component to print the strings

table
trthheader name/th/tr
t:loop .
trtd${str}/td/tr
/t:loop
/table

look for details in tapestry doc's

Davor Hrg

On Thu, Aug 7, 2008 at 4:46 PM, Mohammad Irfan [EMAIL PROTECTED] wrote:

 Hi, I have an array of String[]. I'd like to display it on a table.
 How am I do it? Thanks.

 --
 Wassalamu'alaikum wr. wb.
 Mohammad Irfan

 ---
 www.doktermaya.com
 www.L-Ads.com (classifieds ads, iklan baris)
 www.komplain.org (complain about product)
 www.akarprima.com

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




Re: Setting the GridPager range

2008-08-08 Thread Davor Hrg
I don't understand what you mean by range ?

Davor Hrg

On Thu, Aug 7, 2008 at 3:16 PM, immutability [EMAIL PROTECTED] wrote:


 Hi everyone! I'm still a little new to Tapestry5, and before starting a
 large
 project we've decided to develop a small internal application using
 Tapestry5. I was working on this for some 3 weeks now, and so far I'm
 impressed! I was able to resolve most of my issue using Google, Tapestry
 reference and Wiki, or the archives of this mailinglist, but this time I
 ran
 into a few things that I can't figure out. Here's the first one:

 I'm using the Grid component to display a list of some entities. The Grid
 itself has a few parameters to adjust paging behavior (namely pagerPosition
 and rowsPerPage) but there's no parameter to configure GridPager's range
 parameter. Now, I searched wherever I could, but didn't find a single
 example on how to adjust the default values of range which is 5. I have
 tried to do this declaratively, programmatically in the page's backing
 class, but just couldn't find the way to do this.

 So my question is: is there an easy way to do this? And if not - is there a
 hard way to do this? :) I think I mainly need some pointers to get me
 started.

 Thanks in advance!
 Rado
 --
 View this message in context:
 http://www.nabble.com/Setting-the-GridPager-range-tp18870199p18870199.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: Setting the GridPager range

2008-08-08 Thread Davor Hrg
this looks like a bug,
please post a JIRA issue

Davor Hrg

On Fri, Aug 8, 2008 at 3:13 PM, Radoslav Bielik [EMAIL PROTECTED] wrote:

 Thanks - it should be, but it ain't that simple :)
 It was actually one of the first things I tried...

 If you check the Grid component reference, it doesn't have a parameter
 for range that it would pass on to its pager. That means that when
 you use it - it will just ignore it...

 Thanks,
 Rado


 Friday, August 8, 2008, 3:09:45 PM, you wrote:
  it should be as simple as this:

  t:grid range=11  .../t:grid



  On Fri, Aug 8, 2008 at 2:57 PM, [EMAIL PROTECTED] wrote:
  I just noticed that my reply went out as a response to my
  original question, rather than a reply to your question. I don't
  want to clog the mailinglist so just in case you didn't receive it,
  here is what I meant:

  Just check the GridPager
  reference:
 
 http://tapestry.apache.org/tapestry5/tapestry-core/ref/org/apache/tapestry5/corelib/components/GridPager.html


  range: Number of pages before and after the current page in the range.
 The
  pager always displays links for 2 * range + 1 pages, unless that's more
 than
  the total number of available pages.

  The default is 5, and I can't find a way to change it when using the Grid
  component.



  Davor Hrg wrote:
 
  I don't understand what you mean by range ?
 
  Davor Hrg
 


  On Thu, Aug 7, 2008 at 3:16 PM, immutability [EMAIL PROTECTED]
 wrote:
 
 
  Hi everyone! I'm still a little new to Tapestry5, and before starting a
  large
  project we've decided to develop a small internal application using
  Tapestry5. I was working on this for some 3 weeks now, and so far I'm
  impressed! I was able to resolve most of my issue using Google,
 Tapestry
  reference and Wiki, or the archives of this mailinglist, but this time
 I
  ran
  into a few things that I can't figure out. Here's the first one:
 
  I'm using the Grid component to display a list of some entities. The
 Grid
  itself has a few parameters to adjust paging behavior (namely
  pagerPosition
  and rowsPerPage) but there's no parameter to configure GridPager's
  range
  parameter. Now, I searched wherever I could, but didn't find a single
  example on how to adjust the default values of range which is 5. I
 have
  tried to do this declaratively, programmatically in the page's backing
  class, but just couldn't find the way to do this.
 
  So my question is: is there an easy way to do this? And if not - is
 there
  a
  hard way to do this? :) I think I mainly need some pointers to get me
  started.
 
  Thanks in advance!
  Rado
  --
  View this message in context:


 
 http://www.nabble.com/Setting-the-GridPager-range-tp18870199p18870199.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]
 
 
 
 

  Quoted from:
 
 http://www.nabble.com/Setting-the-GridPager-range-tp18870199p18890782.html















Re: T5: Dynamic asset path

2008-08-07 Thread Davor Hrg
it depends on what you need,
but you could combine the asset service to generate base path
and add the rest programatically

img
src=${asset:context:company}/$(company.id)/img/banner.gif/

this way you don't need a method

a component would be even better to avoid copy/paste

Davor Hrg

On Wed, Aug 6, 2008 at 4:14 PM, Inge Solvoll [EMAIL PROTECTED]wrote:

 Thanks!

 Not the prettiest thing I ever saw, I would have preferred a more
 straghtforward approach from the framework. I need that code pretty often
 in
 most of my pages. But I guess I'll manage to hide it in some utility
 method.

 On Wed, Aug 6, 2008 at 4:00 PM, 9902468 [EMAIL PROTECTED] wrote:

 
  Hi,
 
  I did this:
 
  Java:
 
 @Inject
 private AssetSource assetSource;
 
 public ListLanguage getLanguages(){
 return parameterManager.getLanguages();
 }
 
 @Property
 private Language language;
 
 public String getLanguageAsset(){
 Asset asset = assetSource.getAsset(null, context:/assets/images
  /+language.getLanguage()+.gif, null);
 return asset.toClientURL();
 }
 
  .tml
 
 t:loop t:source=languages t:value=language
 imgtag class=language_flag alt=${language.displayName}
  src=${languageAsset}/
 /t:loop
 
  change imgtag - img
 
 
  Inge Solvoll-2 wrote:
  
   Hi!
  
   I would like to do something like this, but this syntax obviously
 doesn't
   work. The ${bannerPath} seems to be pointing to a symbol, which
   obviously
   isn't a page property.
   Is there a similar way to do this?
  
 @Inject
 @Path(${bannerPath})
 private Asset banner;
  
  
 public String getBannerPath() {
   return context:/company/1/banner.gif;
 }
  
  
 
  --
  View this message in context:
  http://www.nabble.com/T5%3A-Dynamic-asset-path-tp18851298p18851830.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 switch to 5.0.14 snapshot?

2008-08-01 Thread Davor Hrg
properties
   tapestry-release-version5.0.14-SNAPSHOT/tapestry-release-version
 /properties


On Fri, Aug 1, 2008 at 12:26 PM, Angelo Chen [EMAIL PROTECTED]wrote:


 Hi,

 my pom.xml has following entries, what should I change to use the 5.0.14
 snapshot? thanks.

  pluginRepositories

!-- As above, this can be commented out when access to the snapshot
 version
 of a Tapestry Maven plugin is not required.

pluginRepository
  idtapestry-snapshots/id
  urlhttp://tapestry.formos.com/maven-snapshot-repository//url
/pluginRepository

--

  /pluginRepositories

  properties
tapestry-release-version5.0.13/tapestry-release-version
  /properties

 --
 View this message in context:
 http://www.nabble.com/T5%3A-how-to-switch-to-5.0.14-snapshot--tp18771744p18771744.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: dead lock in Tapestry - Hibernate

2008-07-09 Thread Davor Hrg
nice to know :) , thnx
I still use 3.x :)

On Wed, Jul 9, 2008 at 9:10 AM, Angelo Chen [EMAIL PROTECTED]
wrote:


 just discovered that  my mysql jdbc driver is stil 3.x, updated to 5.1.6 in
 pom.xml, problem goes away up to now.


 Angelo Chen wrote:
 
  Hi,
 
  I encounter this warning quite often, it usually happens when I updated a
  row using mysql command line, then quit, after that I either update or
  append some rows using T5-hibernate, any idea why ? Thanks.
 
 
 

 --
 View this message in context:
 http://www.nabble.com/T5%3A-dead-lock-in-Tapestry---Hibernate-tp18353145p18355745.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: Localization in business objects

2008-07-09 Thread Davor Hrg
injection via annotations to fields is only possible for pages,
components...

for pages and comps byte code is changed and greater flexibility is
possible,
for services that tapestry autobuilds, tapestry will use the constructor
with most parameters,

everything else you must connect your self..

...

you can inject message catalog to the page,
and then forward it to the business object before creating the report

Davor Hrg

On Wed, Jul 9, 2008 at 10:47 AM, Udo Abel [EMAIL PROTECTED] wrote:

 Hi,

 is it possible to use the Tapestry Localization (message catalog) outside
 of pages and components, e.g. in business objects creating reports?

 A simple
@Inject
private Messages messages;
 doesn't work.
 Of course Tapestry could supply messages from the main application catalog
 only, but since pages-specific catalogs are usually override existing
 application messages, that would be sufficient.

 If thats not possible we must minic the name-decoration used by tapestry to
 load the best matching properties file, or is there another approach?

 Thanks,
 Udo.


 --
 Pt! Schon vom neuen GMX MultiMessenger gehört?
 Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger

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




Re: AW: AW: AW: AW: Strange behavior of special characters

2008-07-09 Thread Davor Hrg
properties files can not be encoded other than iso1,
you should use natve2acii to convert them.

this might solve your problem

Davor Hrg

On Wed, Jul 9, 2008 at 12:12 PM, Sebastian Altmann [EMAIL PROTECTED] wrote:


 Ok seems like this won't get me anywhre.

 I just can repeat:
 All my properties filese are 100% encoded in UTF-8 (checked this in eclipse
 and in an external editor) and all umlauts are displayed properly (except
 in
 the special case described above).

 To this problem you mentioned concerning Java Properties Files and UTF-8
 encoding i just can guess, that it seems that this problem doesn't inflict
 the usage of properties inside tapestry.
 After i did a lot of testing concerning encoding both on UNIX and Windows
 machines,
 i just can say that special characters in UTF-8 are display properly
 (except
 in the special case described above) as long you set the concerning meta
 information in .application or rather in .library properly.




 Maximilian Weißböck wrote:
 
  I'm very sure the property files that work are not utf-8 encoded
  but iso-8895-1 encoded.
 
  You can use ÄÖÜß and so on with no problem in property files
  (we do it), just be very sure they are iso-8895-1 encoded.
 
  If you use Eclipse, right click on the file, open Properties
  and look at the Text file Encoding.
 
  Max
 
 
  -Ursprüngliche Nachricht-
  Von: Sebastian Altmann [mailto:[EMAIL PROTECTED]
  Gesendet: Dienstag, 8. Juli 2008 15:11
  An: users@tapestry.apache.org
  Betreff: Re: AW: AW: AW: Strange behavior of special characters
 
 
  Sorry but I just don't get it...
 
  After you mentioned the first time that there are problems concerning
  properties files in UTF-8 I also found this and similar articles on the
  sam
  topic.
 
  I would quietly accept this,
  if my special characters were displayed wrong all over the application
 and
  in other applications too, but i can't understand why this should be a
  general Java problem even though in 99% of cases my special characters
 are
  displayed properly.
 
 
 
  Maximilian Weißböck wrote:
 
  The load and store methods load and store properties in a simple
  line-oriented format specified below. This format uses the ISO 8859-1
  character encoding. Characters that cannot be directly represented in
  this
  encoding can be written using Unicode escapes  ; only a single 'u'
  character is allowed in an escape sequence. The native2ascii tool can be
  used to convert property files to and from other character encodings.
 
  from http://java.sun.com/j2se/1.5.0/docs/api/java/util/Properties.html
 
  Max
 
  -Ursprüngliche Nachricht-
  Von: Sebastian Altmann [mailto:[EMAIL PROTECTED]
  Gesendet: Dienstag, 8. Juli 2008 09:19
  An: users@tapestry.apache.org
  Betreff: Re: AW: AW: Strange behavior of special characters
 
 
  Yes I'm reading my values from properties files which are utf-8 encoded,
  but what really confuses me is that you tell me they aren't allowed i
  utf-8.
 
  Because we're running an application with utf-8 properties-files without
  any
  problems.
 
  This strange behavior can only be found in anatoher application.
 
 
 
 
  Maximilian Weißböck wrote:
 
  Do you read this values from a property file?
  Property files in Java may not be utf-8 encoded.
  The have to be iso-8859-1 encoded.
  Many thanks to Sun ...
 
  Max
 
 
  -Ursprüngliche Nachricht-
  Von: Sebastian Altmann [mailto:[EMAIL PROTECTED]
  Gesendet: Montag, 7. Juli 2008 14:54
  An: users@tapestry.apache.org
  Betreff: Re: AW: Strange behavior of special characters
 
 
  No i didn't because i am using tapestry 4.0.2 (forgot to mention this
  :-(()
  but i read similar atricles on tapestry 4.
 
  The weird thing is that my encoding basically is ok,
  and this strange things happen just under certain circumstances.
 
  Another thing that confuses me is that for example in löschen not
 just
  the
  ö isn't displayed correct
  but also the 3 following characters (sch).
  This happens to every string with special characters (mostly not the
  next
  3
  but the next 2 characters ).
 
 
 
  Maximilian Weißböck wrote:
 
  Did you have a look at
  http://wiki.apache.org/tapestry/Tapestry5Utf8Encoding
 
  Max
 
 
  -Ursprüngliche Nachricht-
  Von: Sebastian Altmann [mailto:[EMAIL PROTECTED]
  Gesendet: Montag, 7. Juli 2008 14:06
  An: users@tapestry.apache.org
  Betreff: Strange behavior of special characters
 
 
  Hi,
 
  we provide our tapestry application in two languages (german and
  english)
  which work quite fine but with one problem.
 
  The problem is, that special characters used in german (like ö, ü, ä)
  are
  displayed wrong the first time i access a page (in this case i get
  l?en
  instead of  löschen för example).
  If i do a refresh on the page or just navigate to another page all my
  special characters are displayed correct all over the application.
 
  My first suspicion was that this is some kind of browser problem,
  because the page's

Re: T5 firefox IE7

2008-06-15 Thread Davor Hrg
actualy ff is sluggish also,
I way annoyed with it some time ago until FF3
ff3 is blazing fast with js.. but this no excuse to ignore this.

ff2 was quick to render a page, but a second or two after loading
page, it would freeze for a bit.

to observe this, put a simple list with cdss rollover on the page,
load the page and move mouse over the list.. at some point
rollover effect will stop working for a short period.

this all du to using full js framework like scriptaculous, prototype and etc
prototype.js is about 150 k, and even when loaded from cache or gzipped,
the browser still has to evaluate 150 k of js code, which is plenty.

full js frameworks like dojo for example are great for apps that are on a
single page,
but for a app that goes from page to page, this becomes a problem.

I've made a prototype.js replacement that is stripped to minimum, and page
works well.

I've wanted to contribute this to project, but pretty busy in last two
months.


Davor Hrg



On Sat, Jun 14, 2008 at 1:36 PM, [EMAIL PROTECTED] wrote:

 also, firebug really slows ff down.

 On 6/14/08, maxthesecond [EMAIL PROTECTED] wrote:
 
  As my T5 application was evolving, I've noticed an important slow down in
  performance, but as you don't have time for everything I tributed to de
  debug mode or whatever...but few pages latter I begin to be very worried,
  looking at the console output the Request time kept ridiculously short,
 but
  from the browser side the application was horrible slugish.
 
  I usually work with firefox 2.0.0.14, I give a try to IE7, and to my
  surprise it performed much better, finally I set off the JavaScript in
  firefox and now it runs as I expect to do.
 
  I would like to know if the rest of the world has noticed such a
 behaviour
  or I'm just fooled.
 
  Another point to remarq is that after switching off JS the memory usage
 has
  drop dramatically.
 
  (Running Windows Xp)
 
  Thanks
  --
  View this message in context:
  http://www.nabble.com/T5-firefox-IE7-tp17837412p17837412.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]
 
 


 --
 Andreas Andreou - [EMAIL PROTECTED] - http://blog.andyhot.gr
 Tapestry / Tacos developer
 Open Source / JEE Consulting

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




HINT tapestry - tapestry5 package rename

2008-06-15 Thread Davor Hrg
Hi,

I've just refactored few of my t5 apps to rename package
org.apache.tapesrty to org.apache.tapesrty5

It was very tiresome to do it for all classes one by one,
so I tried a trick and it worked.

This works for me in eclipse, it might be also used in other tools.

1. remove tapestry dependancy from the project (from pom or otherwise)
2. create the package org.apache.tapestry inside your source
3. use refactor rename on that package
4. delete the package from the source


after that there are few thigs to do also:

TapestryConstants was split into few classes

org.apache.tapestry5.
BindingConstants (PROP, LITERAL)
MetaDataConstants (RESPONSE_CONTENT_TYPE...)
PersistenceConstants
SymbolConstants (PRODUCTION_MODE)

org.apache.tapestry5.internal
InternalConstants (TAPESTRY_APP_PACKAGE_PARAM...)

PageRenderSupport was renamed to RenderSupport

hope someone finds this useful :)

Davor Hrg


Re: how to capture the submit event which occured from a input type=image

2008-05-29 Thread Davor Hrg
 isCancel = _type.equalsIgnoreCase(submitcancel) ||
_type.equalsIgnoreCase(cancel);
String eventType = isCancel ? CANCEL_EVENT : SELECTED_EVENT;
ComponentEventCallback callback = isCancel ? new
ComponentResultProcessorWrapper(_eventResultProcessor) : null;
_resources.triggerEvent(eventType, null, callback);
}
};

// When not deferred, don't wait, fire the event now (actually, at
the end of the current
// heartbeat). This is most likely because the Submit is inside a
Loop and some contextual
// information will change if we defer.

if (_defer) _formSupport.defer(sendNotification);
else _heartbeat.defer(sendNotification);

}

// For testing:

void setDefer(boolean defer)
{
_defer = defer;
}

void setType(String type)
{
_type = type;
}

void setup(ComponentResources resources, FormSupport support, Heartbeat
heartbeat)
{
_resources = resources;
_formSupport = support;
_heartbeat = heartbeat;
}
}


as you can see the code is realy simple, it is easy to get this to support
input type=image

Davor Hrg


On Thu, May 29, 2008 at 9:22 AM, LakshithaS [EMAIL PROTECTED] wrote:


 Thanks all for the replies, ctually this onSelected method works only with
 submit component. finally i have finished my work using a hidden field.
 Still couldn't find a tapestry solution for this matter.



 nille hammer wrote:
 
 
  Hi Lakshitha,
 
  the event handler Methods for Submit-Buttons end with ed. See this for
  an example
  (
 http://tapestry.apache.org/tapestry5/tapestry-core/ref/org/apache/tapestry/corelib/components/Submit.html
 )
  rename your methods to:
  onSelectedFromUpload()
  onSelectedFromNext()
 
  That should fix it.
 
  Cheers nillehammer
 
  - original Nachricht 
 
  Betreff: how to capture the submit event which occured from a input
  type=image
  Gesendet: Mi, 28. Mai 2008
  Von: LakshithaS[EMAIL PROTECTED]
 
 
  HI.. all,
  I have a situation like this, i have a single form and two image buttons
  (actually i am using input type=image instead of  input
  type=submit).
  The problem is identify the which image button has done the form
  submission.
  Coz i am doing two tasks from these two image buttons.  one is for data
  saving and one is for image uploading. Is there a way to find which
  button
  has done the form submission?
 
  i tried like this
  component Id's are upload and next respectively
 
   public void onSelectFromUpload(){
   System.out.println(onSelectFromUpload );
   nextPage = null;
   }
 
   public void onSelectFromNext(){
   System.out.println(onSelectFromNext );
   nextPage = RegistrationStepTwo;
   }
 
  any idea ? thanks in millions..
  --
  View this message in context:
 
 http://www.nabble.com/how-to-capture-the-submit-event-which-occured-from-a-i
  nput-type%3Dimage-tp17511184p17511184.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]
 
 
 
  --- original Nachricht Ende 
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

 --
 View this message in context:
 http://www.nabble.com/how-to-capture-the-submit-event-which-occured-from-a-input-type%3Dimage-tp17511184p17529120.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: how to capture the submit event which occured from a input type=image

2008-05-28 Thread Davor Hrg
it works only wih submit component,
the submit component is pretty basic,
but you might easily create your own submit comp
by copy/paste the original
and add-in extra options you need



On Wed, May 28, 2008 at 2:45 PM, nille hammer
[EMAIL PROTECTED] wrote:


 Hi Lakshitha,

 the event handler Methods for Submit-Buttons end with ed. See this for an
 example (
 http://tapestry.apache.org/tapestry5/tapestry-core/ref/org/apache/tapestry/corelib/components/Submit.html)
 rename your methods to:
 onSelectedFromUpload()
 onSelectedFromNext()

 That should fix it.

 Cheers nillehammer

 - original Nachricht 

 Betreff: how to capture the submit event which occured from a input
 type=image
 Gesendet: Mi, 28. Mai 2008
 Von: LakshithaS[EMAIL PROTECTED]

 
  HI.. all,
  I have a situation like this, i have a single form and two image buttons
  (actually i am using input type=image instead of  input
 type=submit).
  The problem is identify the which image button has done the form
  submission.
  Coz i am doing two tasks from these two image buttons.  one is for data
  saving and one is for image uploading. Is there a way to find which
 button
  has done the form submission?
 
  i tried like this
  component Id's are upload and next respectively
 
public void onSelectFromUpload(){
System.out.println(onSelectFromUpload );
nextPage = null;
}
 
public void onSelectFromNext(){
System.out.println(onSelectFromNext );
nextPage = RegistrationStepTwo;
}
 
  any idea ? thanks in millions..
  --
  View this message in context:
 
 http://www.nabble.com/how-to-capture-the-submit-event-which-occured-from-a-i
  nput-type%3Dimage-tp17511184p17511184.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]
 
 

 --- original Nachricht Ende 


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




Re: Grid Source Persist and Paging

2008-05-20 Thread Davor Hrg
If you do want to stick with this approach,

persist the results in session,
do search when form is submitted.

now, to clear results you can do it in two ways:
if you do not link to that page from many sides,
add an activation parameter on each external link
that parameter can be anytthing so you know
user just came from another page.

or reverse situation, add a parameter to all your local links
and reset results when it is missing.

this is a general explanation, .. no time to paste some specific code 


Davor Hrg




On Mon, May 19, 2008 at 11:53 PM, Todd Orr [EMAIL PROTECTED] wrote:

 I have a Form and a Grid on my search page. The Form's success handler
 populates a List results variable using an expensive query that I'd
 like to not run on every Grid page navigation. To prevent unnecessary
 query hits I use the @Persist annotation on the results var. The
 getResults method is used as the source for the grid. This works well.
 However, I'd like to not have the user's previous results (from
 session) populate the grid when the page is hit later on in a user's
 session after an initial search has been made. So, I change the
 persist to use the flash strategy. However now the paging on the Grid
 fails.

 I'd like to have the Grid be empty the first time the search page is
 hit. I'd like the results to be saved so that the search query doesn't
 need to be run unless the form is submitted. I'd like to be able to
 page through the results in the Grid.

 What is the recommended approach to solving this case?

 Thanks,
 T

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




Re: Instability in Tapestry 5.0.12-SNAPSHOT

2008-05-20 Thread Davor Hrg
+1 for org.apache.tapestry5

I havent given it too much thought, but sounds ok

Davor Hrg

On Tue, May 20, 2008 at 3:08 PM, Martin Strand 
[EMAIL PROTECTED] wrote:

  I wouldn't go for ng though, merely because what if there's a new next
 generation.

 I think that would be Tapestry Deep Space Nine. :P


 On Tue, 20 May 2008 13:28:12 +0200, Christian Edward Gruber 
 [EMAIL PROTECTED] wrote:

  Heh.  The fish bit did get kinda carried away there.  But I guess
  we're still united by the fillet designation. ;)
 
  I wouldn't go for ng though, merely because what if there's a new
  next generation.  It gets silly.  Either a version or a codename, I
  figure.  Maybe sb for strutsbuster.
 
  Christian.
 
  On 20-May-08, at 06:24 , kranga wrote:
 
  Somebody likes fish :)
 
  +1 for the idea
  -1 for the fishiness of it!
 
  I would go with a distinguisher in the package other than the
  version so that come T6, new users are wondering what on earth?
 
  My suggestion would be
 
  org.apache.tapestry.ng(for Next Generation)
 
  or along the food line:
 
  org.apache.tapestry.mignon
  org.apache.tapestry.ribeye
  org.apache.tapestry.nystrip
  org.apache.tapestry.porterhouse
 
  you get the drift :)
 
 
  - Original Message - From: Christian Edward Gruber 
 [EMAIL PROTECTED]
  
  To: Tapestry users users@tapestry.apache.org
  Sent: Monday, May 19, 2008 6:22 PM
  Subject: Re: Instability in Tapestry 5.0.12-SNAPSHOT
 
 
  Again, the differences between T3, T4, and T5 are not really
  versions in the typical sense.  They're different architectural
  bases.  You might call them three different web frameworks
  entirely.   So there should be no reason technically for them to
  overlap, and they  should have three different packages.  You might
  as well have them by  three different codenames, at which point you
  have
 
  org.apache.tapestry.trout
  org.apache.tapestry.tuna
  org.apache.tapestry.tilapia
 
  Different frameworks, all under the Tapestry project.  The fact
  that org.apache.tapestry.yellowtail shows up in four years should
  have no bearing on the other three. (again, not that it will, just
  making a point)
 
  Christian.
 
 
  On 19-May-08, at 17:59 , Markus Joschko wrote:
 
  I'm not against a package rename but against the version number.
 
  The only benefit of putting a version number in, is to help tap4
  users
  now. But who will care about tap4 in 2 years?
  The version number will still be in the code base by then.
  If the official version number of tapestry is changing from 5 to
  2011
  or whatsoever, developers will at best be irritated by the tapestry5
  package names
 
 
 
 
  On Mon, May 19, 2008 at 11:41 PM, Sven Homburg 
 [EMAIL PROTECTED]
   wrote:
  markus,
 
  i voted for package renaming like org.apache.tapestry5
  but i go even conform with your mind.
 
  if i read the reason for the package renaming, i was relay
  alienated for that,
 
  but on the other side, i am not sure, its more easier for
  some tap4 user to migrate slowly to tap5.
 
  but i am not sure, in our real fast spinning world,
  if  there are much developer they say i migrate tommorow
  and belive their own mind voice.
 
  2008/5/19 Markus Joschko [EMAIL PROTECTED]:
 
  Looks like I am alone but I don't like the idea of putting version
  numbers into package names.
  In the highly unlikely case that there will be a tapestry 6 (not
  for
  technical but solely for marketing reasons ;-)) it might confuse
  developers. Are the classes in tapestry5 still valid or not?
 
  Only developers who will run tapestry4 and 5 in one webapplication
  might have the problem of distinguishing between the packages.
  I guess that they are the minority and it might be reasonable
  for  them
  to read the class comments if they are in doubt which package
  belongs
  to which tapestry version.
 
  so -1 for a tapestry5 or v5.
 
  my 2cents,
  Markus
 
  On Mon, May 19, 2008 at 9:58 PM, Blower, Andy
  [EMAIL PROTECTED] wrote:
  I agree.
 
  -Original Message-
  From: Massimo Lusetti [mailto:[EMAIL PROTECTED]
  Sent: 19 May 2008 16:02
  To: Tapestry users
  Subject: Re: Instability in Tapestry 5.0.12-SNAPSHOT
 
  On Mon, May 19, 2008 at 4:57 PM, Howard Lewis Ship 
 [EMAIL PROTECTED]
  
  wrote:
 
  The question is: would it have been better to just broadly
  rename
  org.apache.tapestry to org.apache.tapestry5?  There was quite
  a  bit
  of
  discussion back on forth among the developers on this one.
 
  I would say yes.
 
  --
  Massimo
  http://meridio.blogspot.com

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




Re: [T5] component is not Datefield format for dd / mm / yyyy?

2008-04-25 Thread Davor Hrg
because of licensing issues,
tapestrz has fallen back to a calendar with less features

Davor Hrg

On Fri, Apr 25, 2008 at 2:21 AM, Estevam Henrique Portela Mota e Silva 
[EMAIL PROTECTED] wrote:

 Hi,

 Do I need to format dd / mm /  is standard in Brazil but not worked.
 Only worked 5.0.9
 When can test, which is different 5.0.9 and 5.0.11

 Start.java (source)

 Public Class Start {
 @ Persist
 Date _dateTest private;
 GetDateTest public Date () (return _dateTest;)
 public void setDateTest (Date dateTest) (_dateTest = dateTest;)
 }

 Start.tml

 html xmlns:t=http://tapestry.apache.org/schema/tapestry_5_0_0.xsd;
 head
 title System Start Page /title
 / head

 body
 t:form
 t:datefield value=dateTest format=%d/%m/%Y/
 /t:form
 / body
 /html

 POM.xml - I put 5.0.11
 5.0.11 - does not work the date format is mm / dd / .
 How resolved?

 --
 Regards,

 Estevam Henrique Portela Mota e Silva
 [EMAIL PROTECTED]
 Programmer Java and Tapestry
 Brazil - Fortaleza / CE
 Handicapped Auditory = deaf



Re: [T5] Javascript links rendered on bottom of page?

2008-04-24 Thread Davor Hrg
This a recommendation from YSlow,

because it helps wrowser render page faster by leaving
javascript part for the end.

you should put your initialization code in onload...


Davor Hrg


On Thu, Apr 24, 2008 at 2:13 PM, Harald Geritzer [EMAIL PROTECTED]
wrote:


 hi all,

 is there a special reason for rendering the javascript includes on bottom
 of the page in latest 5.0.12 snapshot?

 i got a fckeditor on my page and it seems like my editor field wants to
 initialize the FCKeditor before the script ist even loaded?

 any hints welcome,
 harald


 script type=text/javascript
 var editor_html = new FCKeditor('html');
 editor_html.BasePath = '/wtp/assets/rd/t5/components/fckeditor/';
 editor_html.ToolbarSet = 'Default';
 editor_html.Height = '300px';
 editor_html.Width = '100%';
 editor_html.Value = '';
 editor_html.Create();

 /script

 ...

 script src=/wtp/assets/scriptaculous/5.0.12-SNAPSHOT/prototype.js
 type=text/javascript/scriptscript
 src=/wtp/assets/scriptaculous/5.0.12-SNAPSHOT/scriptaculous.js
 type=text/javascript/scriptscript
 src=/wtp/assets/scriptaculous/5.0.12-SNAPSHOT/effects.js
 type=text/javascript/scriptscript
 src=/wtp/assets/tapestry/5.0.12-SNAPSHOT/tapestry.js
 type=text/javascript/scriptscript
 src=/wtp/assets/rd/t5/components/Indicator.js
 type=text/javascript/scriptscript
 src=/wtp/assets/rd/t5/components/fckeditor/fckeditor.js
 type=text/javascript/scriptscript type=text/javascript
 !--
 Tapestry.DEBUG_ENABLED = true;
 Tapestry.onDOMLoaded(function() {
 Tapestry.init({validate:[[index,[[required,Sie müssen einen Wert
 für Index angeben.]]],[name,[[required,Sie müssen einen Wert für Name
 angeben.]]],[language,[[required,Sie müssen einen Wert für Sprache
 angeben.]]],[contentType,[[required,Sie müssen einen Wert für Typ
 angeben.]]],[selectShop,[[required,Sie müssen einen Wert für Select
 Shop angeben.]]],[contentLocation,[[required,Sie müssen einen Wert für
 Ort angeben.]]],[depth,[[required,Sie müssen einen Wert für Tiefe
 angeben.});
 });
 // --
 /script/body/html

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




Re: T5 equivalent for T4 IExternalPage.activateExternalPage

2008-04-22 Thread Davor Hrg
I think it is:
public void onActivate(String param1, int param2, Entity param3...){
}



On Tue, Apr 22, 2008 at 1:58 PM, Jan Vissers [EMAIL PROTECTED] wrote:

 Hi,

 Just out of curiosity. What's T5 designated alternative for T4's
 IExternalPage public void activateExternalPage(Object[] parameters,
 IRequestCycle cycle)

 Thx,
 -J.



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




Re: Threading issues with DB operations on OS X

2008-04-22 Thread Davor Hrg
what version of tapestry is it ?

there has been a recent fix that changes the way trasactions are handled.
before that database connections were on autocommit and sometimes that
caused
the problems you describe.
if you commit explicitely the problem will most likely be gone ...

Davor Hrg


On Tue, Apr 22, 2008 at 5:26 PM, Moritz Gmelin [EMAIL PROTECTED] wrote:

 Hi,

 There seems to be some threading issues when doing database updates from
 page to page.
 E.G. we have a page that displays a list of elements in a Database table
 and a button that you can click to add a new entry.
 The button is a ActionLink. Its method handler adds an element to the
 database table and returns the user to the same page.
 Normally, for each click of the button, I can see one row added to the
 database and visible in the grid on the page. But sometimes if I click the
 button, the content of the grid does not change although I can see that an
 element was added to the database.
 From other similar problems we have with the application, I would guess,
 that the display of the new page happens with a new database session, where
 the old session's transaction (to add the element) is not yet finished.
 The environment we use is OS X with Java 1.5.0 and a PostgreSQL Database.
 Has anybody else seen this behaviour?
 Is there somewhere  I can for a transaction to be completely finished
 before the new page is activated ?

 Thanks

 Moritz

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




Re: T5: onActivate() called twice

2008-04-21 Thread Davor Hrg
you have to be more specific,

same OnActivate method will not be called more than once in normal
circumastances,

but overriding onActivate from a base class I belive can cause this ...

some code would be useful.

Davor Hrg

On Mon, Apr 21, 2008 at 12:41 PM, Leon Derks [EMAIL PROTECTED] wrote:

 Hi,

 I noticed that my onActivate() is called twice.

 I solved the problem by changing onActivate() into onActivate(Object[]
 parameters).

 Now it is only called once. But is this the way to do this or is there a
 better way?

 greetings,
 Leon



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




Re: Trolls (Rob Smeets, Emmanuel Sowah, you know)

2008-04-16 Thread Davor Hrg
We did try many ways to deal wit this particular person,
called him TROLL, tried asking real question, ignorring... etc.

he was never for a real technical discussion,
and this email account he uses is most likely an alias to hide his true
identity.

Reporting him to abuse admins is no violation of his freedom of speech
because the administrators on gmail and hotmail will decide if this
something that should be sanctioned, we only send our grievance to the
abuse dept. The abuse admins will then decide if we are overreacting.

Davor Hrg


On Wed, Apr 16, 2008 at 3:30 PM, Andy Pahne [EMAIL PROTECTED] wrote:

 Chris Lewis schrieb:

  ...
  I will agree with you that he should be free to do so - but with _his_
  resources, not ours.
 
  ...

 Yeah, you (and Christian) convinced me about this his megaphone and our
 megaphone thing.

 irony
   Time to get out my dung fork and start the hunting.
 /irony

 BTW: Tapestry rules. No troll could convince me of the opposite.


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




Re: T5: component id, element id

2008-04-15 Thread Davor Hrg
if the component does not have an id
you can olso do follwing:

in the mixin... add an arbitrary hidden element before the component
set id for that element and use:
var anchor = document.getElementById(idOfElement);
var compDomNode = anchor.nextSibling;

you can do that also by putting an element after the component,
and thus use this approach only when id is not available

I dislike using explicit ids in my js app at all, but that's just the way
I like it...


Davor Hrg


On Tue, Apr 15, 2008 at 11:13 AM, Chris Lewis [EMAIL PROTECTED]
wrote:

 The goal
 -
 To create a mixin that will attach a client-side javascript object to
 the mixing component. This mixin should not know anything about the
 component and remain completely genereic, needing only a DOM id to
 provide to the JS object.


 Requirements
 -
 To attach JS behavior, you need a DOM id. Therefore the mixin must be
 able to obtain this value from the component.


 Problems
 -
 Not all components generate DOM ids, in which case you have to provide
 one informally.
 For a mixin to be able to attach a JS object to an element generated by
 a component, it has to be able to obtain that id.

 Digging through api I have found 2 possible ways to obtain the DOM id.
 1) If the component implements ClientElement, then
 ClientElement#getClientId is the correct way.
 2) If the component has used the MarkupWriter
 (
 http://tapestry.apache.org/tapestry5/apidocs/org/apache/tapestry/MarkupWriter.html
 )
 to create the exact element from which we need the DOM id, then we can
 use MarkupWriter#getElement to get that element before it is closed.
 With that Element
 (
 http://tapestry.apache.org/tapestry5/apidocs/org/apache/tapestry/dom/Element.html
 )
 we can see if a DOM id has been set by using Element#getAttribute (and
 passing id as the argument).


 Last notes
 -
 Perhaps I'm a bit delusional on this issue. At first I thought that the
 DOM id was so important that there should be a more intimate handling of
 it, perhaps moving the getClientId from ClientElement to
 ComponentResourcesCommon, so that _every_ component has one. The problem
 is that a component can be arbitrarily complex, generating markup of an
 unknown hierachical depth of elements. In addition, the component body
 may be constructed primarily by it's template.

 I'm still thinking on this, but it seems like attaching a mixin to a
 component's dom id will require explicitly telling it what that is.

 Input still welcome :-)

 chris

 --
 http://thegodcode.net



 Josh Canfield wrote:
  Ah, id with no t: is just a parameter like any other. Try this mixin:
 
  import org.apache.tapestry.MarkupWriter;
  import org.apache.tapestry.annotations.Parameter;
 
  public class Title {
 
  @Parameter(defaultPrefix=literal)
  private String _id;
 
  void beginRender(MarkupWriter writer)
  {
  writer.attributes(title, You're id is  + _id);
  }
  }
 
 
  The downside is if the component you are mixing into already has the
  id parameter define, your mixin gets null. I'm not sure why they can't
  share... the docs say
 
  If the component and a mix both define a parameter with the same
  name, then the component wins: the component's parameter will be
  bound, and the mixin's parameter will be unbound.
 
  but I'm not clear why that is the case.
 
  Does that help?
  Josh
 
  On Thu, Apr 10, 2008 at 9:57 PM, Chris Lewis [EMAIL PROTECTED]
 wrote:
 
  Hi Josh,
 
  Indeed t:id does work, but apart from the fact that I'm not entirely
  sure what T5 does with that value as opposed to the un-namespaced
  version (id), it doesn't fully work. The reason is because the Any
  component, like many in the core lib, do not explicitly write a DOM id
  in the HTML of the resulting element. So while this allows me to get
  some id in java code (which I need), it doesn't address the problem of
  their not being a DOM id, so of course my JS fails. The only ways
 around
  this that I know are:
 
  1) Explicitly provide the id as the normal 'id' attribute in the
  template as an informal parameter and provide another one in the t:
  namespace, to be passed to the component. The problem with this is I
  have to provide it twice, which aside from being annoying is
 error-prone.
 
  2) Have the mixin explicitly write a HTML id attribute to the tag of
 the
  containing component. This would be horrible in my opinion, because
  without intimate knowledge of the component using the mixin, or any
  other mixins coordinating behavior, you can't know be sure you won't
  damage something (overwriting an id attribute already created, writing
 a
  second id attribute (which would be wrong), etc). And of course if the
  mixin requires intimate knowledge then it's not a good mixin.
 
  Thanks - any other ideas? :-)
 
  chris
 
 
  Josh Canfield wrote:
 
  Hey Chris,
 
  t:id=my_div seems to do what you want. I haven't looked closely

Re: AW: Getting Answers on the User List

2008-04-15 Thread Davor Hrg
did it :)

take a random post from rob and do it also if you have gamil acc.
all the posts are offensive more or less

https://gmail.google.com/support/bin/answer.py?answer=29381

Davor Hrg

On Tue, Apr 15, 2008 at 1:54 PM, Michael Gerzabek [EMAIL PROTECTED]
wrote:

 +1

 Chris Lewis schrieb:

  I think it's about time we report this jackass to google or even the
  FTC. Apart from being a bothersome embarrassment to humanity, he's most
  likely in violation of google's terms of service as well as at least one
  law.
 
  Rob Smeets wrote:
 
 
   Oh, Mr. Lewis Ship, so you're musical. All the musicians I know who
   program
   are forward thinking people and very talented. They don't go and do a
   re-work after they've made a release. You've been violating even
   CS101. I'm
   very surprised.
  
   Your friendly,
  
   Rob
  
  
 

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




Re: How to 'bypass' client side validation - when 'Cancel' is pressed.

2008-04-15 Thread Davor Hrg
you can do it with javascript... sth like this (not tested)

put a normal
input type=submit value=${cancel} onclick=return
avoidValidation(this)


function avoidValidation(elem){
var form = elem.parentNode;
//find form
while(form  form.tagName != FORM) form = form.parentNode;
form.onsubmit = null;
return true;
}

I've added a jira for this some time ago ... and it got prolonged to T5.1
somehow :(

https://issues.apache.org/jira/browse/TAPESTRY-2109




On Tue, Apr 15, 2008 at 7:35 PM, Filip S. Adamsen [EMAIL PROTECTED] wrote:

 There is no way to do this as far as I know. I believe the current
 workaround is to create an action link styled as a button and do whatever
 needs doing there.

 -Filip


 On 2008-04-15 19:34, Jan Vissers wrote:

  I'm getting the hang of it --- and liking it!
 
  Yet another question;
  How can I bypass normal client side validation, in case I have a form
  that includes a 'Cancel' button. Currently I need to enter something
  valid before I can 'Cancel' my action - not really what I want ;-)
 
  -J.
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




Re: How to 'bypass' client side validation - when 'Cancel' is pressed.

2008-04-15 Thread Davor Hrg
you are right :)

I saw some crossbrowser code that assumed input.form is not
always available ... I haven't looked into the reasons for it.

On Tue, Apr 15, 2008 at 9:06 PM, Andreas Andreou [EMAIL PROTECTED] wrote:

 not true, even IE4 had this - it's also extensively used in T4.1

 But your code is good when you start from any given dom node, i.e. a link
 and not just an input control

 On Tue, Apr 15, 2008 at 9:55 PM, Davor Hrg [EMAIL PROTECTED] wrote:
  that does not work for all browsers as far as I know... :)
   I can't remember which any more...
   but try it out in IE and FF, I think one of them does not support it
 :(:(
 
   Davor Hrg
 
 
 
   On Tue, Apr 15, 2008 at 8:51 PM, Andreas Andreou [EMAIL PROTECTED]
 wrote:
 
fyi, you can get to the form easier (assuming you're in a form
 control)
with
var form = elem.form
   
On Tue, Apr 15, 2008 at 9:38 PM, Davor Hrg [EMAIL PROTECTED]
 wrote:
 you can do it with javascript... sth like this (not tested)

  put a normal
  input type=submit value=${cancel} onclick=return
  avoidValidation(this)


  function avoidValidation(elem){
 var form = elem.parentNode;
 //find form
 while(form  form.tagName != FORM) form = form.parentNode;
 form.onsubmit = null;
 return true;
  }

  I've added a jira for this some time ago ... and it got prolonged
 to
T5.1
  somehow :(

  https://issues.apache.org/jira/browse/TAPESTRY-2109






  On Tue, Apr 15, 2008 at 7:35 PM, Filip S. Adamsen [EMAIL PROTECTED]
wrote:

   There is no way to do this as far as I know. I believe the
 current
   workaround is to create an action link styled as a button and do
whatever
   needs doing there.
  
   -Filip
  
  
   On 2008-04-15 19:34, Jan Vissers wrote:
  
I'm getting the hang of it --- and liking it!
   
Yet another question;
How can I bypass normal client side validation, in case I have
 a
form
that includes a 'Cancel' button. Currently I need to enter
something
valid before I can 'Cancel' my action - not really what I want
 ;-)
   
-J.
   
   
   
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:
 [EMAIL PROTECTED]
   
   
  
 -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  

   
   
   
--
Andreas Andreou - [EMAIL PROTECTED] - http://blog.andyhot.gr
Tapestry / Tacos developer
Open Source / JEE Consulting
   
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
   
   
 



 --
 Andreas Andreou - [EMAIL PROTECTED] - http://blog.andyhot.gr
 Tapestry / Tacos developer
 Open Source / JEE Consulting

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




Re: AW: Getting Answers on the User List

2008-04-14 Thread Davor Hrg
Again,

will you back up any of your claims with something technical,
and stop whining ?

you are not a wicket user and you know too little about it
to comapre it to tapestry.

Why do you keep bringinng wicket up again, and again ?

Why don't you reply to any user mail to help, or ask for help
like real users ?

I'm would ignore you just like jesse,
but someone must mark your remarks as they are: TROLL,
so nobody is mistaken when reading these threads.



Davor Hrg

On Mon, Apr 14, 2008 at 3:28 PM, Rob Smeets [EMAIL PROTECTED] wrote:

 And please allow me to also mention that, not only are high profile
 Tapestry
 users abandoning Tapestry, high profile sites which were using Tapestry
 are
 also ditching Tapestry. An example is theserverside.com which whacked
 Tapestry like a baseball from their servers and replaced it with another
 webframework, maybe Wicket, I'm not sure. This because they have a
 business
 model that looked forward into the future. Their model wasn't compatible
 with Tapestry, which would have meant in every major release they would
 have
 to rewrite their frontend all over again and again.

 BTW, why is Jesse Kuhnert not participating anymore in the forum? Is he
 going to be the next to deflect?

 Yours friendly,

 Rob

 On Mon, Apr 14, 2008 at 12:41 PM, Rob Smeets [EMAIL PROTECTED] wrote:

  Howard,
 
  Please stop throwing a dark blanket on me condemning me. Why not pick on
  the points I made head on and defend yourself? Wel,
  I'm not surprised you're not doing it because you are not destined to
 take
  challenges head on.
  Is it not true Tapestry's popularity has diminished over the last couple
  of years or so? Is it not true high profile users have
  fled away from Tapestry like flies. If you dispute this I can even name
  more names. That within 7 years you've
  trained only 100 developers says a lot about the status of Tapestry. I
  would have expected more than a 1,000 within the seven years,
  if you say Tapestry is one of the best. I know the mass used to follow
  Tapestry. But the unfortunate thing is at the release of
  any major version, you punch them hard in the stomach and then they flee
  from the schock and pain. At a point in time your
  ego became inflated to an explosive point. And as we all know, from any
  bubble there is a burst. That's why you're in the current
  state.
  The solution to all your current travails? Maybe you should rename
  Tapestry 5, to maybe Wicketstry, because it
  resembles Wicket so much. By doing so all the misery and the hooplas
 about
  backward incompatibilty would end and you'll have
  your peace of mind.
 
  Howard, I'm only a messenger and as the saying goes, don't persecute the
  messenger.
 
  Yours friendly,
 
  Rob
 
  On Fri, Apr 11, 2008 at 9:07 PM, Howard Lewis Ship [EMAIL PROTECTED]
  wrote:
 
   My father in law is a brilliant marketer; he has this incredible
   ability to pick up the jargon and terminology of whatever he's working
   with.  I remember picking him up from the airport once and he's
   chatting about Tapestry and Spring and all that ... and he really
   doesn't know what it all is (nor would anyone expect him to), but he's
   able to use the correct words at the correct time and sound like he
   knows how everything fits together.  It's actually quite impressive.
  
   I kind of picture Rob as a dark mirror image of this; perhaps he's a
   capable engineer with a weird streak and way too much time on his
   hands, but based on just the postings here, my picture is of a
   socially awkward 15 year old with acne (and maybe a stutter) who is
   capable of stringing together words and phrases without really
   understanding any of it.  Rob gets a sense of power by trying to
   tweak myself and the Tapestry community.  Very sad ... I went though
   a socially awkward stage (say, from age 12 to maybe 30 :-) ) but I
   don't remember ever having this kind of destructive, lizard-brain
   aspect.
  
   Mailing lists and blogs are not the real world; anyone who has the
   time and obsessive energy to post troll comments the way Rob does
   has pretty much discounted his voice.  People whose opinion counts,
   those who have something valuable to say or have actually accomplished
   something worthwhile, are WAY too busy to get into a verbal ping-pong
   match with Rob here or on some other forum. In that respect, Rob is
   a somewhat positive force in the Tapestry world ... by getting the ire
   up of the many, many Tapestry users who love the framework and can't
   stand to see it bashed.
  
   The reality is that right now I'm sitting in an office at Formos and
   every single person in the building is deriving their living directly
   from Tapestry and the effort I've put into it over the last seven
   years.  And that's just the company I work for; Over the last few
   years, I've trained perhaps 100 developers at many different companies
   on how to use Tapestry. I'm likely to double that number in the next

Re: T5: obtaining a list of valid pages

2008-04-14 Thread Davor Hrg
there is also ClassNameLocator service
with methods to list classes in a package

On Mon, Apr 14, 2008 at 10:55 PM, Marcus [EMAIL PROTECTED] wrote:

 Hi Angelo,

 - get ContextClassLoader from current Thread
 - get path of your pages package (org.exemplo.teste.pages) from
 ClassLoader
 - get files on this path that ends with .class, skiping inner classes.

 I think this topic already has been discussed here.

 Marcus.



Re: T5: beta?

2008-04-10 Thread Davor Hrg
Please ignore him (I personaly have hard time doing so),
he has not yet had any technical comment or question,
he only comes here from time to time to bash on tapestry (reasons unknown).

Davor Hrg

On Thu, Apr 10, 2008 at 2:22 PM, Joachim Van der Auwera [EMAIL PROTECTED]
wrote:

 Well Rob, that is your personal opinion.

 I personally have no problems building applications which require high
 reliability on tapestry. It is a very nice framework to build applications
 on.

 Whether the beta or release status are important is mostly a political
 discussion (some companies only allow officially released versions to be
 used), and partly an indication of interface stability.

 Whenever you build an application, based on whatever libraries or
 frameworks, it is up to you to build the confidence required to trust your
 application's functioning. This is typically done with unit and integration
 test. It is however a big bonus if the libraries and frameworks in use have
 their own testing in place. This is very much the case for tapestry. There
 is a lot of stuff out there which has no or very limited test infrastructure
 in place and is still considered release quality.

 Joachim


 Rob Smeets wrote:

  Guys, stop the exagerations. Gmail, one of the best Internet application
  ever written still has a beta status. Unlike Tapestry,  Gmail has had
  the
  beta status for years and would therefore trust it more than Tapestry
  which
  I personally won't do anything serious with it beyond a little bit more
  advanced Hello world application.
 
  My .02 cent.
 
  Rob
 
 
  On Thu, Apr 10, 2008 at 10:55 AM, Blower, Andy 
  [EMAIL PROTECTED]
  wrote
 
   The fact that you're using T5 in the real world at this beta stage is
   very
   good news for the upcoming release IMO, even if it delays the RC a
   bit. (not
   too much though I hope ;-)
  
  
  
-Original Message-
From: Howard Lewis Ship [mailto:[EMAIL PROTECTED]
Sent: 09 April 2008 19:32
To: Tapestry users
Subject: Re: T5: beta?
   
We're still not making a big deal; the transition from alpha to beta
affects us more than the rest of the world.  I think we'll probably
start seeing a new branch for 5.0 work and a switch-over of trunk to
5.1 pretty soon.
   
In the meantime, I'm using 5.0.12 for a client project and finding a
fair amount of rough edges and minor bugs.  I'd just as soon take
care
of those in parallel with the client project since the end result is
a
far more useable and finished 5.0 final.
   
   
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
 

 --
 Joachim Van der Auwera
 PROGS bvba, progs.be



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




Re: T5: beta?

2008-04-10 Thread Davor Hrg
Would you give up already,
you are not a tapestry user,
tapestry 5 is very well documented, has a great mailing list,
has exhaustive unit tests...

If I don't like some framework, I don't use it and that's it.
Please have some respect to tapestry users and go away already.

Davor Hrg

On Thu, Apr 10, 2008 at 4:41 PM, Rob Smeets [EMAIL PROTECTED] wrote:

 Well, I'm not disputing the fact that Tapestry is a good framework but all
 what I'm saying is the fact that at every major release there must be a
 whole rewrite from scratch with little or no regard to backward
 compatibility seems to me not a tool for prime time, or serious stuffs
 besides a Hello world applications. I consider Tapestry a tool for
 experimentation at the labs or schools where students are knowledge hungry
 to learn new things. If your business is based on a model that looks into
 the future then I'm afraid you'll be sorry to go with Tapestry. Because
 every year when you want to benefit from the evolution in Webframework
 technology, you'll have to start all over again- in otherwords throw away
 your earlier investment. Tapestry is good but there are far more better
 and
 excellent frameworks out there with genius people behind it that at each
 major release they face the challenge of backward compatibility head on
 and
 make everyone happy. They don't choose the easy route of starting all over
 again. That one even first year computer science students can do.

 Your's friendly,

 Rob

 On Thu, Apr 10, 2008 at 3:09 PM, Jonathan Barker 
 [EMAIL PROTECTED] wrote:

  Rob,
 
  You may have a point or two.
 
  That what you describe as one of the best Internet applications has beta
  status suggests that some beta code is as good as / better that other
  production code.  I would have to agree.  I've had production apps
 running
  on Tapestry alpha code for some time.
 
  The length of time that Gmail has been in beta is, however, a cop-out.
  To
  me, it's Google's way of saying, Don't blame us.  Come on Google,
 stand
  behind your application!  I suspect that will change as they market more
  heavily to small business.
 
  It would have been more useful had you picked another application
  framework
  to compare to Tapestry for stability and time in beta.  Perhaps next
 time.
 
  That you personally don't do anything with Tapestry beyond a Hello World
  application... oh, never mind, that's too easy a target.
 
  FYI, .02 cent = $0.0002
 
  Jonathan
 
 
 
   -Original Message-
   From: Rob Smeets [mailto:[EMAIL PROTECTED]
   Sent: Thursday, April 10, 2008 8:06 AM
   To: Tapestry users
   Subject: Re: T5: beta?
  
   Guys, stop the exagerations. Gmail, one of the best Internet
 application
   ever written still has a beta status. Unlike Tapestry,  Gmail has had
  the
   beta status for years and would therefore trust it more than Tapestry
   which
   I personally won't do anything serious with it beyond a little bit
 more
   advanced Hello world application.
  
   My .02 cent.
  
   Rob
  
  
  
   On Thu, Apr 10, 2008 at 10:55 AM, Blower, Andy
   [EMAIL PROTECTED]
   wrote:
  
The fact that you're using T5 in the real world at this beta stage
 is
   very
good news for the upcoming release IMO, even if it delays the RC a
  bit.
   (not
too much though I hope ;-)
   
 -Original Message-
 From: Howard Lewis Ship [mailto:[EMAIL PROTECTED]
 Sent: 09 April 2008 19:32
 To: Tapestry users
 Subject: Re: T5: beta?

 We're still not making a big deal; the transition from alpha to
 beta
 affects us more than the rest of the world.  I think we'll
 probably
 start seeing a new branch for 5.0 work and a switch-over of trunk
 to
 5.1 pretty soon.

 In the meantime, I'm using 5.0.12 for a client project and finding
 a
 fair amount of rough edges and minor bugs.  I'd just as soon take
  care
 of those in parallel with the client project since the end result
 is
  a
 far more useable and finished 5.0 final.

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



Re: Eclipse tapestry templates on wiki

2008-04-02 Thread Davor Hrg
hi,
I wrote those templates, and I use latest eclispe milestone,
The added import statements are there to make sure
right classes are imported along with the template,


http://download.eclipse.org/eclipse/downloads/drops/S-3.4M2-200709210919/eclipse-news-M2.html#JDT
under subject: Extended template variables


what version of eclipse are you using ?


I'll add a version of the templates without the import statements so
everyone can enjoy them :)

Davor Hrg


On Tue, Apr 1, 2008 at 9:26 PM, Steven Woolley [EMAIL PROTECTED] wrote:

 I'm trying to use the templates from
 http://wiki.apache.org/tapestry/Tapestry5HowToEclipseCodeTemplates
 However, when I import them into eclipse, only the t5form* templates are
 correctly imported.  I messed around a bit and find that the others are not
 imported because of the line:
${:import(*)}
 in each of them... If I remove this line from all the others, they import
 fine, however, then the imports are (obviously) not added...
 Question to whoever wrote them.. do you have another template for doing
 the imports that these are depending on?  If so, can you update the wiki
 with that template as well?  I quick googling didn't turn up any templates
 to do imports, and my meager attempts have failed..
 Thanks,
 Steve


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




Re: Eclipse tapestry templates on wiki

2008-04-02 Thread Davor Hrg
the new xml is now added there (I just removed import statements),
http://wiki.apache.org/tapestry-data/attachments/Tapestry5HowToEclipseCodeTemplates/attachments/t5_eclipse_code_templates_before_E3.4.M2.xml

please try it out so I can confirm it works :)

Davor Hrg

On Wed, Apr 2, 2008 at 10:01 AM, Davor Hrg [EMAIL PROTECTED] wrote:

 hi,
 I wrote those templates, and I use latest eclispe milestone,
 The added import statements are there to make sure
 right classes are imported along with the template,



 http://download.eclipse.org/eclipse/downloads/drops/S-3.4M2-200709210919/eclipse-news-M2.html#JDT
 under subject: Extended template variables


 what version of eclipse are you using ?


 I'll add a version of the templates without the import statements so
 everyone can enjoy them :)

 Davor Hrg



 On Tue, Apr 1, 2008 at 9:26 PM, Steven Woolley [EMAIL PROTECTED] wrote:

  I'm trying to use the templates from
  http://wiki.apache.org/tapestry/Tapestry5HowToEclipseCodeTemplates
  However, when I import them into eclipse, only the t5form* templates are
  correctly imported.  I messed around a bit and find that the others are not
  imported because of the line:
 ${:import(*)}
  in each of them... If I remove this line from all the others, they
  import fine, however, then the imports are (obviously) not added...
  Question to whoever wrote them.. do you have another template for doing
  the imports that these are depending on?  If so, can you update the wiki
  with that template as well?  I quick googling didn't turn up any templates
  to do imports, and my meager attempts have failed..
  Thanks,
  Steve
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 



Re: T5, newbie: Component parameter passing problems

2008-04-01 Thread Davor Hrg
Tapestry support for Java generics is very limited,
you need a value encoder to make this work,

also, add more details on who calls what... so more is known
of the problem you are trying to solve.


Davor Hrg

On Tue, Apr 1, 2008 at 1:43 PM, Alec Leamas [EMAIL PROTECTED] wrote:

 I have problems passing my own datatype(s) to my own component. The
 component takes two parameters, one ListString and one ListMyMap.
 MyMap is declared as MyMap extends TreeMap {...}.

 The first parameter, a list of strings arrives safely to my component.
 However, the other one, seems to be mixed up: when I try to access an
 element in my ListMyMap, it turns out that Tapestry (nothing else
 involved)  have filled  this list with String items, not the expected
 MyMap items. In the end, there is a class cast exception when trying to
 access the MyMap items as Maps.

 In the Eclipse debugger, it seems that the value of the ListMyMap
 instance variable is a single string holding what looks like  the
 serialized value of my ListMyMap  list. The start is
 [{key=value,key=value...

 I've tried to contribute coercions between MyMap-Map, but this desn't
 seem to help (?).

 Basically, I'm stucked unless I write everything in several big pages
 with duplicated code. Don't really want to do that. :-(

 Any hints out there?

 --alec

 PS  Version: 5.0.11 DS

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




Re: T5, newbie: Component parameter passing problems

2008-04-01 Thread Davor Hrg
how is getRows declared in your page class ?




On Tue, Apr 1, 2008 at 2:09 PM, Michael Kolmodin [EMAIL PROTECTED]
wrote:

 OK, thanks...

 In my page, I have t:myComponent columns=prop:columns
 rows=prop:rows/

 The columns argument, a ListString is just fine.
 The rows argument, a ListMyMap is the problem.

 The page has a ListMyMap getRows() which is verified.

 Looking in MyComponent.java, I have

@Parameter
 private ListMyMap  rows;

 @Parameter
 private ListString columns;

 public String getSomethingStrange()
 {
 return rows.get(0).get( mail );
 }

 The latter getter fails. The debug info is from a breakpoint inside this
 method. The error I get is a classcast error java.lang.String cannot be
 cast to ...MyMap If I change the index to 1, there  an error Caused
 by: Index: 1, Size: 1 i. e., index out of bounds.

 Davor Hrg wrote:
  Tapestry support for Java generics is very limited,
  you need a value encoder to make this work,
 
  also, add more details on who calls what... so more is known
  of the problem you are trying to solve.
 
 
  Davor Hrg
 
  On Tue, Apr 1, 2008 at 1:43 PM, Alec Leamas [EMAIL PROTECTED]
 wrote:
 
  I have problems passing my own datatype(s) to my own component. The
  component takes two parameters, one ListString and one ListMyMap.
  MyMap is declared as MyMap extends TreeMap {...}.
 
  The first parameter, a list of strings arrives safely to my component.
  However, the other one, seems to be mixed up: when I try to access an
  element in my ListMyMap, it turns out that Tapestry (nothing else
  involved)  have filled  this list with String items, not the expected
  MyMap items. In the end, there is a class cast exception when trying to
  access the MyMap items as Maps.
 
  In the Eclipse debugger, it seems that the value of the ListMyMap
  instance variable is a single string holding what looks like  the
  serialized value of my ListMyMap  list. The start is
  [{key=value,key=value...
 
  I've tried to contribute coercions between MyMap-Map, but this desn't
  seem to help (?).
 
  Basically, I'm stucked unless I write everything in several big pages
  with duplicated code. Don't really want to do that. :-(
 
  Any hints out there?
 
  --alec
 
  PS  Version: 5.0.11 DS
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 


 --
 --
 Michael KolmodinFredsgatan 2
 Phone:  +46 920 269413  S-972 35 Lulea
 Mobile  +46 70 551 6507 Sweden

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




Re: How is T5 tutorial?

2008-03-31 Thread Davor Hrg
Your every post is an insult,
you propose moving to another framework without any grounds to do so,
you are neither a Tapesrty, GWT, or Wicket user.

I've asked you plenty of questions and haven't mentioned the word troll
in the last message, and you havent answered that part at all,
you just kept on complining about being called a troll and keep
avoiding any relevant topic.

Davor Hrg

On Wed, Mar 26, 2008 at 5:42 PM, Rob Smeets [EMAIL PROTECTED] wrote:

 And is calling someone a Troll not an insult? You guys have been doing the
 insults. I haven't insulted anyone but I'm only pointing out the facts.

 Best wishes,

 Rob Smeets

 On Wed, Mar 26, 2008 at 2:52 PM, Davor Hrg [EMAIL PROTECTED] wrote:

  you keep claiming your opinion should matter but,
  you are not a gwt or wicket user and you never asked a constructive or
  real
  question.
  You use every message to bash tapestry or it's community.
 
  If you can manage to ask a technical question about how to do something
  you will get an answer. Again if you ask a question that is too general
  don't be surprized if you don't get an answer, or a satisfying one. This
  is
  a free software and no there are no warranties.
 
  Do you have something to say to this and my previous email ?
  Can you write an email without insulting people on this mailing list,
  and without baching tapestry, and without advertizing other frameworks ?
 
  Davor Hrg
 
  On Wed, Mar 26, 2008 at 2:23 PM, Rob Smeets [EMAIL PROTECTED] wrote:
 
   I hope the men whose names you mentioned being me are reading and
 could
   respond. I'm Rob Smeets and take full responsibility of all what I
  write.
   So
   hold me responsible. Are you afraid of me or something? You'll be more
   productive facing what I write point by point and respond. Instead of
   calling me a troll or that I'm someone else.
   You say I'm a Wicket user? Why not a GWT user since I mention that as
   well?
   I've read on the Internet and I'm well informed about Tapestry's crazy
   world. Don't I have the right to voice my opinions?
  
   Best wishes,
  
   Rob Smeets
  
   On Tue, Mar 25, 2008 at 4:35 PM, Angelo Turetta 
   [EMAIL PROTECTED] wrote:
  
Rob Smeets wrote:
 There we go again, when someone raises a legitimate concern he is
   easily
 labeled a Troll.
   
So, once and for all, please prove us you are not the same childish
anonymous coward A.K.A Emmanuel Sowah A.K.A. Francis Amanfo
   
http://www.nabble.com/forum/ViewPost.jtp?post=8015345framed=y
   
Why don't you get a real life outside of your fake identities?
   
Angelo.
   
   
 -
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
   
   
  
 



Re: Uploading templates/properties via FTP

2008-03-26 Thread Davor Hrg
which version of tapestry ?

On Wed, Mar 26, 2008 at 11:01 AM, Tobias Marx [EMAIL PROTECTED] wrote:

 Hi there!

 I would like to separate Java code from property files and template for
 the deployment process.

 In fact, I do not want to deploy templates and property files as such
 and instead provide FTP access for our customers so that they can change
 those files themselves.

 It is always such a time consuming task to deploy a Tapestry application
 just because the logo changes or a single word as changed.

 Have anyone ever done that?

 How do you tell Tapestry where it finds those files? In theory you would
 just need to add an location e.g. /home/users/blabla/ftp/files/tapestry to
 the classpath?

 Thanks!

 Tobias

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




Re: How is T5 tutorial?

2008-03-26 Thread Davor Hrg
you keep claiming your opinion should matter but,
you are not a gwt or wicket user and you never asked a constructive or real
question.
You use every message to bash tapestry or it's community.

If you can manage to ask a technical question about how to do something
you will get an answer. Again if you ask a question that is too general
don't be surprized if you don't get an answer, or a satisfying one. This is
a free software and no there are no warranties.

Do you have something to say to this and my previous email ?
Can you write an email without insulting people on this mailing list,
and without baching tapestry, and without advertizing other frameworks ?

Davor Hrg

On Wed, Mar 26, 2008 at 2:23 PM, Rob Smeets [EMAIL PROTECTED] wrote:

 I hope the men whose names you mentioned being me are reading and could
 respond. I'm Rob Smeets and take full responsibility of all what I write.
 So
 hold me responsible. Are you afraid of me or something? You'll be more
 productive facing what I write point by point and respond. Instead of
 calling me a troll or that I'm someone else.
 You say I'm a Wicket user? Why not a GWT user since I mention that as
 well?
 I've read on the Internet and I'm well informed about Tapestry's crazy
 world. Don't I have the right to voice my opinions?

 Best wishes,

 Rob Smeets

 On Tue, Mar 25, 2008 at 4:35 PM, Angelo Turetta 
 [EMAIL PROTECTED] wrote:

  Rob Smeets wrote:
   There we go again, when someone raises a legitimate concern he is
 easily
   labeled a Troll.
 
  So, once and for all, please prove us you are not the same childish
  anonymous coward A.K.A Emmanuel Sowah A.K.A. Francis Amanfo
 
  http://www.nabble.com/forum/ViewPost.jtp?post=8015345framed=y
 
  Why don't you get a real life outside of your fake identities?
 
  Angelo.
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 



Re: How is T5 tutorial?

2008-03-25 Thread Davor Hrg
TROLL

go away

On Tue, Mar 25, 2008 at 9:33 AM, Rob Smeets [EMAIL PROTECTED] wrote:
 Hi,

  Go grab Wicket of GWT. It's better documented and questions like what you
  asked won't refer you to source code but to a well documented examples.
  Above all the users of those lists are far, far more friendly.

  Rob

  On Mon, Mar 24, 2008 at 5:27 PM, osamuo [EMAIL PROTECTED]
  wrote:

  


  How long do we have to wait for the completion of T5 tutorial: Chapter 5:
   Forms in Tapestry?
  
   Thanks.
   --
   View this message in context:
   http://www.nabble.com/How-is-T5-tutorial--tp16255566p16255566.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]
  
  


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



Re: How is T5 tutorial?

2008-03-25 Thread Davor Hrg
Rob smeets (and maybe few more aliases) is definitely a TROLL,
those interested in details read the rest of the mail...

Yes,
there we go again,

again you waste our time, spreading fud,
and the article you mention is far from unbiased, and most likely
even posted by you (using another alias).

Source code is great for learning about any framework,
I keep source of every library I use so I can look what is
going on when some code breaks unexpectedly. So if someone
suggests you to look at the source code it is no reason to bash that
person.

You are definitely a TROLL because yor only advice was to switch
to another framework, if you were a real user you would give a better
advice instead.

Everyone here will answer the best they can, I use some subset of features,
and help people that have trouble with that stuff.

As you always recommend Wicket one would think that you are a wicket
user marketing a competing framework, But you don't even use wicket
because there is no record of you ever asking a question on their mailing lists.

So if you are not a wicket user, and you haven't had any contact with
wicket mailing
list how can you compare wicket and tapestry ?

If you are a wicket user, identify your self and send few links to
wicket mailing
list threads involving you. I bet wicket devs would have few words to say to you
about your fud which does no good to wicket or tapestry.

Davor Hrg

On Tue, Mar 25, 2008 at 12:46 PM, Rob Smeets [EMAIL PROTECTED] wrote:
 There we go again, when someone raises a legitimate concern he is easily
  labeled a Troll. You had been more productive by telling me I'm wrong on
  what I said and give me some reasons why. Again, this proves how arrogant
  and unfriendly Tapestry mailing list members are. Fortunately, I'm not the
  only one thinking so. A prestigious site, theserverside.com, has an unbiased
  article arguing how bad a decision would be for anyone adopting or planing
  to adopt tapestry for any serious stuff at a serious organization. I won't
  say anything but refer you to the article at
  http://www.theserverside.com/news/thread.tss?thread_id=48743

  Best wishes,

  Rob



  On Tue, Mar 25, 2008 at 9:40 AM, Davor Hrg [EMAIL PROTECTED] wrote:

   TROLL
  
   go away
  
   On Tue, Mar 25, 2008 at 9:33 AM, Rob Smeets [EMAIL PROTECTED] wrote:
Hi,
   
 Go grab Wicket of GWT. It's better documented and questions like what
   you
 asked won't refer you to source code but to a well documented examples.
 Above all the users of those lists are far, far more friendly.
   
 Rob
   
 On Mon, Mar 24, 2008 at 5:27 PM, osamuo [EMAIL PROTECTED]
   
 wrote:
   
 
   
   
 How long do we have to wait for the completion of T5 tutorial: Chapter
   5:
  Forms in Tapestry?
 
  Thanks.
  --
  View this message in context:
  http://www.nabble.com/How-is-T5-tutorial--tp16255566p16255566.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]
 
 
   
  
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  


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



Re: @Cached and caching in general

2008-03-25 Thread Davor Hrg
caching every method by default is definitely too error prone,
and unexpected for most people.

On Tue, Mar 25, 2008 at 3:23 PM, Francois Armand [EMAIL PROTECTED] wrote:
 [EMAIL PROTECTED] wrote:
   Yes, you are right. But loops are usually inside of components and pages 
 contain those componentsbut all methods in the page itself could be 
 @Cache methods in my opinion if you do a component based approach and 
 always package logical widgets into a component.
  
  That means that if forbid the use of loop in page (for example, a loop
  through all the high-level widgets of the page) , or at least that the
  default behaviour for component's or for page's method is not the
  same... In my opinion, it looks like to be very error prone, with things
  that just don't work as expected.



  --
  Francois Armand
  Etudes  Développements J2EE
  Groupe Linagora - http://www.linagora.com
  Tél.: +33 (0)1 58 18 68 28
  ---
  InterLDAP - http://interldap.org
  FederID - http://www.federid.org/
  Open Source identities management and federation


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



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



Re: [T5] Inner Enums of Pages and Components

2008-03-25 Thread Davor Hrg
This is most likely due to serialization of the enum in the session,

I use a workarround that does not affect the code too much,
and I can track references to the enum.

I persist a string variable, but always use enum.name()
to change the variable.

I use this to keep track of major blocks that are visible in a page or comp

 private enum Blocks{EDIT,DETAILS, EDIT_DANGER}

I persist the string
@Persistprivate String  _currentBlock = Blocks.EDIT.name
();
I return block:
public Block getCurrentBlock(){
return _resources.getBlock(_currentBlock);
}

whne I change current block, I use the enum

public void resetView() {
_currentBlock = Blocks.DETAILS.name();
_splitGoodId = null;
_containerId = null;
}

public boolean onGoTo() {
resetView();
return true;
}

public boolean onGoToEditor() {
_currentBlock = Blocks.EDIT.name();
return true;
}

this might be helpfull... and it is not too far from classic usage

Davor Hrg

On Tue, Mar 25, 2008 at 10:49 PM, Adam Zimowski [EMAIL PROTECTED]
wrote:

 If Page or Component defines Enum internally, Tapestry throws a
 ClassCastException the moment said page or component  class (or even
 the template) is hot reloaded due to any kind of change.

 Can this be fixed/change to allow inner Enums?

 -adam
 as of 5.0.11

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




Re: [T5] Inner Enums of Pages and Components

2008-03-25 Thread Davor Hrg
An idea:
I belive it has many pitfalls :(, but might be useful an idea,

tapestry could for example extend such enum (persist worker might trigger
it)
and add serialization code to it. Then when reloading it could force
serializing enum values, plus if the value gets serialized outside tapestry
it could be better handled (if servlet container serializes it).

this might only help enums..

On Tue, Mar 25, 2008 at 10:57 PM, Howard Lewis Ship [EMAIL PROTECTED]
wrote:

 I'm kind of surprised about that;  are you storing the enum values
 outside of the page instance (i.e. in the session?)

 Inner classes are loaded by the disposable component class loader (the
 class loader that handles retry logic and class transformation).  When
 a class changes, the class loader, plus and objects instantiated from
 that class loader, are discarded.

 If you place such an object in the session, it will hang around
 (keeping the class loader from being garbage collected) ... AND when
 the stored value is assigned to a field of the newly loaded page
 instance, it will fail with a ClassCastException because there's a new
 class (with the same name) loaded by a new class loader.

 I'd love to patch up these leaky abstractions a bit better, but
 that's partt of the price of running in your choice of servlet
 container; short of Tapestry being an application server, and not an
 application framework, it doesn't have sufficient control of things to
 make it any more seamless.

 On Tue, Mar 25, 2008 at 2:49 PM, Adam Zimowski [EMAIL PROTECTED]
 wrote:
  If Page or Component defines Enum internally, Tapestry throws a
   ClassCastException the moment said page or component  class (or even
   the template) is hot reloaded due to any kind of change.
 
   Can this be fixed/change to allow inner Enums?
 
   -adam
   as of 5.0.11
 
   -
   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]




Re: [T5.0.11] how to build zebra effect for grid

2008-03-22 Thread Davor Hrg
it's there on the wiki, use it any way you wish :)

On Fri, Mar 21, 2008 at 2:53 PM, Sven Homburg [EMAIL PROTECTED] wrote:
 nice implementation!
  i want to implement it into the t5component project ...
  is that problematic for you ?

  2008/3/21, Davor Hrg [EMAIL PROTECTED]:


 
   it is just what the exception says:
   class de.hsofttec.tapestry.components.grid.ZebraGrid overrides final
   method
  
  
  
   tapestry core compoennts are being rewritten to
   disallow extending (quote: for client code to be less dependant, and
   framework easier to maintain)..
  
   for zebra effect.. may I suggest :
   http://wiki.apache.org/tapestry/Tapestry5HowToAddBindingPrefixCycle
  
   t:grid ... rowClass=cycle:h-even,h-odd...
  
  
  
   Davor Hrg
  
  
   On Fri, Mar 21, 2008 at 12:52 PM, Sven Homburg [EMAIL PROTECTED]
   wrote:
hi there,
   
 i realized the zebra effect before release 5.0.11
 with a ZebraGrid class extends from Grid component.
   
 public class ZebraGrid extends Grid
 {
private boolean _even = true;
   
/**
 * return the row class to enable the zebra look.
 *
 * @return the row class
 */
String getRowClass()
{
String cssStyle = h-even;
   
if (_even)
{
_even = false;
cssStyle = h-odd;
}
else
_even = true;
   
return cssStyle;
}
 }
   
 but since release .5.0.11 (@Property) my compoment throw an exception
   like
 this
 class de.hsofttec.tapestry.components.grid.ZebraGrid overrides final
   method
  . 
   
 any idea ?
   
 --
 with regards
 Sven Homburg
 http://tapestry5-components.googlecode.com
   
  
  
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  


  --


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


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



Re: T5: generic, onActivate and onPassivate

2008-03-22 Thread Davor Hrg
javassist has low level apis that allow accessing
elements reflective data, and after that it's same old reflection code,

for example when I treid t make GenericComponents for tapestry
I wanted to make a worker and put generic information into ComponentResources

@Component private EntityEditComponentVessel, Long _vesselEdit;

I found the way to get the declaration for the field from javassist:

I messed a bit with
//ClassTransformation is enhanced to return :
CtField.getFieldInfo2...
FieldInfo info = transformation.getFieldInfo2(fieldName);
  SignatureAttribute.ClassType type = (ClassType)
SignatureAttribute.toFieldSignature(sig.getSignature());
  System.out.println(fieldName+:TYPE:+type);//QDEBUG remove
  TypeArgument[] typeArguments = type.getTypeArguments();
  for (int i = 0; i  typeArguments.length; i++) {
System.out.println(TYPE par:
+typeArguments[i]);//QDEBUG remove
}


the output is :
_vesselEdit:TYPE:tapestryutil.base.EntityEditComponenthr.crup.eri.web.entities.Vessel,
java.lang.Long
TYPE par: hr.crup.eri.web.entities.Vessel
TYPE par: java.lang.Long

after that I just could not get the parameter into ComponentResources

this was all nice but after some digging I found this nice class on jboss
http://viewvc.jboss.org/cgi-bin/viewvc.cgi/jbossretro/trunk/src/main/java/org/jboss/lang/GenericsHelper.java/?revision=227view=markuppathrev=227

it has all you need for generics in javassist

Davor Hrg



On Fri, Mar 21, 2008 at 11:21 PM, Howard Lewis Ship [EMAIL PROTECTED] wrote:
 Yes ... but that information isn't always exposed properly via the
  Javassist APIs.



  On Fri, Mar 21, 2008 at 3:19 AM, Davor Hrg [EMAIL PROTECTED] wrote:
   Method parameter types contain generic information just like
properties and method return types. It is quite similar to stuff
in property conduit source.
  
Davor Hrg
  
  
  
  
On Fri, Mar 21, 2008 at 6:41 AM, Howard Lewis Ship [EMAIL PROTECTED] 
 wrote:
 Yes, I think the generics logic isn't smart enough for this case, that
  is, to identify and convert the parameter of the event handler method.
   You can add this as a bug, but I'm not even sure how to start making
  this work correctly!



  On Thu, Mar 20, 2008 at 9:04 PM, Angelo Chen [EMAIL PROTECTED] wrote:
  
Hi,
  
I'm trying out generic in 5.0.11, I have a base class ObjectEdit, 
 then
  
public class ObjectEditT {
  
   private T object;
   public T getObject() { return object;}
   public void setObject(T object) { this.object = object;}
   public void onActivate(T obj) { object = obj;}
   public T onPassivate() { return object; }
}
  
I was hoping that I can just extend it like this:
  
public class UserEdit extends ObjectEdit Usr {
}
  
but it does not work, error:
org.apache.tapestry.ioc.internal.util.TapestryException
Failure reading parameter 'object' of component 
 admin/UserEdit:object:
java.lang.String
  
I have to do:
  
public class UserEdit extends ObjectEdit User {
public void onActivate(User obj) {
   this.setObject(obj);
   }
}
  
and remove the onActivate from ObjectEdit, why onActivate does not 
 work in a
base class when onPassivate can? Thanks,
  
A.C.
  
  
--
View this message in context: 
 http://www.nabble.com/T5%3A-generic%2C-onActivate-and-onPassivate-tp16193600p16193600.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]


  
-
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]



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



Re: T5: generic, onActivate and onPassivate

2008-03-21 Thread Davor Hrg
Method parameter types contain generic information just like
properties and method return types. It is quite similar to stuff
in property conduit source.

Davor Hrg


On Fri, Mar 21, 2008 at 6:41 AM, Howard Lewis Ship [EMAIL PROTECTED] wrote:
 Yes, I think the generics logic isn't smart enough for this case, that
  is, to identify and convert the parameter of the event handler method.
   You can add this as a bug, but I'm not even sure how to start making
  this work correctly!



  On Thu, Mar 20, 2008 at 9:04 PM, Angelo Chen [EMAIL PROTECTED] wrote:
  
Hi,
  
I'm trying out generic in 5.0.11, I have a base class ObjectEdit, then
  
public class ObjectEditT {
  
   private T object;
   public T getObject() { return object;}
   public void setObject(T object) { this.object = object;}
   public void onActivate(T obj) { object = obj;}
   public T onPassivate() { return object; }
}
  
I was hoping that I can just extend it like this:
  
public class UserEdit extends ObjectEdit Usr {
}
  
but it does not work, error:
org.apache.tapestry.ioc.internal.util.TapestryException
Failure reading parameter 'object' of component admin/UserEdit:object:
java.lang.String
  
I have to do:
  
public class UserEdit extends ObjectEdit User {
public void onActivate(User obj) {
   this.setObject(obj);
   }
}
  
and remove the onActivate from ObjectEdit, why onActivate does not work 
 in a
base class when onPassivate can? Thanks,
  
A.C.
  
  
--
View this message in context: 
 http://www.nabble.com/T5%3A-generic%2C-onActivate-and-onPassivate-tp16193600p16193600.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]



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



Re: [T5.0.11] how to build zebra effect for grid

2008-03-21 Thread Davor Hrg
it is just what the exception says:
class de.hsofttec.tapestry.components.grid.ZebraGrid overrides final method


tapestry core compoennts are being rewritten to
disallow extending (quote: for client code to be less dependant, and
framework easier to maintain)..

for zebra effect.. may I suggest :
http://wiki.apache.org/tapestry/Tapestry5HowToAddBindingPrefixCycle

t:grid ... rowClass=cycle:h-even,h-odd...



Davor Hrg

On Fri, Mar 21, 2008 at 12:52 PM, Sven Homburg [EMAIL PROTECTED] wrote:
 hi there,

  i realized the zebra effect before release 5.0.11
  with a ZebraGrid class extends from Grid component.

  public class ZebraGrid extends Grid
  {
 private boolean _even = true;

 /**
  * return the row class to enable the zebra look.
  *
  * @return the row class
  */
 String getRowClass()
 {
 String cssStyle = h-even;

 if (_even)
 {
 _even = false;
 cssStyle = h-odd;
 }
 else
 _even = true;

 return cssStyle;
 }
  }

  but since release .5.0.11 (@Property) my compoment throw an exception like
  this
  class de.hsofttec.tapestry.components.grid.ZebraGrid overrides final method
   . 

  any idea ?

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


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



Re: AW: @Cached and caching in general

2008-03-19 Thread Davor Hrg
I mean exactly that,
I'm comfortable with my html code, css and js
I can inline what I need, I'm not proposing this as a general approach,
but I like doing just that: take part of rendered content and do
something with it.

if something is a compoenent framework, a component should be independant,
even after the html code is rendered.

Davor Hrg


On Wed, Mar 19, 2008 at 10:45 AM, Martin Kersten
[EMAIL PROTECTED] wrote:
  ...this king of component is useful for capturing output so it can be sent 
  via email for example.

  This does not sound like a good idea. Do you mean requesting a page and cut 
 it out or grabbing part of the DOM during same request. Just wondering... .

  -Ursprüngliche Nachricht-
  Von: Davor Hrg [mailto:[EMAIL PROTECTED]
  Gesendet: Mittwoch, 19. März 2008 10:42
  An: Tapestry users
  Betreff: Re: AW: @Cached and caching in general



  I agree that this is not something to take on lightly, and data should be 
 cached, and rendering left as is.
  but besides caching this king of component is useful for capturing output so 
 it can be sent via email for example.

  I like to keep most things stateless (only dependant on parameters), so from 
 time to time I can use some of these nasty tricks.

  Davor Hrg

  On Wed, Mar 19, 2008 at 1:04 AM, Fernando Padilla [EMAIL PROTECTED] wrote:
   :)
  
True.  I definitely won't say that this will solve all cases 100%.
   But  for basic rendering.. this allows you to essentially set
   expires for  fragments of the page.  And yes it caches all
   operations that go through  PageRenderSupport.  And if I could take
   over the markupWriter properly,  I would have cached and replayed
   those already.. but i couldn't easily  do that..  But on second
   thought, you're right, maybe I should have  cached a DOM tree.. since
   it would have a much better guarantees for  replaying.
  
But on most cases, this component works pretty darn good, and we love it.
  
Of course trying to do evict cache on particular events is hard.. but
   if  you are alright with updates within 30hr sort of cases. this is
   a good  start.
  
  
  
  
  
Howard Lewis Ship wrote:
 I'm generally against these approached.

 Cache the data, make it fast to access.

 Let Tapestry do a full render every time.

 You'll end up with confusing, unforseen consequences.

 Rendering is increasingly a complex dance between components.
   That's   the power and the penalty of Tapestry.  Components inside
   that cached   zone are not just rendering a character stream, they
   are generating   JavaScript, assigning unique ids (via
   PageRenderSupport) interacting   with an enclosing Form components,
   and doing other user-specific   things.

 I would always look elsewhere first for places that need
   optimization,   and I'd start with database access and queries.

 On Tue, Mar 18, 2008 at 11:22 AM, Fernando Padilla [EMAIL PROTECTED] 
 wrote:
 We have a component that we call Buffer :) it takes a timeout,
 optional cachekey, and optional lastmodified (to tell you)
   We have it for Tap4 and Tap5, if anyone really wants it, I bet I can
 liberate it.. you would just have to change the cache hooks to use
 whatever cache you want to use...

  The easiest way to add caching to the app. :)
   Martin Kersten wrote:
   @Chached is only used during a single page rendering cycle. It
   would not apply to your situation. (as far as I know)
  Source:
  
   http://sqllyw.wordpress.com/2008/03/15/new-features-in-tapestry-5011/
  
   Your scenario would be implementable using your own component.
   The component would represent a fragment and read the file
   (even use a inmemory cache strategy (soft/weakreferences)) and
   write the ouput directly to stream (or actually the dom tree of
   your document being returned).
  
   Using your own solution enables you to mimic the behavior you talk 
 about.
   Another idea would to write / cache only datas needed to render
   the tables (e.g. cache only content not markup). Never the less
   I am in doupt, if such a solution is necessary (dynamically
   cache results of database queries in memory or on disk).
  
   So after all you might want to port your application. As always
   use the simpliest solution first. So database queries without any 
 caches.
   Once you see any problems (performance is below required) just
   go for optimization. Since you have a fallback solution at hand
   (cron-jobs + disk fragments) you are at the safe side. But I am
   in doupt if you really need the markup being cached. Caching
   the database results and recreate markup sounds more
   reasonable. You might save you lots of seeking time.
  
   But you always know: Only the code / application will tell you!
  
  
   Cheers

Re: Component event handlers

2008-03-19 Thread Davor Hrg
too little information...

some events support return value, some don't...

tell more on exact case 

Davor Hrg

On Wed, Mar 19, 2008 at 5:12 PM, José Paumard [EMAIL PROTECTED] wrote:

  Hi all,

  Everytime I try to return an injected block in an event handler method, I
 get an error message, telling me that BlockImpl is not a valid returned
 value. From the nightly generated docs, this is supposed to work. Has anyone
 experienced this too ?

  Thank you,

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

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



Re: @Cached and caching in general

2008-03-18 Thread Davor Hrg
@Cached is an annotation
that caches method call result per request.
so while page is rendering if multiple pieces of template
require that property it gets called only once...

Davor Hrg

On Tue, Mar 18, 2008 at 5:44 PM, Tobias Marx [EMAIL PROTECTED] wrote:
 I have not used T5 yet, but would @Cached use the file system for caching 
 HTML fragments similiar to caching mechanisms in some php frameworks?

  Or is this a pure memory-based cache?

  I am thinking about migrating an old PHP application to T5 - it has really a 
 lot of traffic and any users are logged in at the same time.

  It is quite a low-level application that is still quite fast due to cron 
 jobs in the background that generate HTML fragments that are included to 
 reduce the database-query bottleneck (e.g. grouping/ordering and sorting of 
 huge tables).

  Somehow I don't trust Hibernate for high-performance database queries on 
 huge tables  as I think if tables are huge and many people access it, it 
 will always lead to problems...no matter how good the queries are and how 
 well you have splitted the data across several tables.

  So I think the best solution is always to generate HTML fragments in the 
 background that take a long time and simple include themthis is even 
 quicker then parsing templates when the data is cached. So you save the time 
 necessary for querying the database plus the time necessary for processing 
 the templates that are involved.

  Currently the setup on this application uses one-way database replication 
 and the cron jobs access the the huge data table on the replicated database 
 and generate those HTML fragments without disturbing the web-applications 
 performance. So the main application simply includes those HTML fragments 
 within milliseconds.

  But maybe the T5 caching mechanism would make all of those low-level tricks 
 redundant?

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



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



Re: AW: @Cached and caching in general

2008-03-18 Thread Davor Hrg
Tobias is right to ask about his,
I'm usin php for a long time now and output_buffer functions ob_*
are great for simplifying complex pages, adding caching without interferring
with internal code

people have asked about getting html output of page and etc.

if framework would allow access to markup on afterRenderTemplate
and if markup could be forced to serialize all HTML of the current element
it would allow creating a simple component that can wrap a part of
(processor heavy) code and catch the rendered markup. Then it would
allow it self to be rendered normaly only in some intervals and produce
cached raw output otherwise.

this would be very similar to output_buffer tricks in php.


Davor Hrg

On Tue, Mar 18, 2008 at 6:25 PM, Filip S. Adamsen [EMAIL PROTECTED] wrote:
 That's a special case, really. Do what you want.

  -Filip



  On 2008-03-18 18:20, Tobias Marx wrote:
   Ok...let's say factor 10 (unless you have many loops inside of loops 
 inside of loops that use queries on large tables).
  
    Original-Nachricht 
   Datum: Tue, 18 Mar 2008 18:14:28 +0100
   Von: Filip S. Adamsen [EMAIL PROTECTED]
   An: Tapestry users users@tapestry.apache.org
   Betreff: Re: AW: @Cached and caching in general
  
   A factor 100?? C'mon. If, and I stress IF, your application would
   benefit that much from this, fine. But Tapestry 5 applications in
   general would - I guarantee you - not see such an improvement.
  
   -Filip
  
   On 2008-03-18 18:07, Tobias Marx wrote:
   My theory is that such a disk-caching behaviour could speed up Tapestry
   applications by factor 100although Tapestry 5 is quite fast.
   The template parsing is still quite slow because it uses Velocity and
   everything that avoids template parsing would increase the speed a lot.
  
    Original-Nachricht 
   Datum: Tue, 18 Mar 2008 18:01:40 +0100
   Von: Martin Kersten [EMAIL PROTECTED]
   An: Tapestry users users@tapestry.apache.org
   Betreff: AW: @Cached and caching in general
   @Chached is only used during a single page rendering cycle. It would
   not
   apply to your situation. (as far as I know)
  
   Source:
   http://sqllyw.wordpress.com/2008/03/15/new-features-in-tapestry-5011/
  
   Your scenario would be implementable using your own component.
   The component would represent a fragment and read the file (even
   use a inmemory cache strategy (soft/weakreferences)) and write
   the ouput directly to stream (or actually the dom tree of your
   document being returned).
  
   Using your own solution enables you to mimic the behavior you talk
   about.
   Another idea would to write / cache only datas needed to render the
   tables
   (e.g. cache only content not markup). Never the less I am in doupt,
   if such a solution is necessary (dynamically cache results of
   database queries in memory or on disk).
  
   So after all you might want to port your application. As always use
   the simpliest solution first. So database queries without any caches.
   Once you see any problems (performance is below required) just go for
   optimization. Since you have a fallback solution at hand (cron-jobs +
   disk fragments) you are at the safe side. But I am in doupt if you
   really need the markup being cached. Caching the database results
   and recreate markup sounds more reasonable. You might save you lots
   of seeking time.
  
   But you always know: Only the code / application will tell you!
  
  
   Cheers,
  
   Martin (Kersten)
  
   -Ursprüngliche Nachricht-
   Von: Tobias Marx [mailto:[EMAIL PROTECTED]
   Gesendet: Dienstag, 18. März 2008 17:45
   An: Tapestry users
   Betreff: @Cached and caching in general
  
   I have not used T5 yet, but would @Cached use the file system for
   caching
   HTML fragments similiar to caching mechanisms in some php frameworks?
  
   Or is this a pure memory-based cache?
  
   I am thinking about migrating an old PHP application to T5 - it has
   really
   a lot of traffic and any users are logged in at the same time.
  
   It is quite a low-level application that is still quite fast due to
   cron
   jobs in the background that generate HTML fragments that are included
   to
   reduce the database-query bottleneck (e.g. grouping/ordering and
   sorting of
   huge tables).
  
   Somehow I don't trust Hibernate for high-performance database queries
   on
   huge tables  as I think if tables are huge and many people access
   it, it
   will always lead to problems...no matter how good the queries are and
   how
   well you have splitted the data across several tables.
  
   So I think the best solution is always to generate HTML fragments in
   the
   background that take a long time and simple include themthis is
   even
   quicker then parsing templates when the data is cached. So you save the
   time
   necessary for querying the database plus the time necessary for
   processing
   the templates that are involved.
  
   Currently

Re: AW: @Cached and caching in general

2008-03-18 Thread Davor Hrg
I'm interested in the one for T5 :)

if you are not allowed to share source,
maybe few hints how to make it

Davor Hrg

On Tue, Mar 18, 2008 at 7:22 PM, Fernando Padilla [EMAIL PROTECTED] wrote:
 We have a component that we call Buffer :) it takes a timeout,
  optional cachekey, and optional lastmodified (to tell you)

  We have it for Tap4 and Tap5, if anyone really wants it, I bet I can
  liberate it.. you would just have to change the cache hooks to use
  whatever cache you want to use...

  The easiest way to add caching to the app. :)



  Martin Kersten wrote:
   @Chached is only used during a single page rendering cycle. It would not
   apply to your situation. (as far as I know)
  
   Source:
   http://sqllyw.wordpress.com/2008/03/15/new-features-in-tapestry-5011/
  
   Your scenario would be implementable using your own component.
   The component would represent a fragment and read the file (even
   use a inmemory cache strategy (soft/weakreferences)) and write
   the ouput directly to stream (or actually the dom tree of your
   document being returned).
  
   Using your own solution enables you to mimic the behavior you talk about.
   Another idea would to write / cache only datas needed to render the tables
   (e.g. cache only content not markup). Never the less I am in doupt,
   if such a solution is necessary (dynamically cache results of
   database queries in memory or on disk).
  
   So after all you might want to port your application. As always use
   the simpliest solution first. So database queries without any caches.
   Once you see any problems (performance is below required) just go for
   optimization. Since you have a fallback solution at hand (cron-jobs +
   disk fragments) you are at the safe side. But I am in doupt if you
   really need the markup being cached. Caching the database results
   and recreate markup sounds more reasonable. You might save you lots
   of seeking time.
  
   But you always know: Only the code / application will tell you!
  
  
   Cheers,
  
   Martin (Kersten)
  
   -Ursprüngliche Nachricht-
   Von: Tobias Marx [mailto:[EMAIL PROTECTED]
   Gesendet: Dienstag, 18. März 2008 17:45
   An: Tapestry users
   Betreff: @Cached and caching in general
  
   I have not used T5 yet, but would @Cached use the file system for caching 
 HTML fragments similiar to caching mechanisms in some php frameworks?
  
   Or is this a pure memory-based cache?
  
   I am thinking about migrating an old PHP application to T5 - it has really 
 a lot of traffic and any users are logged in at the same time.
  
   It is quite a low-level application that is still quite fast due to cron 
 jobs in the background that generate HTML fragments that are included to 
 reduce the database-query bottleneck (e.g. grouping/ordering and sorting of 
 huge tables).
  
   Somehow I don't trust Hibernate for high-performance database queries on 
 huge tables  as I think if tables are huge and many people access it, it 
 will always lead to problems...no matter how good the queries are and how 
 well you have splitted the data across several tables.
  
   So I think the best solution is always to generate HTML fragments in the 
 background that take a long time and simple include themthis is even 
 quicker then parsing templates when the data is cached. So you save the time 
 necessary for querying the database plus the time necessary for processing 
 the templates that are involved.
  
   Currently the setup on this application uses one-way database replication 
 and the cron jobs access the the huge data table on the replicated database 
 and generate those HTML fragments without disturbing the web-applications 
 performance. So the main application simply includes those HTML fragments 
 within milliseconds.
  
   But maybe the T5 caching mechanism would make all of those low-level 
 tricks redundant?
  
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  

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



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



Re: AW: @Cached and caching in general

2008-03-18 Thread Davor Hrg
thanks :)
It's 00:46 here, I'll try it out in the morning,
If I make it work I'll create a wiki page for it...

Davor Hrg

On Wed, Mar 19, 2008 at 12:38 AM, Fernando Padilla [EMAIL PROTECTED] wrote:
 here you go :)

  Should be able to drop these into your project.

  The Buffer.java is the component ( so somewhere under components package
  ), and the BufferServices needs to go somewhere where Tapestry will not
  enhance it, so I put it under the services package. ). :)  Sorry, but
  the cacheKey/Extra stuff is a little confusing, but maybe we can start
  a different thread/docs for that, or simplify to make it easier for
  generalization..

  The Parameters are:

  1) timeout: String
a duration in which a cache value will be valid; format: hh:mm:ss
if you want a one hour timeout:  01:00:00.
if you want a 30 min timeout: 00:30:00

  2) lastUpdated: Date
it output this parameter (if bound), to let you know when the contents
of the Buffer were last updated.  So you can print out a small message
Last Updated ##


  3) cacheKey: String
  4) cacehKeyExtra: String

  here is where it might get a little confusing.. it generates a key
  into the cache using the request server/port/context/path and cacheKey
  and cacheKeyExtra.  So it focuses the cache onto the current server
  and webapp ( since we used a shared memcache this avoids developers
  and production webapps stepping on each others toes ).  It then
  adds cacheKey (which defaults to the component's extendedId), and
  cacheKeyExtra (which defaults to empty).

  So by default just wrapping your stuff with buffer timeout will just
  work since the key will be something like
  server:port/context_PageName:buffer_#.

  You would set cacheKey if you wanted to generalize the contents of the
  buffer ( have the same Buffer component shared across pages ).

  You would set cacheKeyExtra if you wanted to specialize the contents of
  the buffer ( have the same Buffer component apply to subsets of
  request.. like if it's user specific ).










  Davor Hrg wrote:
   I'm interested in the one for T5 :)
  
   if you are not allowed to share source,
   maybe few hints how to make it
  
   Davor Hrg
  
   On Tue, Mar 18, 2008 at 7:22 PM, Fernando Padilla [EMAIL PROTECTED] 
 wrote:
   We have a component that we call Buffer :) it takes a timeout,
optional cachekey, and optional lastmodified (to tell you)
  
We have it for Tap4 and Tap5, if anyone really wants it, I bet I can
liberate it.. you would just have to change the cache hooks to use
whatever cache you want to use...
  
The easiest way to add caching to the app. :)
  
  
  
Martin Kersten wrote:
 @Chached is only used during a single page rendering cycle. It would 
 not
 apply to your situation. (as far as I know)

 Source:
 http://sqllyw.wordpress.com/2008/03/15/new-features-in-tapestry-5011/

 Your scenario would be implementable using your own component.
 The component would represent a fragment and read the file (even
 use a inmemory cache strategy (soft/weakreferences)) and write
 the ouput directly to stream (or actually the dom tree of your
 document being returned).

 Using your own solution enables you to mimic the behavior you talk 
 about.
 Another idea would to write / cache only datas needed to render the 
 tables
 (e.g. cache only content not markup). Never the less I am in doupt,
 if such a solution is necessary (dynamically cache results of
 database queries in memory or on disk).

 So after all you might want to port your application. As always use
 the simpliest solution first. So database queries without any caches.
 Once you see any problems (performance is below required) just go for
 optimization. Since you have a fallback solution at hand (cron-jobs +
 disk fragments) you are at the safe side. But I am in doupt if you
 really need the markup being cached. Caching the database results
 and recreate markup sounds more reasonable. You might save you lots
 of seeking time.

 But you always know: Only the code / application will tell you!


 Cheers,

 Martin (Kersten)

 -Ursprüngliche Nachricht-
 Von: Tobias Marx [mailto:[EMAIL PROTECTED]
 Gesendet: Dienstag, 18. März 2008 17:45
 An: Tapestry users
 Betreff: @Cached and caching in general

 I have not used T5 yet, but would @Cached use the file system for 
 caching HTML fragments similiar to caching mechanisms in some php frameworks?

 Or is this a pure memory-based cache?

 I am thinking about migrating an old PHP application to T5 - it has 
 really a lot of traffic and any users are logged in at the same time.

 It is quite a low-level application that is still quite fast due to 
 cron jobs in the background that generate HTML fragments that are included to 
 reduce the database-query bottleneck

Re: T5, newbie: Grid use w dynamic columns

2008-03-16 Thread Davor Hrg
Grid uses BeanModel, no need to mess with javassist

you can create default one by
injecting BeanModelSource and create it with it
after that you can play with the model.

or you can provide a list of columns to the grid to include/exclude

Davor Hrg

On Sun, Mar 16, 2008 at 4:47 PM, Alec Leamas [EMAIL PROTECTED] wrote:
 Trying the hard parts first, I'm trying to create a table where the
  columns are not known until runtime. The application is basically a
  viewer, and the underlying database schema varies from time to time.

  My question: is it somehow possible to define what columns to use in the
  Grid component in runtime?  The T4 variant accepts a list, so it's no
  problem. The T5 variant uses a bean to define the columns, and this is
  trickier.

  I've tried to use javassist to modify a a bean dynamically, but the Grid
  complains that it cannot find the source for the getter method I added
  to the bean.  This might just be the wrong way to do it, something wrong
  with my first attemps to use javassist, or some problem with the idea to
  use these kind of modified beans as source for the Grid.

  Thanks for any help...

  --Alec

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



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



Re: Ajax chart service

2008-03-16 Thread Davor Hrg
you need not ajax here,

just change src of the image,

first create an action link that can produce an image
then use javascript to switch urls for the image...

http://wiki.apache.org/tapestry/Tapestry5HowToCreatePieChartsInAPage

Davor Hrg

On Sun, Mar 16, 2008 at 11:07 PM, bioye [EMAIL PROTECTED] wrote:

  I have a service that generates images for using jfreechart.  I want to
  convert this service to ajax so that the chart image can load without
  reloading the whole page.  I have played around with div's and
  updateComponent and ResponseBuilder.  The ajax response seems to be
  generated but the image is never updated.  What is the problem?  Do I need
  to find a way to include Javascript to load the image via scripting?  My
  ajax works for raw text but not for image services.
  --
  View this message in context: 
 http://www.nabble.com/Ajax-chart-service-tp16084794p16084794.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]



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



Re: T5 : Editable Select

2008-03-14 Thread Davor Hrg
you can go arround this by
creating a component that generates a select
and input, thus allowing arbitrary value in the input  box.

or dig in with javascript and create a more streamline one...

Davor Hrg

On Fri, Mar 14, 2008 at 3:08 AM, DavidWei [EMAIL PROTECTED] wrote:

  I have same need. Can someone answer this? Thanks!

  David


  martin boulanger wrote:
  
   Dear all,
  
   I need to make an editable select box : i.e the user can either chose one

  of the option in the select box or type a custom String. Is it possible to
   make something like this with Tapestry 5?
  
   Thanks,
  
   Martin
  

  --
  View this message in context: 
 http://www.nabble.com/T5-%3A-Editable-Select-tp13776203p16042885.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]



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



default event handler

2008-03-14 Thread Davor Hrg
I have more than few components
that use events to communicate inside a pretty complex form/wizard.

I want to default cancel all events and release only few events manualy,
but to do it I have to add return true to every event handler,

I've tried following

/**Stop propagation of all sub-component events. it is named this
way so it is called last.*/
@OnEvent
public boolean zzLastEventHandler(EventContext eventContext) {
System.err.println(CAUGHT event:+eventContext);//QDEBUG remove
return true;
}

some events, pass through some don't (those that have a another handler don't)

Has anyone exp with this to tell me is it possible to do it this way,
before I go and check all the scenarios to see what can, and can not be done.

Davor Hrg

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



Re: Hide menu items

2008-03-11 Thread Davor Hrg
such construct is not yet possible,
OGNL is not used,

checkout http://wiki.apache.org/tapestry/Tapestry5HowTos
for code snippets

there you have:
http://wiki.apache.org/tapestry/Tapestry5HowToAddBindingPrefix

that way you can create a binding prefix checkAuth: and use it:
t:if test=checkAuth:admin,manager



try it out you'll be surprised how easy it is :)

Davor Hrg

On Tue, Mar 11, 2008 at 6:49 AM, petros [EMAIL PROTECTED] wrote:

  I have a menu with the following items
  MyDetails
  UsersList

  I want the MyDetails item to be shown all the time and the UsersList to show
  only when the user has the roles admin and manager. I am assuming I have a
  method called checkAuthorisation(String[]). I know the syntax below is
  incorrect but I am looking for something similar to this. Has anyone done
  this ? Any ideas ?

  t:if test=checkAuthorisation(new String[]{'admin', 'manager'})
UsersList
  /t:if
  --
  View this message in context: 
 http://www.nabble.com/Hide-menu-items-tp15975282p15975282.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]



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



Re: T5 : How to access to a Component Body ?

2008-03-11 Thread Davor Hrg
you can not access child components geenricaly,
but you can access blocks by id.

you can embed components
@Component TextField name; //component's class is decided here
and in template simply put:
div t:id=name/


but to access a textfield as Field you can:
@InjectComponent private Field name;
and then component's class is resolved from the template
so in the template you must put:
t:textfield id=name/


you can not use it like this:
@Component private Field name;
and in template
t:textfield id=name/


Davor Hrg
On Tue, Mar 11, 2008 at 9:25 AM, Cordenier Christophe
[EMAIL PROTECTED] wrote:
 Hello,

  I'm currently working on a component that needs to access the content of its 
 body to extract informations like parameters, or persistent variable used by 
 the components declared in its body.

  Actually, the ComponentResources class allows me to access the container of 
 a component, but it appears that a child is not contained in the component.
  This should have helped me from a down-top view.

  And I didn't find any method to access the body of a component.

  Does anyone knows a way to access the children of a component ?

  Best Regards,
  Christophe Cordenier.


  Ce message et les pi?ces jointes sont confidentiels et r?serv?s ? l'usage 
 exclusif de ses destinataires. Il peut ?galement ?tre prot?g? par le secret 
 professionnel. Si vous recevez ce message par erreur, merci d'en avertir 
 imm?diatement l'exp?diteur et de le d?truire. L'int?grit? du message ne 
 pouvant ?tre assur?e sur Internet, la responsabilit? du groupe Atos Origin ne 
 pourra ?tre recherch?e quant au contenu de ce message. Bien que les meilleurs 
 efforts soient faits pour maintenir cette transmission exempte de tout virus, 
 l'exp?diteur ne donne aucune garantie ? cet ?gard et sa responsabilit? ne 
 saurait ?tre recherch?e pour tout dommage r?sultant d'un virus transmis.

  This e-mail and the documents attached are confidential and intended solely 
 for the addressee; it may also be privileged. If you receive this e-mail in 
 error, please notify the sender immediately and destroy it. As its integrity 
 cannot be secured on the Internet, the Atos Origin group liability cannot be 
 triggered for the message content. Although the sender endeavours to maintain 
 a computer virus-free network, the sender does not warrant that this 
 transmission is virus-free and will not be liable for any damages resulting 
 from any virus transmitted.


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



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



Re: t5: Repository for 5.0.11-SNAPSHOT

2008-03-11 Thread Davor Hrg
there is no 5.0.11-SNAPSHOT

5.0.11 is being voted into a release

use 5.0.11
or
5.0.12-SNAPSHOT

Davor Hrg

On Tue, Mar 11, 2008 at 9:01 AM, Angelo Chen [EMAIL PROTECTED] wrote:

  Hi,

  I got 5.0.11 from the following repository, and when i tried :

   table t:type=grid source=clients exclude=name

  this does not work, where could i download the latest 5.0.11-SNAPSHOT?
  thanks,

  A.C.

   idtapestry-snapshots/id
   urlhttp://tapestry.formos.com/maven-snapshot-repository//url


  --
  View this message in context: 
 http://www.nabble.com/t5%3A-Repository-for-5.0.11-SNAPSHOT-tp15975677p15975677.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]



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



Re: T5 : How to access to a Component Body ?

2008-03-11 Thread Davor Hrg
explain what are zou trzing to achieve, maybe we can offer a different
approach..

Davor Hrg

On Tue, Mar 11, 2008 at 10:33 AM, Cordenier Christophe
[EMAIL PROTECTED] wrote:
 Thank you for your answer,

  But actually my component must access its child in a dynamic way.
  It will be used in different context for analysis purpose.

  I've been searching for different ways to access a component body.

  For exemple, by using nestedId at creation time by decorating the 
 PageElementFactory to identify if a component is contained in my component, 
 but the nestedId does not contain the id of the parent component but is only 
 suffixed to the container nested id.

  By decorating ComponentPageElement and intercepting addToBody method call 
 for my component only, but it was not enough for the children and I don't 
 want to generalize the use of these kind of hooks or wrapping mechanism 
 because of the internal aspect of the PageElementFactory and 
 ComponentPageElement classes.

  Best regards,
  Christophe.

  -Message d'origine-
  De : Davor Hrg [mailto:[EMAIL PROTECTED]
  Envoyé : mardi 11 mars 2008 10:08
  À : Tapestry users
  Objet : Re: T5 : How to access to a Component Body ?



  you can not access child components geenricaly,
  but you can access blocks by id.

  you can embed components
  @Component TextField name; //component's class is decided here
  and in template simply put:
  div t:id=name/


  but to access a textfield as Field you can:
  @InjectComponent private Field name;
  and then component's class is resolved from the template
  so in the template you must put:
  t:textfield id=name/


  you can not use it like this:
  @Component private Field name;
  and in template
  t:textfield id=name/


  Davor Hrg
  On Tue, Mar 11, 2008 at 9:25 AM, Cordenier Christophe
  [EMAIL PROTECTED] wrote:
   Hello,
  
I'm currently working on a component that needs to access the content of 
 its body to extract informations like parameters, or persistent variable used 
 by the components declared in its body.
  
Actually, the ComponentResources class allows me to access the container 
 of a component, but it appears that a child is not contained in the 
 component.
This should have helped me from a down-top view.
  
And I didn't find any method to access the body of a component.
  
Does anyone knows a way to access the children of a component ?
  
Best Regards,
Christophe Cordenier.
  
  
Ce message et les pi?ces jointes sont confidentiels et r?serv?s ? l'usage 
 exclusif de ses destinataires. Il peut ?galement ?tre prot?g? par le secret 
 professionnel. Si vous recevez ce message par erreur, merci d'en avertir 
 imm?diatement l'exp?diteur et de le d?truire. L'int?grit? du message ne 
 pouvant ?tre assur?e sur Internet, la responsabilit? du groupe Atos Origin ne 
 pourra ?tre recherch?e quant au contenu de ce message. Bien que les meilleurs 
 efforts soient faits pour maintenir cette transmission exempte de tout virus, 
 l'exp?diteur ne donne aucune garantie ? cet ?gard et sa responsabilit? ne 
 saurait ?tre recherch?e pour tout dommage r?sultant d'un virus transmis.
  
This e-mail and the documents attached are confidential and intended 
 solely for the addressee; it may also be privileged. If you receive this 
 e-mail in error, please notify the sender immediately and destroy it. As its 
 integrity cannot be secured on the Internet, the Atos Origin group liability 
 cannot be triggered for the message content. Although the sender endeavours 
 to maintain a computer virus-free network, the sender does not warrant that 
 this transmission is virus-free and will not be liable for any damages 
 resulting from any virus transmitted.
  
  
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
  
  

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




  Ce message et les pièces jointes sont confidentiels et réservés à l'usage 
 exclusif de ses destinataires. Il peut également être protégé par le secret 
 professionnel. Si vous recevez ce message par erreur, merci d'en avertir 
 immédiatement l'expéditeur et de le détruire. L'intégrité du message ne 
 pouvant être assurée sur Internet, la responsabilité du groupe Atos Origin ne 
 pourra être recherchée quant au contenu de ce message. Bien que les meilleurs 
 efforts soient faits pour maintenir cette transmission exempte de tout virus, 
 l'expéditeur ne donne aucune garantie à cet égard et sa responsabilité ne 
 saurait être recherchée pour tout dommage résultant d'un virus transmis.



  This e-mail and the documents attached are confidential and intended solely 
 for the addressee; it may also be privileged. If you receive this e-mail in 
 error, please notify the sender

Re: T5 : How to access to a Component Body ?

2008-03-11 Thread Davor Hrg
actualy,
you need not even do anything on the server side for such tabs,

this can be easily achieved with a small javascript function.
go through all children and generate tab controls taking title attribute
as ctrl text:

child.getAttribute(title);

for example I have a small hacked up js just for it
it uses label instead title


var TapestryUtil = {
createTabs: function(id){
var elem = $(id);
var selected = elem.getAttribute(selected);
var tabs = document.createElement(DIV);
tabs.className = minitab;
var cont = document.createElement(DIV);
cont.className = minitab_content;
var ch;
while(ch = elem.firstChild){
elem.removeChild(ch);
cont.appendChild(ch);
var code = ch.getAttribute(code);
var label = ch.getAttribute(label);

var tab = document.createElement(A);
tab.href=#+(code||);
tab.className = minitab;
tab.innerHTML = label || code || unlabelled;
tab._refContent = ch;
tab.onclick = tabClick;

if(code != null  selected != null  selected == code){
ch.style.display == ;
}else if(selected != null)
ch.style.display == none;

if(ch.style.display != none) tab.className +=  selected_minitab;
tabs.appendChild(tab);
}
elem.appendChild(tabs);
elem.appendChild(cont);

function tabClick(){
var current = this;
this.blur();
var ch = current.parentNode.firstChild;
while(ch){
if(ch != current){
Element.removeClassName(ch,selected_minitab);
ch._refContent.style.display = none;
}else{
Element.addClassName(ch,selected_minitab);
ch._refContent.style.display = ;
}
ch = ch.nextSibling;
}
return false;
}
}


};

Davor Hrg


On Tue, Mar 11, 2008 at 1:15 PM, David Marquis [EMAIL PROTECTED] wrote:
 Hi,

  He's having the same problem I had some time ago.
  Suppose I want to create a Tab Component and I want to be able to
  define it like this in the templates:

  t:tabs t:id=myTabs
t:tab t:id=tabOne title=First tab
h1Body of tab1/h1
pContinuing body.../p
/t:tab
t:tab t:id=tabTwo title=Second tab
h1Body of tab2/h1
pContinuing body.../p
/t:tab
  /t:tabs

  If would then like to 'render' this about that way:

  div class=tabs
 ul class=tabTitles
lia href=. onclick=switchtabs(1);First tab/li
lia href=. onclick=switchtabs(2);Second tab/li
 /ul
 div id=tabOne class=tab selected
h1Body of tab1/h1
pContinuing body.../p
 /div
 div id=tabTwo class=tab
h1Body of tab2/h1
pContinuing body.../p
 /div
  /div

  This is, I think, the most natural way of expressing tabs.
  But such a thing is not possible, because the Tabs component cannot
  accessing its child Tag components dynamically.
  More: if you provide a body for a component (like above), you cannot
  provide a template for this same component.

  I haven't found a way to implement such a component, and I think I had
  about the same initial problem as Christopher : A component cannot
  easily access its 'children' defined in the base template, build an
  internal model from that, and render using this model and an internal
  template.

  --
  David



  On 11-Mar-08, at 6:57 AM, Davor Hrg wrote:

   explain what are zou trzing to achieve, maybe we can offer a different
   approach..
  
   Davor Hrg
  
   On Tue, Mar 11, 2008 at 10:33 AM, Cordenier Christophe
   [EMAIL PROTECTED] wrote:
   Thank you for your answer,
  
   But actually my component must access its child in a dynamic way.
   It will be used in different context for analysis purpose.
  
   I've been searching for different ways to access a component body.
  
   For exemple, by using nestedId at creation time by decorating the
   PageElementFactory to identify if a component is contained in my
   component, but the nestedId does not contain the id of the parent
   component but is only suffixed to the container nested id.
  
   By decorating ComponentPageElement and intercepting addToBody
   method call for my component only, but it was not enough for the
   children and I don't want to generalize the use of these kind of
   hooks or wrapping mechanism because of the internal aspect of the
   PageElementFactory and ComponentPageElement classes.
  
   Best regards,
   Christophe.
  
   -Message d'origine-
   De : Davor Hrg [mailto:[EMAIL PROTECTED]
   Envoyé : mardi 11 mars 2008 10:08
   À : Tapestry users
   Objet : Re: T5 : How to access to a Component Body ?
  
  
  
   you can not access child components geenricaly,
   but you can access blocks

Re: T5: Implementing a Grid index strategy?

2008-03-11 Thread Davor Hrg
why is calculating page not an option ?

does selected row have to be first or you just
wan to navigate to the fist page that contains the row ?

Davor Hrg


On Tue, Mar 11, 2008 at 2:15 PM, Alec Leamas [EMAIL PROTECTED] wrote:
 I'm about to convert some T4 code to T5. In this code, I have a large ,
  paged table of persons with index links with the letters 'a' ..'z' at
  the  bottom of each page . Clicking  the 'c' link starts presenting the
  first persons with a name beginning with 'c', There are also links to go
  on page forward/backward. Like this:

   a b c d e f g h i j k l m n o p q r s t u v x y z 

  This is actually useful, it's much easier to press 'l' looking for
  leamas the to try to guess which page nr he is at.

  In T4, I had to recode large part of the table stuff , including sort
  etc, to implement this. I hoped T5 would be better, but the problem seem
  to be still here: The Grid has an internal model of a fixed number of
  pages, and a current page nr. This doesn't work with the sliding page
  window required to present the first page of users beginning with x'.
  For this to work, the actual page must be defined by the first row nr.

  In other words:  A flexible Grid should be able to position to any row
  in the data, not just to even page boundaries (according to the
  default's definition of a page).

  So, two questions:
  - Am I right thinking that implementing a GridIndex analog to GridPager
  isn't  straightforward in current design?
  - Would i be possible to change the code in Grid to open up for other
  paging strategies than a fixed nr of (numbered) pages? In particular,
  would it be possible to store  currentRow instead of  currentPage in Grid?


  Cheers,

  --alec

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



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



Re: T5: Implementing a Grid index strategy?

2008-03-11 Thread Davor Hrg
hm,
you can relatively easily mark the first one,
so it is noticed instantly
and that way pager and indexer are not in conflict..

definitely an user friendly feature you're creating there :)

Davor Hrg

On Tue, Mar 11, 2008 at 2:43 PM, Alec Leamas [EMAIL PROTECTED] wrote:
 It's an option, but not a good one. Looking for 'l' might present 24
  users beginning with 'k', and a last line of 'Larsson'. This is just not
  intuitive.

  The expected behaveour of an index link is to start presenting entries
  according to the link. (like javadoc :-) )

  --alec



  Davor Hrg wrote:
   why is calculating page not an option ?
  
   does selected row have to be first or you just
   wan to navigate to the fist page that contains the row ?
  
   Davor Hrg
  
  
   On Tue, Mar 11, 2008 at 2:15 PM, Alec Leamas [EMAIL PROTECTED] wrote:
  
   I'm about to convert some T4 code to T5. In this code, I have a large ,
paged table of persons with index links with the letters 'a' ..'z' at
the  bottom of each page . Clicking  the 'c' link starts presenting the
first persons with a name beginning with 'c', There are also links to go
on page forward/backward. Like this:
  
 a b c d e f g h i j k l m n o p q r s t u v x y z 
  
This is actually useful, it's much easier to press 'l' looking for
leamas the to try to guess which page nr he is at.
  
In T4, I had to recode large part of the table stuff , including sort
etc, to implement this. I hoped T5 would be better, but the problem seem
to be still here: The Grid has an internal model of a fixed number of
pages, and a current page nr. This doesn't work with the sliding page
window required to present the first page of users beginning with x'.
For this to work, the actual page must be defined by the first row nr.
  
In other words:  A flexible Grid should be able to position to any row
in the data, not just to even page boundaries (according to the
default's definition of a page).
  
So, two questions:
- Am I right thinking that implementing a GridIndex analog to GridPager
isn't  straightforward in current design?
- Would i be possible to change the code in Grid to open up for other
paging strategies than a fixed nr of (numbered) pages? In particular,
would it be possible to store  currentRow instead of  currentPage in 
 Grid?
  
  
Cheers,
  
--alec
  
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
  
  
  
  
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  


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



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



Re: T5: Implementing a Grid index strategy?

2008-03-11 Thread Davor Hrg
or even highliht all that begin with selected letter
so user is aware where the list ends

Davor Hrg

On Tue, Mar 11, 2008 at 2:48 PM, Davor Hrg [EMAIL PROTECTED] wrote:
 hm,
  you can relatively easily mark the first one,
  so it is noticed instantly
  and that way pager and indexer are not in conflict..

  definitely an user friendly feature you're creating there :)

  Davor Hrg



  On Tue, Mar 11, 2008 at 2:43 PM, Alec Leamas [EMAIL PROTECTED] wrote:
   It's an option, but not a good one. Looking for 'l' might present 24
users beginning with 'k', and a last line of 'Larsson'. This is just not
intuitive.
  
The expected behaveour of an index link is to start presenting entries
according to the link. (like javadoc :-) )
  
--alec
  
  
  
Davor Hrg wrote:
 why is calculating page not an option ?

 does selected row have to be first or you just
 wan to navigate to the fist page that contains the row ?

 Davor Hrg


 On Tue, Mar 11, 2008 at 2:15 PM, Alec Leamas [EMAIL PROTECTED] wrote:

 I'm about to convert some T4 code to T5. In this code, I have a large ,
  paged table of persons with index links with the letters 'a' ..'z' at
  the  bottom of each page . Clicking  the 'c' link starts presenting 
 the
  first persons with a name beginning with 'c', There are also links to 
 go
  on page forward/backward. Like this:

   a b c d e f g h i j k l m n o p q r s t u v x y z 

  This is actually useful, it's much easier to press 'l' looking for
  leamas the to try to guess which page nr he is at.

  In T4, I had to recode large part of the table stuff , including sort
  etc, to implement this. I hoped T5 would be better, but the problem 
 seem
  to be still here: The Grid has an internal model of a fixed number of
  pages, and a current page nr. This doesn't work with the sliding page
  window required to present the first page of users beginning with x'.
  For this to work, the actual page must be defined by the first row nr.

  In other words:  A flexible Grid should be able to position to any row
  in the data, not just to even page boundaries (according to the
  default's definition of a page).

  So, two questions:
  - Am I right thinking that implementing a GridIndex analog to 
 GridPager
  isn't  straightforward in current design?
  - Would i be possible to change the code in Grid to open up for other
  paging strategies than a fixed nr of (numbered) pages? In particular,
  would it be possible to store  currentRow instead of  currentPage in 
 Grid?


  Cheers,

  --alec

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




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


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


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



Re: T5: Implementing a Grid index strategy?

2008-03-11 Thread Davor Hrg
sounds reasonable,

you feel strong about this, so add a jira to make it a serious req.

Davor Hrg

On Tue, Mar 11, 2008 at 2:58 PM, Alec Leamas [EMAIL PROTECTED] wrote:
 True. And a little better. But it still like pushing a square into a
  round hole: Tapestry does not support the natural way to do it. I
  presume we agree that from a user point of view, start presenting the
  entries we are looking for is the expected thing.

  Also, there is actually more in this. I can think of other, reasonable
  paging strategies e. g., some entries of overlap for each page. My gut
  feeling is that Grid should be more generic, and that a GridPager should
  be free to define whatever strategy it wants. I think the only thing
  which needs to be changed is the Grid's idea of the actual page  being
  a row nr instead of a page nr. It shouldn't be hard to make this change
  without affecting current code. If required, one could even let setPage
  remain with current semantics?!




  Davor Hrg wrote:
   hm,
   you can relatively easily mark the first one,
   so it is noticed instantly
   and that way pager and indexer are not in conflict..
  
   definitely an user friendly feature you're creating there :)
  
   Davor Hrg
  
   On Tue, Mar 11, 2008 at 2:43 PM, Alec Leamas [EMAIL PROTECTED] wrote:
  
   It's an option, but not a good one. Looking for 'l' might present 24
users beginning with 'k', and a last line of 'Larsson'. This is just not
intuitive.
  
The expected behaveour of an index link is to start presenting entries
according to the link. (like javadoc :-) )
  
--alec
  
  
  
Davor Hrg wrote:
 why is calculating page not an option ?

 does selected row have to be first or you just
 wan to navigate to the fist page that contains the row ?

 Davor Hrg


 On Tue, Mar 11, 2008 at 2:15 PM, Alec Leamas [EMAIL PROTECTED] wrote:

 I'm about to convert some T4 code to T5. In this code, I have a large 
 ,
  paged table of persons with index links with the letters 'a' ..'z' at
  the  bottom of each page . Clicking  the 'c' link starts presenting 
 the
  first persons with a name beginning with 'c', There are also links 
 to go
  on page forward/backward. Like this:

   a b c d e f g h i j k l m n o p q r s t u v x y z 

  This is actually useful, it's much easier to press 'l' looking for
  leamas the to try to guess which page nr he is at.

  In T4, I had to recode large part of the table stuff , including sort
  etc, to implement this. I hoped T5 would be better, but the problem 
 seem
  to be still here: The Grid has an internal model of a fixed number of
  pages, and a current page nr. This doesn't work with the sliding page
  window required to present the first page of users beginning with 
 x'.
  For this to work, the actual page must be defined by the first row 
 nr.

  In other words:  A flexible Grid should be able to position to any 
 row
  in the data, not just to even page boundaries (according to the
  default's definition of a page).

  So, two questions:
  - Am I right thinking that implementing a GridIndex analog to 
 GridPager
  isn't  straightforward in current design?
  - Would i be possible to change the code in Grid to open up for other
  paging strategies than a fixed nr of (numbered) pages? In particular,
  would it be possible to store  currentRow instead of  currentPage in 
 Grid?


  Cheers,

  --alec

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




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


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


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



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



Re: T5 : How to access to a Component Body ?

2008-03-11 Thread Davor Hrg
A tab component mixin would fit here nicely :)
so a wrapper does not have to be arround every tab.

Davor Hrg

On Tue, Mar 11, 2008 at 3:34 PM, Howard Lewis Ship [EMAIL PROTECTED] wrote:
 You should think not of the Tabs conponent controlling the Tab
  components, but of all of them working together.

  The Tabs component can place an object into the Environment.

  The Tab components can retrieve that object, to register themselves
  so that the Tabs can render the correct markup.

  This is the relationship between Form and TextField (and friends).




  On Tue, Mar 11, 2008 at 6:31 AM, Davor Hrg [EMAIL PROTECTED] wrote:
   actualy,
you need not even do anything on the server side for such tabs,
  
this can be easily achieved with a small javascript function.
go through all children and generate tab controls taking title attribute
as ctrl text:
  
child.getAttribute(title);
  
for example I have a small hacked up js just for it
it uses label instead title
  
  
var TapestryUtil = {
   createTabs: function(id){
   var elem = $(id);
   var selected = elem.getAttribute(selected);
   var tabs = document.createElement(DIV);
   tabs.className = minitab;
   var cont = document.createElement(DIV);
   cont.className = minitab_content;
   var ch;
   while(ch = elem.firstChild){
   elem.removeChild(ch);
   cont.appendChild(ch);
   var code = ch.getAttribute(code);
   var label = ch.getAttribute(label);
  
   var tab = document.createElement(A);
   tab.href=#+(code||);
   tab.className = minitab;
   tab.innerHTML = label || code || unlabelled;
   tab._refContent = ch;
   tab.onclick = tabClick;
  
   if(code != null  selected != null  selected == code){
   ch.style.display == ;
   }else if(selected != null)
   ch.style.display == none;
  
   if(ch.style.display != none) tab.className +=  
 selected_minitab;
   tabs.appendChild(tab);
   }
   elem.appendChild(tabs);
   elem.appendChild(cont);
  
   function tabClick(){
   var current = this;
   this.blur();
   var ch = current.parentNode.firstChild;
   while(ch){
   if(ch != current){
   Element.removeClassName(ch,selected_minitab);
   ch._refContent.style.display = none;
   }else{
   Element.addClassName(ch,selected_minitab);
   ch._refContent.style.display = ;
   }
   ch = ch.nextSibling;
   }
   return false;
   }
   }
  
  
};
  
Davor Hrg
  
  
  
  
On Tue, Mar 11, 2008 at 1:15 PM, David Marquis [EMAIL PROTECTED] wrote:
 Hi,

  He's having the same problem I had some time ago.
  Suppose I want to create a Tab Component and I want to be able to
  define it like this in the templates:

  t:tabs t:id=myTabs
t:tab t:id=tabOne title=First tab
h1Body of tab1/h1
pContinuing body.../p
/t:tab
t:tab t:id=tabTwo title=Second tab
h1Body of tab2/h1
pContinuing body.../p
/t:tab
  /t:tabs

  If would then like to 'render' this about that way:

  div class=tabs
 ul class=tabTitles
lia href=. onclick=switchtabs(1);First tab/li
lia href=. onclick=switchtabs(2);Second tab/li
 /ul
 div id=tabOne class=tab selected
h1Body of tab1/h1
pContinuing body.../p
 /div
 div id=tabTwo class=tab
h1Body of tab2/h1
pContinuing body.../p
 /div
  /div

  This is, I think, the most natural way of expressing tabs.
  But such a thing is not possible, because the Tabs component cannot
  accessing its child Tag components dynamically.
  More: if you provide a body for a component (like above), you cannot
  provide a template for this same component.

  I haven't found a way to implement such a component, and I think I had
  about the same initial problem as Christopher : A component cannot
  easily access its 'children' defined in the base template, build an
  internal model from that, and render using this model and an internal
  template.

  --
  David



  On 11-Mar-08, at 6:57 AM, Davor Hrg wrote:

   explain what are zou trzing to achieve, maybe we can offer a 
 different
   approach..
  
   Davor Hrg
  
   On Tue, Mar 11, 2008 at 10:33 AM, Cordenier Christophe
   [EMAIL PROTECTED] wrote:
   Thank you for your answer,
  
   But actually my

Re: Newbie Tapestry

2008-03-07 Thread Davor Hrg
I really hope there are no Tapestry trolls on wicket mailing list,
like you are one here.

I'd like not to feed the troll, but I feel the need to mark you as troll,
so that new users don't get alarmed too much by your fud.

Like for chain letters and spam, it takes a moment to recognize the pattern.

Davor Hrg

On Fri, Mar 7, 2008 at 11:59 AM, Rob Smeets [EMAIL PROTECTED] wrote:
 Hi Gabriel,

  I dug into this list and found a routine that when someone dare to ask a
  legitimate question that probably may sound politically incorrect to some
  members, he gets the troll label. Why? I think that's too easy to do. Please
  answer my questions, if you have one.

  Rob

  On Fri, Mar 7, 2008 at 11:44 AM, Gabriel Landais [EMAIL PROTECTED]
  wrote:



   Rob Smeets a écrit :
Hi,
   
[...]
   
Rob
  
   Don't feed the troll
  
   Gabriel
  
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  


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



Re: T5: Examples for Cayenne integration?

2008-03-06 Thread Davor Hrg
The problem is not just tapestry,
the framework it self deals with it's own area...

but what users really need is guide on making applications in tapestry,
and that includes knowledge of an ORM.

Hibernate is great, but has many caveats, and you can not make a
decent application
without hibernate or something similar.




Davor Hrg

On Thu, Mar 6, 2008 at 10:34 AM, Andreas Pardeike [EMAIL PROTECTED] wrote:
 On 5 mar 2008, at 22.19, Robert Zeigler wrote:

   I'll do one better a little later today (or possibly tomorrow): I'll
   clean
   up my code and package it as a standalone cayenne integration
   module.

  I do believe that the need for such example(s) is quite high. What
  hinders
  T5 most from success is the lack of examples and documentation. I
  tried the
  really good hibernate(-annotations) support but it fails to map our
  legacy
  iSeries DB2 databases without primary keys and other horrible things.

  If you toss up some code I could actually take some of my time to put it
  up in the Tapestry Wiki so everyone can benefit from this.

  /Andreas



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



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



Re: T5.0.7 Validation error

2008-03-06 Thread Davor Hrg
isn't event name: validateForm

http://tapestry.formos.com/nightly/tapestry5/tapestry-core/ref/org/apache/tapestry/corelib/components/Form.html

under SubmitEvents topic

Davor Hrg

On Thu, Mar 6, 2008 at 4:56 PM, Joel Wiegman [EMAIL PROTECTED] wrote:
 componentResources.triggerEvent() appears to be broken in
  T5.0.11-SNAPSHOT

  I have the following situation:

  public class LayoutClass {

 @Component
 private Form editControlForm;

 public void onValidateFromEditControlForm() {
 resources.triggerEvent(formValidate, null, null);
 }

  }

  public class BaseClassThatUsesLayout {

 @Inject
 private LayoutClass layout;

  }

  public class SpecificPage extends BaseClassThatUsesLayout {

 public void onFormValidate() {
 System.out.println(Form validated!);
 }

  }

  When I upgraded from 5.0.7 to T5.0.11-SNAPSHOT the onFormValidate() is
  no longer called.

  Please advise... Thanks!




  -Original Message-
  From: Howard Lewis Ship [mailto:[EMAIL PROTECTED]


 Sent: Friday, December 28, 2007 5:23 PM
  To: Tapestry users
  Subject: Re: T5.0.7 Validation error

  On Dec 28, 2007 1:44 PM, Joel Wiegman [EMAIL PROTECTED] wrote:
   Ouch... That change botches up my current application pretty
  thoroughly.
  
   I don't think the event needs to be re-named... but consider the
   following situation:
  
   If a form is in a layout component that other pages use via the
   @Component annotation (say because most of the forms look very similar

   and they want to re-use the presentation and validation logic), they
   have no way of validating their forms in the pages, because they no
   longer have access to the validate event from the form.

  You can do onValidateFromLayout() ... that is, if Form is inside Layout,
  then the event will bubble up from Layout to your page, and will appear
  to originate with Layout.

  Alternately, the Layout component could capture the Form's validate
  event and trigger a new event with a name of your choice:

  boolean onValidateFromForm()
  {
   _componentResources.trigger(layoutvalidate, null, null); }

  
   I tried using the onValidateFromIndividualField() technique... the
   behavior of that seemed inconsistent (had to submit the form twice to
   get the event to fire???).

  Huh?

  Are you sure your client-side validation wasn't preventing the form
  submission?
  
   How does one log these events to see which events are firing?

  That isn't really logged right now.

  
   Looks like I'll have to start validation over from ground zero if I
   want to upgrade to 5.0.7...
  
   Perhaps the validation doc page could be updated with advice on proper

   validation techniques?
  
  
   -Original Message-
   From: Howard Lewis Ship [mailto:[EMAIL PROTECTED]
  
   Sent: Friday, December 28, 2007 3:25 PM
   To: Tapestry users
   Subject: Re: T5.0.7 Validation error
  
   Tapestry 5.0.7 adds a new way of validating input from the client, a
   validate event that is emitted from individual components and is
   distinct from the validate event from the form. The event handler
   method you already had, that was intended for cross-form validation
   after values are in place, is being executed too early, for each
  field.
   Sorry, unexpected consequences.  Perhaps the form's event should be
   renamed from validate to formValidate?
  
   Change your method name from onValidate() to onValidateFromForm()
   (adjusting for your form's id).
  
   On Dec 28, 2007 12:02 PM, Joel Wiegman [EMAIL PROTECTED] wrote:
There appears to be a bug with 5.0.7 in that any custom validation
method ( onValidate(), etc. ) gets called before the HTTP values get

bound to the Tapestry component.  Can anyone else confirm this?
   
-Original Message-
From: Joel Wiegman [mailto:[EMAIL PROTECTED]
Sent: Friday, December 28, 2007 2:40 PM
To: Tapestry users
   
Subject: RE: T5.0.7 Validation error
   
I'm trying to upgrade to 5.0.7 and can't get screens (that validated

just fine with 5.0.6) to validate either.
   
Will re-post once I find out more.
   
-Original Message-
From: Howard Lewis Ship [mailto:[EMAIL PROTECTED]
Sent: Friday, December 28, 2007 2:05 PM
To: Tapestry users
Subject: Re: T5.0.7 Validation error
   
Try clearing your browser cache, you may have the old tapestry.js
stuck in there.
   
On Dec 28, 2007 10:29 AM, Marcelo Lotif [EMAIL PROTECTED]
  wrote:
 When i switch to the 5.0.7 version, the validations of my
 BeanEditForms doesn't work properly...
 I have a BEF to add a user to the database. When i click on the
 submit
   
 button, it must validate the fields and go to another page to show

 all
   
 the users on the database. If there are errors on the validation,
 it
  
 must stay at the same page and show the errors to the user (as
 expected). When

Re: T5: beaneditor and remove

2008-03-05 Thread Davor Hrg
I agree,

both for BeanEditor and Grid,

for bean editor especialy if you want to
break bean editing into two or three parts...

but, I don't use BeanEditor because I like my forms in a Table, not divs...

Davor

On Wed, Mar 5, 2008 at 6:07 AM, Angelo Chen [EMAIL PROTECTED] wrote:

  Hi,

  I like beaneditor, it's very powerful, however I found this 'remove' option
  time consuming, many time I need to display or edit only a few fields, maybe
  we can add another parameter like 'removeAllExcept'? this will remove all
  the fields from the model except those listed, that will be a good time
  saving feature, what do you think?

  A.C.
  --
  View this message in context: 
 http://www.nabble.com/T5%3A-beaneditor-and-remove-tp15843373p15843373.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]



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



Re: [T5] How to skin .properties files? Localization almost good...

2008-03-05 Thread Davor Hrg
I agree with vjeran,
there sholud be an aditional string besides locale
for distinguishing resources.

Home.html
Home_customer1.html
Home_customer1_en.html
Home_customer2.html
Home_customer2_en.html

Davor Hrg

On Wed, Mar 5, 2008 at 6:46 AM, Vjeran Marcinko
[EMAIL PROTECTED] wrote:
 Hello.

  I already had this minor problem with Tapestry versions prior to T5, and it
  seems to me that it still persists...

  Anyway, sometimes I deploy my Tapestry application to various customers
  which want to have dfferent text messages or maybe even outlook of some
  pages. I can use CSS for some of it, but lets say that I want to pick
  different page/global .property file for displaying different messages
  stored in them.

  Actually, perfect solution for me would be some kindof Locale which could be
  set initially through Tapestry configuration, so I could have smething like:

  Home.properties
  Home_customer1.properties
  Home_customer2.properties

  Home.html
  Home_customer1.html
  Home_customer2.html

  Unfortunately, setting some dummy Locales like customer1 via JVM
  parameters doesn't work. It raises errors on multiple places in my app (not
  related to Tapestry).

  Ideas?

  BTW, has old Tapestry guys like Erik Hatcher, Mindbridge etc.. left to some
  other web open source projects? :)

  Regads,
  Vjeran


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



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



Re: AW: AW: T5: determine button clicked in a beaneditor

2008-03-05 Thread Davor Hrg
you can use BeanEditor inside a normal form,
and add your own buttons, and then you can
check onSelected for your own buttons easily


I for enitity editing have a component
and throw new events based on button clicked;

then capture them
onEntitySaved(id, entity, isNew)
onCancel()

this way outside component need not know about buttons inside..
but can rely on event names..

When I have parent enitity form that embeds child entity form
I can then do:
onEntitySavedFromChildForm(id, child,isNew){
if(isNew) child.setParent(parent);
}


to generate your own event:

@Inject private ComponentResources _resources;

   _resources.triggerEvent(entitySaved, new Object[]{_entityId,
_entity, isNew}, null);


Davor Hrg


On Wed, Mar 5, 2008 at 2:34 PM, Martin Kersten
[EMAIL PROTECTED] wrote:
 Hi Angelo,

I guess the session.get(User.class, id) should happen in
  onActivate or onSuccess (where I use it).

  Just threat the onSuccess method as an atomic event handler
  but onActivate should work also (not that sure).

  Just print all the hits of the event methods to console and
  see yourself. The order of the event should be:

  1. onActivate
  2. onSelectedXXX
  3. onSuccess

  I just use a schema like this in conjunction with a form
  context:

  onSuccess(int userId) {
User user = getUserById(id);
alterTheUserAccordingToForm(user);
storeUser(user);
  }

  Works very well.



  Cheers,

  Martin (Kersten)

  -Ursprüngliche Nachricht-
  Von: Angelo Chen [mailto:[EMAIL PROTECTED]
  Gesendet: Mittwoch, 5. März 2008 11:32

 An: users@tapestry.apache.org
  Betreff: Re: AW: AW: T5: determine button clicked in a beaneditor




  hi martin,

  yes, only to return a link:

   void onSelectedFromUpdate() {

 object = (Usr) session.get(Usr.class, id); // this is too late as 
 a object has been created this time
 }

 void onSelectedFromBack() {
 System.out.println(from back);

 }

 Link onSuccess() {
 return backLink;
 }




  Martin Kersten-2 wrote:
  
   Hi Angelo,
  
  Are you using the onSuccess event?
  
   Cheers,
  
   Martin (Kersten)
  
   -Ursprüngliche Nachricht-
   Von: Angelo Chen [mailto:[EMAIL PROTECTED]
   Gesendet: Mittwoch, 5. März 2008 10:48
   An: users@tapestry.apache.org
   Betreff: Re: AW: T5: determine button clicked in a beaneditor
  
  
   Hi Martin,
  
   The onSelected even happens after the form fields have been submitted,
   my need is to edit a Hibernate bean, what I'm doing now is: I
   persisted the bean's id, in the onActivate even I re-read the bean, so
   that form will update an existing bean, however, even the cancel
   button triggers onActivate event as well. so moving the re-reading of
   bean to onSelectedFromUpdate seems a solution, but it's too late at
   that time as form has been submitted, any idea ? Thanks,
  
   A.C.
   p.s. will be better if we can have an event before the form is
   submitted, that is onActivate, but we have no way to determine which
   button triggers the event there.
  
  
   Martin Kersten-2 wrote:
  
   Hi A.C.
  
  I asked the very same question before but in conjunction with
   normal t:form component. Since the bean-editor is based on that
   t:form component it should apply to this scenario as well:
  
   Rule of Thumb: If you have a button you have an onSelected event!
  
   So in your case:
  
   t:form
input t:type=submit t:id=done value=Done/  input
   t:type=submit t:id=failed value=Failed/ /t:form
  
   class MyPage {
  final int DONE = 0;
  final int FAILED = 1;
  
  int submitType = DONE;
  
  boolean onSelectedFromDone() {
 submitType = DONE;
 return true;
  }
  
  
  
  
   --
   View this message in context:
   http://www.nabble.com/T5%3A-determine-button-clicked-in-a-beaneditor-t
   p15841944p15846642.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]
  
  
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
  

  --
  View this message in context: 
 http://www.nabble.com/T5%3A-determine-button-clicked-in-a-beaneditor-tp15841944p15847228.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]


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



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

Re: AW: AW: AW: T5: determine button clicked in a beaneditor

2008-03-05 Thread Davor Hrg
you can just call session.evict when cancel button is clicked..
that single line works fine for me

Davor Hrg

On Wed, Mar 5, 2008 at 3:18 PM, Angelo Chen [EMAIL PROTECTED] wrote:

  Hi Martin,

  Your case should work as you have alterTheUserAccordingToForm. I'm just
  taking advantage of Tapestry-Hibernate's feature to save coding, in the
  first request, an object will be retrieved to render the form, in submission
  the existing object was retrieved again then merge with the data in the
  form, this saves the function similar to your alterTheUserAccordingToForm,
  it works very well if we have only a submit button, getting complicated when
  a cancel button is added.

  A.C.



  Martin Kersten-2 wrote:
  
   Hi Angelo,
  

  onSuccess(int userId) {
  User user = getUserById(id);
  alterTheUserAccordingToForm(user);
  storeUser(user);
   }
  
   Works very well.
  
  
  

  --
  View this message in context: 
 http://www.nabble.com/T5%3A-determine-button-clicked-in-a-beaneditor-tp15841944p15850624.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]



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



Re: AW: AW: T5: determine button clicked in a beaneditor

2008-03-05 Thread Davor Hrg
if you have two buttons:

t:submit value=message:save
t:submit t:id=cancel value=message:cancel


in java code
@Inject private Session _session;
@Inject private ComponentResources _resources;

 private boolean isCancel;

public void onSelectedFromCancel(){
isCancel = true;
}

public void onSuccess(){
if(isCancel){
_session.evict(_entity);//it is forgotten now
_resources.triggerEvent(cancel, new Object[0],null);
}else{
boolean isNew = _entity.getId() == null;
_session.saveOrUpdate(_entity);
_resources.triggerEvent(entitySaved, new
Object[]{_entity.getId(), _entity, isNew},null);
}

}


this way your component gives more information on what happened
and parent component can add extra logic I've mentioned before

onEntitySaved(id, entity, isNew)
onCancel()

I've actualy encapsulated all this into a Generic component
so in my impl there is extra code using TypeCoercer for translating entity id
for some operations.

Davor Hrg
On Wed, Mar 5, 2008 at 3:46 PM, Angelo Chen [EMAIL PROTECTED] wrote:

  Hi Davor,

  This is interesting, can you give a simple but complete sample how it works?
  thanks.

  A.C.



  Davor Hrg wrote:
  
  
   I for enitity editing have a component
   and throw new events based on button clicked;
  
   then capture them
   onEntitySaved(id, entity, isNew)
   onCancel()
  
   this way outside component need not know about buttons inside..
   but can rely on event names..
  
   When I have parent enitity form that embeds child entity form
   I can then do:
   onEntitySavedFromChildForm(id, child,isNew){
   if(isNew) child.setParent(parent);
   }
  
  
   to generate your own event:
  
   @Inject private ComponentResources _resources;
   
  _resources.triggerEvent(entitySaved, new Object[]{_entityId,
   _entity, isNew}, null);
  
  
   Davor Hrg
  

  --
  View this message in context: 
 http://www.nabble.com/T5%3A-determine-button-clicked-in-a-beaneditor-tp15841944p15851594.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]



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



Re: AW: AW: T5: determine button clicked in a beaneditor

2008-03-05 Thread Davor Hrg
as said,
just like any event
you declare a method properly named

for example form fires prepare success event
and you capture it by declaring in enclosing component:

public void onSuccess()
or
public void onSuccessFromMyForm()

so to capture entitySaved event
just declare
public void onEntitySaved(Long id, MyEntity entity, boolean isNew)

or for cancel
public void onCancel()


Davor Hrg


On Wed, Mar 5, 2008 at 4:12 PM, Angelo Chen [EMAIL PROTECTED] wrote:

  Hi Davor,

  I got your point, the thing I can't understand is the event, how to use
  those events triggered in the onSuccess?



  Davor Hrg wrote:
  
   public void onSuccess(){
   if(isCancel){
   _session.evict(_entity);//it is forgotten now
   _resources.triggerEvent(cancel, new Object[0],null);
   }else{
   boolean isNew = _entity.getId() == null;
   _session.saveOrUpdate(_entity);
   _resources.triggerEvent(entitySaved, new
   Object[]{_entity.getId(), _entity, isNew},null);
   }
  
   }
  
  

  --
  View this message in context: 
 http://www.nabble.com/T5%3A-determine-button-clicked-in-a-beaneditor-tp15841944p15852447.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]



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



Re: T5: 5.0.10 new features

2008-03-05 Thread Davor Hrg
I've struggled with many internal classes to see how generic
components could be achieved,
but after failing to find simple way to pass generic declaration to component.

I found a way to do it from inside the component,
but it works only for components, not for pages...

I'm still looking is there a real bebefit from this...

If this is helpful for you,
I can give you the snippet ...

Davor Hrg


On Wed, Feb 27, 2008 at 1:48 PM, Angelo Chen [EMAIL PROTECTED] wrote:

  Hi Howard,

  This is a very nice feature, in my app, I have many small tables, say 30, so
  to edit those 30 objects I have to create 30 page classes without template,
  that's a big saving. I'd like to save further, is there a way that we can
  create a generic page class that can be called from other pages? if this is
  possible then we save another 30 page classes. if this is not possbile I am
  thinking of 'embedding' the edit class in a main page class, say:

  // main page class for applicants

  public class AdminApplicant {

 // nested page class for the AdminApplicant.tml to call edit objects

 public class Edit extends EditPageApplicant {
 };
  }

  but the embedded Edit class is not visible in the AdminApplicant.tml, is
  there a way to make this works?

  Thanks,,

  A.C.




  Howard Lewis Ship wrote:
  
   To be more specified,
  
   you can define a base class:
  
   package com.myapp.base;
  
   public class EditPageT {
  
 @Persist private T _object;
  
 public T getObject() { return _object; }
  
 public void setObject(T object) { _object = object; }
  
. . .
   }
  
   So you can create a page that can edit an arbitrary object.  EditPage
   will have its own Tapestry template containing, say, a BeanEditForm.
  
   Now, you can define a new class:
  
   package com.myapp.pages;
  
   public class EditAccount extends EditPageAccount
   {
   }
  
   EditAccount will inherit logic and template from EditPage.
  
   Further, the getObject() and setObject() properties will be bound to
   the type Account.  This takes some doing, as the type of property
   object of class EditPage is nominally java.lang.Object (due to type
   erasure).  However, Tapestry does a bit of work with reflection to
   deduce the effective type of the property (Account).
  
   This is a very, very high level of reuse ... and once again, we are
   leveraging Java's type system to help us, rather than traditional Java
   coding where we spend our time appeasing the type system.
  
  
  

  --
  View this message in context: 
 http://www.nabble.com/T5%3A-5.0.10-new-features-tp15528824p15712557.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]



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



  1   2   3   4   >