You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by Mindbridge <mi...@yahoo.com> on 2003/08/25 23:14:20 UTC

Re: New Table components [+ VOTE]

Hi guys,

    Sorry for the delay with this, but I finally had time to go through some
more extensive tests before I checked things in. Needless to say, I've
discovered some problems :)

    First of all, just a note of something that I found last week -- if a
LinkSubmit is used in a form, the form _must not_ contain an <input> with
the name 'submit'. If it does, the javascript gets confused and blows up
when form.submit() is invoked with the error "Object doesn't support this
property or method". In other words, using something like <span
jwcid="submit@Submit"/> and a LinkSubmit in the same form is a no-no. I lost
about 2 hours trying to determine this, perhaps we need to document it well.
One interesting point -- since Submit and LinkSubmit could be located in
different components, but in the same form, perhaps forbidding a component
id of 'submit' for the any of the <input> components would be a good idea?

    One other thing: LinkSubmit has the following javascript:

function submitLink(form, elementId) {
  form._linkSubmit.value = elementId;
  if (form.onsubmit == null || form.onsubmit())
    form.submit();
}

    This allows the following to occur: a LinkSubmit is pressed, the
_linkSubmit field's value is changed, but the onsubmit() method of the form
returns false (e.g. due to a client-side validator) and the form is not
submitted. If the user then clicks on a Submit button and the form is
submitted, the LinkSubmit listener is invoked sinc _linkSubmit was set
earlier, even though it was not really the cause of the event.  A quick fix
would be something like this:

function submitLink(form, elementId) {
  if (form.onsubmit == null || form.onsubmit()) {
    form._linkSubmit.value = elementId;
    form.submit();
  }
}

Please let me know if I am missing something, otherwise I will add a bug and
fix it.


    Back to TableFormPages -- this does not fully work at the moment. To
make it work, I need either FormConditional or delayed listener invocation
(and ideally both :). Howard, you mentioned that you are going to work on
FormConditional. When do you plan to check it in? Please let me know if I
can help in any way.

    With respect to the delayed listener invocation: we have ruled out
modifying the default behaviour in 3.0, which pretty much rules it out
completely (see discussion on backward compatibility). One alternative that
is fully backward-compatible (and hence would not cause backward-compatible
problems in future versions) and does not affect existing code is to add
another parameter to the Form components in addition to 'listener', say
'delayedListener'. That parameter will contain a listener that will be
invoked after the rewind but before the Form listener. The user of a form
component could define either or both a listener and a delayedListener -- 
they will be invoked, but at a different times. Two questions here to vote
on:

- Do you agree with this approach as a solution to the problem? What would
be a good alternative otherwise?
My personal opinion is obviously 'yes'.

- Should this wait until 3.1 given that we are in the beta cycle?
I would normally say 'wait', but this is a slightly special case -- there is
a lot of interest in this shown on the user list, it is demonstratably very
useful, it does not affect current code, and its late addition could be
compensated with special peer-review and targetted testing. In other words,
I am for additing it in the next beta, as long as at least TWO additional
committers express interest in performing a full code review and testing of
the changes. If there is no such commitment, I would vote strongly for
leaving it for 3.1.

Please vote :)

Best regards,
-mb


----- Original Message ----- 
From: "David Solis" <ds...@legosoft.com.mx>
To: "'Tapestry development'" <ta...@jakarta.apache.org>
Sent: Saturday, August 23, 2003 7:25 PM
Subject: RE: New Table components


> Please check your components in, I'd like to test them.
>
> Regards
>
> D.
>
> > -----Original Message-----
> > From: Mindbridge [mailto:mindbridgeweb@yahoo.com]
> > Sent: Saturday, August 23, 2003 8:49 AM
> > To: Tapestry development
> > Subject: New Table components
> >
> > Hi,
> >
> >     I have made a few new Table components for work in a form. The
> > equivalent of TableRows is TableFormRows and uses ListEdit instead of
> > Foreach, which should make it more or less immune to StaleLink
> exceptions.
> > There are also TableFormPages and a new standard rendition of the
> column
> > headers that use LinkSubmit instead of DirectLink. They allow, for
> > example, to select some items in the list using checkboxes, go to
> another
> > page, select some more, come back to the original page, and still
> remember
> > the originally selected items.
> >
> >     I would like to check those in, but we are in the beta cycle, so I
> > thought I should notify you first. Those are all new components in
> Contrib
> > (not the framework), there are no changes in the old ones, so I think
> that
> > should be okay.
> >
> >     One other little thing -- perhaps ListEdit could have another
> > (optinal) parameter, an interface that converts the iterated item into
> the
> > object that will be stored into the corresponding Hidden field. This
> would
> > allow iterating over non-serializable objects, getting their primary
> key,
> > storing that, and the recovering the object during the rewind. There
> are
> > workarounds, of course (e.g. registering a Squeeze Adaptor for that
> > object), but it seems to me it will greatly simplify the coding in
> some
> > situations and will decrease the size of the data that is passed back
> and
> > forth. Howard, you mentioned adding ListConditional to Contrib, does
> it
> > make sense adding this now as well? It is backward compatible.
> >
> > Best regards,
> > -mb
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org


