You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Glen Stampoultzis <gs...@iinet.net.au> on 2004/06/11 06:24:21 UTC
ListEditMap
Just looking through the EditPublishers example. I'm wondering why it's
necessary to have a synchronizePublisher() method.
If you changed
<input jwcid="inputName@TextField" value="ognl:publisher.name" size="40"
maxlength="40"/>
to
<input jwcid="inputName@TextField" value="ognl:listEditMap.value.name"
size="40" maxlength="40"/>
Wouldn't this remove the need to write a sync callback?
Regards,
Glen Stampoultzis
gstamp@iinet.net.au
http://members.iinet.net.au/~gstamp/glen/
Re: Tapestry<->JSF<->Struts
Posted by Philippe Paravicini <ph...@paravicini.com>.
I have used Struts with tiles and velocity and found the learning curve much
shallower than with Tapestry. Struts has its share of design issues, but it
is simple to learn and is aa much better approach than a pure jsp/servlet
approach. Because of its popularity, and the amount of criticism that it
receives, it is likely that it will evolve and be refined.
I have found Tapestry effective for building interfaces such as administration
systems that have a lot of recurring pieces of functionality. I most like
the fact that it formalizes the building of re-useable components.
On the negative side, I have found that it makes building read-only simple
sites overly complicated sometimes, and it definitely requires programmers
with good java understanding. The approach of turning the http
request/response model into an event/listener model is innovative, but can be
quite confusing and abstract for programmers who come from a web background.
I am not a fan of jsp technology for all the popular reasons (risk of
excessive logic in pages, troublesome to debug, inability to preview pages in
plain browser, etc..) but I have really enjoyed working with a tool like
Velocity where one can do a fair amount of simple display scripting on the
template itself, or in macros. This is a lot easier for web programmers and
does not require reloading of the application.
Tapestry templates are arguably pure html, but it's rather unusual html.
Velocity templates may not be pure html, but they look a lot more familiar to
html developers.
My least favorite approach is JSTL with its unsightly verbosity and nested
tags ( as in: <a href="<c:out...) , as well as the horrific tag libraries
that have business logic/data retrieval code that belongs in plain java
business objects.
I don't know much about JSF. I am thankful to Sun for the java language, but
Sun orthodoxy can be detrimental to one's health.
In the end, different tool fit different need, and picking the right tool for
a project given the talent available is probably more productive than staking
ideological claims on MVC supremacy.
That said, Tapestry rocks !
Philippe
----- Original Message -----
Sent: Wednesday 23 June 2004 03:36 am
From: Steve Luzynski <Steve Luzynski <sl...@mac.com>>
To: "Tapestry users" <ta...@jakarta.apache.org>
Subject: Re: Tapestry<->JSF<->Struts
On Jun 11, 2004, at 4:31 AM, sarah.simbad@women-at-work.org wrote:
> Just found a thread about whether it is useful to use Tapestry or not.
>
> http://www.mvnforum.com/mvnforum/viewthread?thread=2123
>
> Who is right?
Since no one answered your original question, and there is at least a
reasonable chance that you really want to know and aren't just hoping
to stir up some mess... :)
In my opinion (so in my mind, anyway, I am the one who is right):
Struts sucks. You have to write redundant and useless DTOs to use it
properly and it still has dependencies on JSPs, which also suck.
JSF sucks, again mostly because of the large amount of irrelevant
coding you'll be doing to use it. And again, too much JSP technology.
(I hate JSPs with a passion, can you tell?)
Tapestry, on the other hand:
Allows you to create your presentation layer with (almost) standard
HTML, editable in the visual tool of your choice (I use Dreamweaver
when I feel the need to do the WYSIWYG thing).
Does not require useless DTOs to move data between layers.
Enforces clean separation of business logic from presentation markup.
Does not impinge into your business logic, so it can be torn out if
need be without shredding your app.
Is very well supported by not only the creator, but a collection of
developers who are actually willing to help with problems instead of
telling you to go read the f'ing book.
Has a shallower learning curve.
Has a MUCH better Eclipse plugin (Spindle) - you don't need there to be
more than one because Geoff made a kickass environment and gives it
away for free.
Basically, does NOT suck.
I'm sure that there are lots of Struts people who would disagree. There
are also people who like to run marathons. Everyone has their quirks.
:)
-Steve
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: Tapestry<->JSF<->Struts
Posted by Steve Luzynski <sl...@mac.com>.
On Jun 11, 2004, at 4:31 AM, sarah.simbad@women-at-work.org wrote:
> Just found a thread about whether it is useful to use Tapestry or not.
>
> http://www.mvnforum.com/mvnforum/viewthread?thread=2123
>
> Who is right?
Since no one answered your original question, and there is at least a
reasonable chance that you really want to know and aren't just hoping
to stir up some mess... :)
In my opinion (so in my mind, anyway, I am the one who is right):
Struts sucks. You have to write redundant and useless DTOs to use it
properly and it still has dependencies on JSPs, which also suck.
JSF sucks, again mostly because of the large amount of irrelevant
coding you'll be doing to use it. And again, too much JSP technology.
(I hate JSPs with a passion, can you tell?)
Tapestry, on the other hand:
Allows you to create your presentation layer with (almost) standard
HTML, editable in the visual tool of your choice (I use Dreamweaver
when I feel the need to do the WYSIWYG thing).
Does not require useless DTOs to move data between layers.
Enforces clean separation of business logic from presentation markup.
Does not impinge into your business logic, so it can be torn out if
need be without shredding your app.
Is very well supported by not only the creator, but a collection of
developers who are actually willing to help with problems instead of
telling you to go read the f'ing book.
Has a shallower learning curve.
Has a MUCH better Eclipse plugin (Spindle) - you don't need there to be
more than one because Geoff made a kickass environment and gives it
away for free.
Basically, does NOT suck.
I'm sure that there are lots of Struts people who would disagree. There
are also people who like to run marathons. Everyone has their quirks.
:)
-Steve
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: Complimentary Software
Posted by Scott Ellsworth <sc...@alodar.com>.
On Jun 14, 2004, at 9:01 AM, eli@elidoran.com wrote:
> Hello, I'm planning on making a small scale web application using
> Tapestry. I am also planning on using JDO instead of JDBC to access my
> DB.
I have been happy with somewhat lighter weight tools than jdo. Cayenne
is my personal favorite after the one we wrote internally.
I usually use MySql for an external db, but hsql is good if you want to
embed a pure Java db.
Tapestry works well.
Scott
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: Complimentary Software
Posted by Philippe Paravicini <ph...@paravicini.com>.
We are using PgSql/Hibernate/Spring/Tapestry without problems.
I have used before a commercial OR mapping tool called ObjectMatter which
relied on code-generation, and I like hibernate's approach of declarative
mapping much more. Can you me point me to the source of the hibernate
controversy ?
If you are concerned about shielding your app from whatever OR tool that you
will be using, you should make sure that you 'hide' the db-access behind
suitable business interfaces so that your application's business code is not
aware of whatever OR-mapping tool you are using, and so that you can change
the implementation of the OR-mapping tool without having to change your
business code. If your OR-mapping tool forces you to introduce dependencies
on it in your business code, you may want to consider another choice.
You may also want to look at www.springframework.org for other infrastructure
ideas.
----- Original Message -----
Sent: Monday 14 June 2004 04:01 pm
From: eli@elidoran.com <<e...@elidoran.com>>
To: tapestry-user@jakarta.apache.org
Subject: Complimentary Software
Hello, I'm planning on making a small scale web application using
Tapestry. I am also planning on using JDO instead of JDBC to access my
DB. I was hoping some of you would voice your opinions on what JDO
vendors are good. I found JPOX (jpox.org) which is open source and was
wondering if any of you know how well that holds up in use? Hibernate
seems to be very controversial and am unsure how Tapestry users feel
about it, any comments?
I was also thinking about using HSQLDB (hsqldb.sourceforge.net) for the
DB as it is 100% pure Java. Should I just go through the extra steps
and use MySQL?
So, basically, for a small web application does Tapestry<->JPOX
JDO<->HSQLDB seem like a good or bad idea? what are your preferred
choices? What if my application grows larger?
Thank you for any information, I appreciate it,
Eli Doran
eli@elidoran.com
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: Complimentary Software
Posted by ca...@ocean7.com.
Maybe this one is enough for your needs?
http://www.drjava.de/smyle/
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Complimentary Software
Posted by el...@elidoran.com.
Hello, I'm planning on making a small scale web application using
Tapestry. I am also planning on using JDO instead of JDBC to access my
DB. I was hoping some of you would voice your opinions on what JDO
vendors are good. I found JPOX (jpox.org) which is open source and was
wondering if any of you know how well that holds up in use? Hibernate
seems to be very controversial and am unsure how Tapestry users feel
about it, any comments?
I was also thinking about using HSQLDB (hsqldb.sourceforge.net) for the
DB as it is 100% pure Java. Should I just go through the extra steps
and use MySQL?
So, basically, for a small web application does Tapestry<->JPOX
JDO<->HSQLDB seem like a good or bad idea? what are your preferred
choices? What if my application grows larger?
Thank you for any information, I appreciate it,
Eli Doran
eli@elidoran.com
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Tapestry<->JSF<->Struts
Posted by sa...@women-at-work.org.
Just found a thread about whether it is useful to use Tapestry or not.
http://www.mvnforum.com/mvnforum/viewthread?thread=2123
Who is right?
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
RE: ListEditMap
Posted by Glen Stampoultzis <gs...@iinet.net.au>.
Ahh... it all becomes clearer.
Being lazy by nature I was hoping for some convenient way to avoid having
to define the sync method each time. I'm thinking perhaps by building a
customized version of ListEditMap I could do this null checking
automatically there.
-- Glen
At 10:42 PM 13/06/2004, you wrote:
>Sorry, foggy this morning. The synchronizer is necessary to check for
>nulls, which may occur when
>server-side state has changed since the form was rendered. I.e., if a
>particular object has been
>deleted. It is also useful in more general cases, like verifying an object
>is still appropriate for
>the user ... any kind of server-side state change.
>
>--
>Howard M. Lewis Ship
>Independent J2EE / Open-Source Java Consultant
>Creator, Jakarta Tapestry
>Creator, Jakarta HiveMind
>http://howardlewisship.com
>
>
> > -----Original Message-----
> > From: Glen Stampoultzis [mailto:gstamp@iinet.net.au]
> > Sent: Sunday, June 13, 2004 8:12 AM
> > To: Tapestry users
> > Subject: RE: ListEditMap
> >
> >
> >
> > But as far as I can see it still just records the key field.
> > I verified
> > this through a test. Here's the HTML that was generated for my test:
> >
> >
> > <form method="post" name="Form0" action="/seaview/app">
> > <input type="hidden" name="service" value="direct/1/Test/$Form"/>
> > <input type="hidden" name="sp" value="S0"/>
> > <input type="hidden" name="Form0"
> > value="$ListEdit,firstname,lastname,email,delete,firstname$0,l
> > astname$0,email$0,delete$0"/>
> > <input type="hidden" name="$ListEdit" value="SADMINISTRATOR"/>
> > <input type="hidden" name="$ListEdit" value="SGUEST"/>
> >
> >
> > <table>
> > <tr> <td> <input type="text" name="firstname"
> > value="Administrator"/> </td>
> > <td> <input type="text" name="lastname" value=""/> </td>
> > <td> <input type="text" name="email"
> > value="gstamp@iinet.net.au"/> </td>
> > <td> <input type="checkbox" name="delete"/></td>
> >
> >
> > </tr><tr> <td> <input type="text" name="firstname$0"
> > value="Guest"/> </td>
> > <td> <input type="text" name="lastname$0" value=""/> </td>
> > <td> <input type="text" name="email$0"
> > value="gstamp@iinet.net.au"/>
> > </td>
> > <td> <input type="checkbox" name="delete$0"/></td>
> > </tr> </table>
> >
> >
> > <input type="submit" value="Submit">
> > </form>
> >
> > The key in this case is a string. This are just recorded as:
> >
> > <input type="hidden" name="$ListEdit" value="SADMINISTRATOR"/>
> > <input type="hidden" name="$ListEdit" value="SGUEST"/>
> >
> > Here's my form:
> >
> > <form jwcid="@Form" listener="ognl:listeners.submit">
> > <table>
> > <tr jwcid="@ListEdit" source="ognl:usersListEditMap.keys"
> > value="ognl:usersListEditMap.key" element="tr">
> > <td> <input jwcid="firstname@TextField"
> > value="ognl:usersListEditMap.value.firstName"/> </td>
> > <td> <input jwcid="lastname@TextField"
> > value="ognl:usersListEditMap.value.lastname"/> </td>
> > <td> <input jwcid="email@TextField"
> > value="ognl:usersListEditMap.value.email"/> </td>
> > <td> <input type="checkbox" jwcid="delete@Checkbox"
> > selected="ognl:usersListEditMap.checked"/></td>
> > </tr>
> > </table>
> > <input type="submit" value="Submit">
> > </form>
> >
> > The ListEdit control only serializes the keys collection not the
> > corresponding value. All I have to do it make sure I populate the
> > usersListEditMap property on the pageBeginRender().
> >
> > Regards,
> >
> > Glen
> >
> >
> > At 09:46 PM 13/06/2004, you wrote:
> > >You can get by without it, but the strings recorded into the form as
> > >hidden fields will be large and
> > >expensive. I try to work by recording ids (primary keys,
> > typically) rather
> > >than the full objects.
> > >That's when you need the synchronize listener, to restore a related
> > >property from the primary key
> > >property.
> > >
> > >--
> > >Howard M. Lewis Ship
> > >Independent J2EE / Open-Source Java Consultant
> > >Creator, Jakarta Tapestry
> > >Creator, Jakarta HiveMind
> > >http://howardlewisship.com
> > >
> > >
> > > > -----Original Message-----
> > > > From: Glen Stampoultzis [mailto:gstamp@iinet.net.au]
> > > > Sent: Sunday, June 13, 2004 5:05 AM
> > > > To: Tapestry users
> > > > Subject: Re: ListEditMap
> > > >
> > > >
> > > >
> > > > Okay... I'm going to answer my own question. I did a little
> > > > experiment and
> > > > it seems that there is no need for the sync part. This
> > makes using a
> > > > ListEditMap a lot easier.
> > > >
> > > > I might patch the documentation to reflect this.
> > > >
> > > > Regards,
> > > >
> > > > Glen Stampoultzis
> > > >
> > > >
> > > > At 02:24 PM 11/06/2004, you wrote:
> > > >
> > > > >Just looking through the EditPublishers example. I'm
> > > > wondering why it's
> > > > >necessary to have a synchronizePublisher() method.
> > > > >
> > > > >If you changed
> > > > >
> > > > ><input jwcid="inputName@TextField"
> > > > value="ognl:publisher.name" size="40"
> > > > >maxlength="40"/>
> > > > >
> > > > >
> > > > >to
> > > > >
> > > > ><input jwcid="inputName@TextField"
> > > > value="ognl:listEditMap.value.name"
> > > > >size="40" maxlength="40"/>
> > > > >
> > > > >Wouldn't this remove the need to write a sync callback?
> > > > >
> > > > >Regards,
> > > > >
> > > > >
> > > > >Glen Stampoultzis
> > > > >gstamp@iinet.net.au
> > > > >http://members.iinet.net.au/~gstamp/glen/
> > > >
> > > >
> > > > Glen Stampoultzis
> > > > gstamp@iinet.net.au
> > > > http://members.iinet.net.au/~gstamp/glen/
> > > >
> > >
> > >
> > >---------------------------------------------------------------------
> > >To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> > >For additional commands, e-mail:
> > tapestry-user-help@jakarta.apache.org
> >
> >
> > Glen Stampoultzis
> > gstamp@iinet.net.au
> > http://members.iinet.net.au/~gstamp/glen/
> >
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Glen Stampoultzis
gstamp@iinet.net.au
http://members.iinet.net.au/~gstamp/glen/
RE: ListEditMap
Posted by "Howard M. Lewis Ship" <hl...@comcast.net>.
Sorry, foggy this morning. The synchronizer is necessary to check for nulls, which may occur when
server-side state has changed since the form was rendered. I.e., if a particular object has been
deleted. It is also useful in more general cases, like verifying an object is still appropriate for
the user ... any kind of server-side state change.
--
Howard M. Lewis Ship
Independent J2EE / Open-Source Java Consultant
Creator, Jakarta Tapestry
Creator, Jakarta HiveMind
http://howardlewisship.com
> -----Original Message-----
> From: Glen Stampoultzis [mailto:gstamp@iinet.net.au]
> Sent: Sunday, June 13, 2004 8:12 AM
> To: Tapestry users
> Subject: RE: ListEditMap
>
>
>
> But as far as I can see it still just records the key field.
> I verified
> this through a test. Here's the HTML that was generated for my test:
>
>
> <form method="post" name="Form0" action="/seaview/app">
> <input type="hidden" name="service" value="direct/1/Test/$Form"/>
> <input type="hidden" name="sp" value="S0"/>
> <input type="hidden" name="Form0"
> value="$ListEdit,firstname,lastname,email,delete,firstname$0,l
> astname$0,email$0,delete$0"/>
> <input type="hidden" name="$ListEdit" value="SADMINISTRATOR"/>
> <input type="hidden" name="$ListEdit" value="SGUEST"/>
>
>
> <table>
> <tr> <td> <input type="text" name="firstname"
> value="Administrator"/> </td>
> <td> <input type="text" name="lastname" value=""/> </td>
> <td> <input type="text" name="email"
> value="gstamp@iinet.net.au"/> </td>
> <td> <input type="checkbox" name="delete"/></td>
>
>
> </tr><tr> <td> <input type="text" name="firstname$0"
> value="Guest"/> </td>
> <td> <input type="text" name="lastname$0" value=""/> </td>
> <td> <input type="text" name="email$0"
> value="gstamp@iinet.net.au"/>
> </td>
> <td> <input type="checkbox" name="delete$0"/></td>
> </tr> </table>
>
>
> <input type="submit" value="Submit">
> </form>
>
> The key in this case is a string. This are just recorded as:
>
> <input type="hidden" name="$ListEdit" value="SADMINISTRATOR"/>
> <input type="hidden" name="$ListEdit" value="SGUEST"/>
>
> Here's my form:
>
> <form jwcid="@Form" listener="ognl:listeners.submit">
> <table>
> <tr jwcid="@ListEdit" source="ognl:usersListEditMap.keys"
> value="ognl:usersListEditMap.key" element="tr">
> <td> <input jwcid="firstname@TextField"
> value="ognl:usersListEditMap.value.firstName"/> </td>
> <td> <input jwcid="lastname@TextField"
> value="ognl:usersListEditMap.value.lastname"/> </td>
> <td> <input jwcid="email@TextField"
> value="ognl:usersListEditMap.value.email"/> </td>
> <td> <input type="checkbox" jwcid="delete@Checkbox"
> selected="ognl:usersListEditMap.checked"/></td>
> </tr>
> </table>
> <input type="submit" value="Submit">
> </form>
>
> The ListEdit control only serializes the keys collection not the
> corresponding value. All I have to do it make sure I populate the
> usersListEditMap property on the pageBeginRender().
>
> Regards,
>
> Glen
>
>
> At 09:46 PM 13/06/2004, you wrote:
> >You can get by without it, but the strings recorded into the form as
> >hidden fields will be large and
> >expensive. I try to work by recording ids (primary keys,
> typically) rather
> >than the full objects.
> >That's when you need the synchronize listener, to restore a related
> >property from the primary key
> >property.
> >
> >--
> >Howard M. Lewis Ship
> >Independent J2EE / Open-Source Java Consultant
> >Creator, Jakarta Tapestry
> >Creator, Jakarta HiveMind
> >http://howardlewisship.com
> >
> >
> > > -----Original Message-----
> > > From: Glen Stampoultzis [mailto:gstamp@iinet.net.au]
> > > Sent: Sunday, June 13, 2004 5:05 AM
> > > To: Tapestry users
> > > Subject: Re: ListEditMap
> > >
> > >
> > >
> > > Okay... I'm going to answer my own question. I did a little
> > > experiment and
> > > it seems that there is no need for the sync part. This
> makes using a
> > > ListEditMap a lot easier.
> > >
> > > I might patch the documentation to reflect this.
> > >
> > > Regards,
> > >
> > > Glen Stampoultzis
> > >
> > >
> > > At 02:24 PM 11/06/2004, you wrote:
> > >
> > > >Just looking through the EditPublishers example. I'm
> > > wondering why it's
> > > >necessary to have a synchronizePublisher() method.
> > > >
> > > >If you changed
> > > >
> > > ><input jwcid="inputName@TextField"
> > > value="ognl:publisher.name" size="40"
> > > >maxlength="40"/>
> > > >
> > > >
> > > >to
> > > >
> > > ><input jwcid="inputName@TextField"
> > > value="ognl:listEditMap.value.name"
> > > >size="40" maxlength="40"/>
> > > >
> > > >Wouldn't this remove the need to write a sync callback?
> > > >
> > > >Regards,
> > > >
> > > >
> > > >Glen Stampoultzis
> > > >gstamp@iinet.net.au
> > > >http://members.iinet.net.au/~gstamp/glen/
> > >
> > >
> > > Glen Stampoultzis
> > > gstamp@iinet.net.au
> > > http://members.iinet.net.au/~gstamp/glen/
> > >
> >
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> >For additional commands, e-mail:
> tapestry-user-help@jakarta.apache.org
>
>
> Glen Stampoultzis
> gstamp@iinet.net.au
> http://members.iinet.net.au/~gstamp/glen/
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
RE: ListEditMap
Posted by Glen Stampoultzis <gs...@iinet.net.au>.
But as far as I can see it still just records the key field. I verified
this through a test. Here's the HTML that was generated for my test:
<form method="post" name="Form0" action="/seaview/app">
<input type="hidden" name="service" value="direct/1/Test/$Form"/>
<input type="hidden" name="sp" value="S0"/>
<input type="hidden" name="Form0"
value="$ListEdit,firstname,lastname,email,delete,firstname$0,lastname$0,email$0,delete$0"/>
<input type="hidden" name="$ListEdit" value="SADMINISTRATOR"/>
<input type="hidden" name="$ListEdit" value="SGUEST"/>
<table>
<tr> <td> <input type="text" name="firstname" value="Administrator"/> </td>
<td> <input type="text" name="lastname" value=""/> </td>
<td> <input type="text" name="email" value="gstamp@iinet.net.au"/> </td>
<td> <input type="checkbox" name="delete"/></td>
</tr><tr> <td> <input type="text" name="firstname$0" value="Guest"/> </td>
<td> <input type="text" name="lastname$0" value=""/> </td>
<td> <input type="text" name="email$0" value="gstamp@iinet.net.au"/>
</td>
<td> <input type="checkbox" name="delete$0"/></td>
</tr> </table>
<input type="submit" value="Submit">
</form>
The key in this case is a string. This are just recorded as:
<input type="hidden" name="$ListEdit" value="SADMINISTRATOR"/>
<input type="hidden" name="$ListEdit" value="SGUEST"/>
Here's my form:
<form jwcid="@Form" listener="ognl:listeners.submit">
<table>
<tr jwcid="@ListEdit" source="ognl:usersListEditMap.keys"
value="ognl:usersListEditMap.key" element="tr">
<td> <input jwcid="firstname@TextField"
value="ognl:usersListEditMap.value.firstName"/> </td>
<td> <input jwcid="lastname@TextField"
value="ognl:usersListEditMap.value.lastname"/> </td>
<td> <input jwcid="email@TextField"
value="ognl:usersListEditMap.value.email"/> </td>
<td> <input type="checkbox" jwcid="delete@Checkbox"
selected="ognl:usersListEditMap.checked"/></td>
</tr>
</table>
<input type="submit" value="Submit">
</form>
The ListEdit control only serializes the keys collection not the
corresponding value. All I have to do it make sure I populate the
usersListEditMap property on the pageBeginRender().
Regards,
Glen
At 09:46 PM 13/06/2004, you wrote:
>You can get by without it, but the strings recorded into the form as
>hidden fields will be large and
>expensive. I try to work by recording ids (primary keys, typically) rather
>than the full objects.
>That's when you need the synchronize listener, to restore a related
>property from the primary key
>property.
>
>--
>Howard M. Lewis Ship
>Independent J2EE / Open-Source Java Consultant
>Creator, Jakarta Tapestry
>Creator, Jakarta HiveMind
>http://howardlewisship.com
>
>
> > -----Original Message-----
> > From: Glen Stampoultzis [mailto:gstamp@iinet.net.au]
> > Sent: Sunday, June 13, 2004 5:05 AM
> > To: Tapestry users
> > Subject: Re: ListEditMap
> >
> >
> >
> > Okay... I'm going to answer my own question. I did a little
> > experiment and
> > it seems that there is no need for the sync part. This makes using a
> > ListEditMap a lot easier.
> >
> > I might patch the documentation to reflect this.
> >
> > Regards,
> >
> > Glen Stampoultzis
> >
> >
> > At 02:24 PM 11/06/2004, you wrote:
> >
> > >Just looking through the EditPublishers example. I'm
> > wondering why it's
> > >necessary to have a synchronizePublisher() method.
> > >
> > >If you changed
> > >
> > ><input jwcid="inputName@TextField"
> > value="ognl:publisher.name" size="40"
> > >maxlength="40"/>
> > >
> > >
> > >to
> > >
> > ><input jwcid="inputName@TextField"
> > value="ognl:listEditMap.value.name"
> > >size="40" maxlength="40"/>
> > >
> > >Wouldn't this remove the need to write a sync callback?
> > >
> > >Regards,
> > >
> > >
> > >Glen Stampoultzis
> > >gstamp@iinet.net.au
> > >http://members.iinet.net.au/~gstamp/glen/
> >
> >
> > Glen Stampoultzis
> > gstamp@iinet.net.au
> > http://members.iinet.net.au/~gstamp/glen/
> >
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Glen Stampoultzis
gstamp@iinet.net.au
http://members.iinet.net.au/~gstamp/glen/
RE: ListEditMap
Posted by "Howard M. Lewis Ship" <hl...@comcast.net>.
You can get by without it, but the strings recorded into the form as hidden fields will be large and
expensive. I try to work by recording ids (primary keys, typically) rather than the full objects.
That's when you need the synchronize listener, to restore a related property from the primary key
property.
--
Howard M. Lewis Ship
Independent J2EE / Open-Source Java Consultant
Creator, Jakarta Tapestry
Creator, Jakarta HiveMind
http://howardlewisship.com
> -----Original Message-----
> From: Glen Stampoultzis [mailto:gstamp@iinet.net.au]
> Sent: Sunday, June 13, 2004 5:05 AM
> To: Tapestry users
> Subject: Re: ListEditMap
>
>
>
> Okay... I'm going to answer my own question. I did a little
> experiment and
> it seems that there is no need for the sync part. This makes using a
> ListEditMap a lot easier.
>
> I might patch the documentation to reflect this.
>
> Regards,
>
> Glen Stampoultzis
>
>
> At 02:24 PM 11/06/2004, you wrote:
>
> >Just looking through the EditPublishers example. I'm
> wondering why it's
> >necessary to have a synchronizePublisher() method.
> >
> >If you changed
> >
> ><input jwcid="inputName@TextField"
> value="ognl:publisher.name" size="40"
> >maxlength="40"/>
> >
> >
> >to
> >
> ><input jwcid="inputName@TextField"
> value="ognl:listEditMap.value.name"
> >size="40" maxlength="40"/>
> >
> >Wouldn't this remove the need to write a sync callback?
> >
> >Regards,
> >
> >
> >Glen Stampoultzis
> >gstamp@iinet.net.au
> >http://members.iinet.net.au/~gstamp/glen/
>
>
> Glen Stampoultzis
> gstamp@iinet.net.au
> http://members.iinet.net.au/~gstamp/glen/
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: ListEditMap
Posted by Glen Stampoultzis <gs...@iinet.net.au>.
Okay... I'm going to answer my own question. I did a little experiment and
it seems that there is no need for the sync part. This makes using a
ListEditMap a lot easier.
I might patch the documentation to reflect this.
Regards,
Glen Stampoultzis
At 02:24 PM 11/06/2004, you wrote:
>Just looking through the EditPublishers example. I'm wondering why it's
>necessary to have a synchronizePublisher() method.
>
>If you changed
>
><input jwcid="inputName@TextField" value="ognl:publisher.name" size="40"
>maxlength="40"/>
>
>
>to
>
><input jwcid="inputName@TextField" value="ognl:listEditMap.value.name"
>size="40" maxlength="40"/>
>
>Wouldn't this remove the need to write a sync callback?
>
>Regards,
>
>
>Glen Stampoultzis
>gstamp@iinet.net.au
>http://members.iinet.net.au/~gstamp/glen/
Glen Stampoultzis
gstamp@iinet.net.au
http://members.iinet.net.au/~gstamp/glen/