Re: New Table components [+ VOTE]

Posted by "F. Da Costa Gomez" <dc...@fixed.com>.
No worries at all,

It was just a small reminder & yes most stuff went ok as you suspected.
Could probably be more elegant but I also need the integrated TableTree 
(which could possibly be combined with the generator).

If you need anything let me know.
Evening is fine (assuming y'r in the EUR or US timezone).
I'm off to a birthday now :'(

TIA
Fermin DCG


Mind Bridge wrote:

>Hi Fermin,
>
>I definitely have to look at that in details -- thank you. For some reason I
>had the impression that things there are going well, so I kind of left it at
>a lower priority.
>I will try to do that today in the evening and will get back to you. Is this
>okay?
>
>Best regards,
>-mb
>
>-----Original Message-----
>From: F. Da Costa Gomez [mailto:dcg@fixed.com]
>Sent: Tuesday, August 26, 2003 2:19 PM
>To: Tapestry development
>Subject: Re: New Table components [+ VOTE]
>
>
>Hi mb,
>
>A couple of weeks ago I 'threw' a columnGenerator at you. Maybe i could
>be usefull for others as well. (dd 20030806 & 20030731)
>Not sure you remember though because you seemed pretty swamped at that
>time (so you said in your reply).
>
>Seeing your name popping more regularly & the fact that some enrichment
>is due on the contrib:Table I thought that bringing it to your attention
>once more might be ok.
>
>I not desparate to have my name on something but I if you think there is
>no point please let me know as well so I won't post anymore re. this topic.
>
>There are just two things not completed yet:
>1. DropDown list in a cell.
>2. Table refresh does not behave well enough.
>
>TIA,
>Fermin DCG
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
>
>
>
>
>  
>




Re: New Table components

Posted by "F. Da Costa Gomez" <dc...@fixed.com>.
Hi,

Just something that popped to mind.
I've slapped some client side js to the table as well to give a 'better' 
experience to the user.
Basically it takes care of full row-selection (bald & different color) 
on mouseover and mouseout as well as modding the line color of a 
selected row.

If you think this would be helpfull lemme know and I'll throw in the code.

A small remark is in place however:
I'm currently using an idea Howard threw at me some weeks ago that 
basically led me to incorporate a 'hidden js library' on the client from 
which I can almost do any sexy thing I want on the client WITHOUT 
bothering the server.
I can probably even do client-side pre-processing prior to going 
server-side (I only have to get a good handle on info passing with the 
map-thing through js).
It would also allow me to balance rendering between the client and the 
server. Sending importantstuff from the server to the client and let 
some silly little js turn it into something much more jazzy (its there 
so why not use it?).

Tad bigger than expected :-(

Cheers,
Fermin DCG


Mind Bridge wrote:

>Hi Fermin,
>
>I definitely have to look at that in details -- thank you. For some reason I
>had the impression that things there are going well, so I kind of left it at
>a lower priority.
>I will try to do that today in the evening and will get back to you. Is this
>okay?
>
>Best regards,
>-mb
>
>-----Original Message-----
>From: F. Da Costa Gomez [mailto:dcg@fixed.com]
>Sent: Tuesday, August 26, 2003 2:19 PM
>To: Tapestry development
>Subject: Re: New Table components [+ VOTE]
>
>
>Hi mb,
>
>A couple of weeks ago I 'threw' a columnGenerator at you. Maybe i could
>be usefull for others as well. (dd 20030806 & 20030731)
>Not sure you remember though because you seemed pretty swamped at that
>time (so you said in your reply).
>
>Seeing your name popping more regularly & the fact that some enrichment
>is due on the contrib:Table I thought that bringing it to your attention
>once more might be ok.
>
>I not desparate to have my name on something but I if you think there is
>no point please let me know as well so I won't post anymore re. this topic.
>
>There are just two things not completed yet:
>1. DropDown list in a cell.
>2. Table refresh does not behave well enough.
>
>TIA,
>Fermin DCG
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
>
>
>
>
>  
>




Re: New Table components (TableTree example)

Posted by "F. Da Costa Gomez" <dc...@fixed.com>.
Hi,

Still alive or is it just taking more time than expected ;-) .
No worries.

Added a link that does what I described (I'm already trying to figure 
out whether we could utilize it).
Have a look-see, it seems quite usable.

http://sstree.tigris.org/nonav/example4.html

Cheers,
Fermin DCG


Mind Bridge wrote:

>Hi Fermin,
>
>I definitely have to look at that in details -- thank you. For some reason I
>had the impression that things there are going well, so I kind of left it at
>a lower priority.
>I will try to do that today in the evening and will get back to you. Is this
>okay?
>
>Best regards,
>-mb
>  
>



RE: New Table components [+ VOTE]

Posted by Mind Bridge <mi...@yahoo.com>.
Hi Fermin,

I definitely have to look at that in details -- thank you. For some reason I
had the impression that things there are going well, so I kind of left it at
a lower priority.
I will try to do that today in the evening and will get back to you. Is this
okay?

Best regards,
-mb

-----Original Message-----
From: F. Da Costa Gomez [mailto:dcg@fixed.com]
Sent: Tuesday, August 26, 2003 2:19 PM
To: Tapestry development
Subject: Re: New Table components [+ VOTE]


Hi mb,

A couple of weeks ago I 'threw' a columnGenerator at you. Maybe i could
be usefull for others as well. (dd 20030806 & 20030731)
Not sure you remember though because you seemed pretty swamped at that
time (so you said in your reply).

Seeing your name popping more regularly & the fact that some enrichment
is due on the contrib:Table I thought that bringing it to your attention
once more might be ok.

I not desparate to have my name on something but I if you think there is
no point please let me know as well so I won't post anymore re. this topic.

There are just two things not completed yet:
1. DropDown list in a cell.
2. Table refresh does not behave well enough.

TIA,
Fermin DCG



---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org


Re: New Table components [+ VOTE]

Posted by "F. Da Costa Gomez" <dc...@fixed.com>.
Hi mb,

A couple of weeks ago I 'threw' a columnGenerator at you. Maybe i could 
be usefull for others as well. (dd 20030806 & 20030731)
Not sure you remember though because you seemed pretty swamped at that 
time (so you said in your reply).

Seeing your name popping more regularly & the fact that some enrichment 
is due on the contrib:Table I thought that bringing it to your attention 
once more might be ok.

I not desparate to have my name on something but I if you think there is 
no point please let me know as well so I won't post anymore re. this topic.

There are just two things not completed yet:
1. DropDown list in a cell.
2. Table refresh does not behave well enough.

TIA,
Fermin DCG



LinkSubmit (was RE: New Table components [+ VOTE])

Posted by Richard Lewis-Shell <rl...@mac.com>.
mb - _both_ of those LinkSubmit issues sound like bugs to me, and your
analysis of the latter seems spot on...

R

-----Original Message-----
From: Mindbridge [mailto:mindbridgeweb@yahoo.com] 
Sent: Tuesday, 26 August 2003 9:14 a.m.
To: Tapestry development
Subject: Re: New Table components [+ VOTE]


Hi guys,

    Sorry for the delay with this, but I finally had time to go through some
more extensive tests before I checked things in. Needless to say, I've
discovered some problems :)

    First of all, just a note of something that I found last week -- if a
LinkSubmit is used in a form, the form _must not_ contain an <input> with
the name 'submit'. If it does, the javascript gets confused and blows up
when form.submit() is invoked with the error "Object doesn't support this
property or method". In other words, using something like <span
jwcid="submit@Submit"/> and a LinkSubmit in the same form is a no-no. I lost
about 2 hours trying to determine this, perhaps we need to document it well.
One interesting point -- since Submit and LinkSubmit could be located in
different components, but in the same form, perhaps forbidding a component
id of 'submit' for the any of the <input> components would be a good idea?

    One other thing: LinkSubmit has the following javascript:

function submitLink(form, elementId) {
  form._linkSubmit.value = elementId;
  if (form.onsubmit == null || form.onsubmit())
    form.submit();
}

    This allows the following to occur: a LinkSubmit is pressed, the
_linkSubmit field's value is changed, but the onsubmit() method of the form
returns false (e.g. due to a client-side validator) and the form is not
submitted. If the user then clicks on a Submit button and the form is
submitted, the LinkSubmit listener is invoked sinc _linkSubmit was set
earlier, even though it was not really the cause of the event.  A quick fix
would be something like this:

function submitLink(form, elementId) {
  if (form.onsubmit == null || form.onsubmit()) {
    form._linkSubmit.value = elementId;
    form.submit();
  }
}

Please let me know if I am missing something, otherwise I will add a bug and
fix it.


    Back to TableFormPages -- this does not fully work at the moment. To
make it work, I need either FormConditional or delayed listener invocation
(and ideally both :). Howard, you mentioned that you are going to work on
FormConditional. When do you plan to check it in? Please let me know if I
can help in any way.

    With respect to the delayed listener invocation: we have ruled out
modifying the default behaviour in 3.0, which pretty much rules it out
completely (see discussion on backward compatibility). One alternative that
is fully backward-compatible (and hence would not cause backward-compatible
problems in future versions) and does not affect existing code is to add
another parameter to the Form components in addition to 'listener', say
'delayedListener'. That parameter will contain a listener that will be
invoked after the rewind but before the Form listener. The user of a form
component could define either or both a listener and a delayedListener -- 
they will be invoked, but at a different times. Two questions here to vote
on:

- Do you agree with this approach as a solution to the problem? What would
be a good alternative otherwise? My personal opinion is obviously 'yes'.

- Should this wait until 3.1 given that we are in the beta cycle? I would
normally say 'wait', but this is a slightly special case -- there is a lot
of interest in this shown on the user list, it is demonstratably very
useful, it does not affect current code, and its late addition could be
compensated with special peer-review and targetted testing. In other words,
I am for additing it in the next beta, as long as at least TWO additional
committers express interest in performing a full code review and testing of
the changes. If there is no such commitment, I would vote strongly for
leaving it for 3.1.

Please vote :)

Best regards,
-mb


----- Original Message ----- 
From: "David Solis" <ds...@legosoft.com.mx>
To: "'Tapestry development'" <ta...@jakarta.apache.org>
Sent: Saturday, August 23, 2003 7:25 PM
Subject: RE: New Table components


> Please check your components in, I'd like to test them.
>
> Regards
>
> D.
>
> > -----Original Message-----
> > From: Mindbridge [mailto:mindbridgeweb@yahoo.com]
> > Sent: Saturday, August 23, 2003 8:49 AM
> > To: Tapestry development
> > Subject: New Table components
> >
> > Hi,
> >
> >     I have made a few new Table components for work in a form. The 
> > equivalent of TableRows is TableFormRows and uses ListEdit instead 
> > of Foreach, which should make it more or less immune to StaleLink
> exceptions.
> > There are also TableFormPages and a new standard rendition of the
> column
> > headers that use LinkSubmit instead of DirectLink. They allow, for 
> > example, to select some items in the list using checkboxes, go to
> another
> > page, select some more, come back to the original page, and still
> remember
> > the originally selected items.
> >
> >     I would like to check those in, but we are in the beta cycle, so 
> > I thought I should notify you first. Those are all new components in
> Contrib
> > (not the framework), there are no changes in the old ones, so I 
> > think
> that
> > should be okay.
> >
> >     One other little thing -- perhaps ListEdit could have another
> > (optinal) parameter, an interface that converts the iterated item 
> > into
> the
> > object that will be stored into the corresponding Hidden field. This
> would
> > allow iterating over non-serializable objects, getting their primary
> key,
> > storing that, and the recovering the object during the rewind. There
> are
> > workarounds, of course (e.g. registering a Squeeze Adaptor for that 
> > object), but it seems to me it will greatly simplify the coding in
> some
> > situations and will decrease the size of the data that is passed 
> > back
> and
> > forth. Howard, you mentioned adding ListConditional to Contrib, does
> it
> > make sense adding this now as well? It is backward compatible.
> >
> > Best regards,
> > -mb
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org