You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by "Steve J. Kondik" <sh...@chemlab.org> on 2004/04/12 13:46:53 UTC
contrib:Table in rc1+
(this is a repost.. no replies the first time)
I'm at a complete loss here. 3.0-b4 works great with my app, but
anything
rc1 or above doesn't work properly.
I'm using the SQL table models of contrib:Table, along with Block
components to generate custom cells. In each row, the formatting of one
column may depend on the value of another column. In my current code, I
simply do something like:
currentRow.getString('columnname')
This throws an exception in rc1+, and I get an error "Operation not
allowed after ResultSet closed".
So.. I tried to do this by pulling the model back out of the Table
component:
components.xxxTable.getTableModel().getColumnModel().getColumn('columnname').getColumnValue(currentRow)
Now this ALMOST works, but I get some really odd behavior.. The last
row of the table renders with NULL values! The SQL queries look exactly
the same.
So my question is.. how can I make this work with these newer Tapestry
versions? I can't figure out whats changed that is breaking this.
help :)
--
Steve J. Kondik <sh...@chemlab.org>
Re: contrib:Table in rc1+
Posted by "Steve J. Kondik" <sh...@chemlab.org>.
i'm digging into this one, and it looks like notifyEnd() is being called
when the iterator hits the last line of the result set. the problem is
that when this is called, the column values of the last row haven't been
fetched yet.
On Mon, 2004-04-12 at 07:46 -0400, Steve J. Kondik wrote:
> (this is a repost.. no replies the first time)
>
> I'm at a complete loss here. 3.0-b4 works great with my app, but
> anything
> rc1 or above doesn't work properly.
>
> I'm using the SQL table models of contrib:Table, along with Block
> components to generate custom cells. In each row, the formatting of one
> column may depend on the value of another column. In my current code, I
> simply do something like:
>
> currentRow.getString('columnname')
>
> This throws an exception in rc1+, and I get an error "Operation not
> allowed after ResultSet closed".
>
> So.. I tried to do this by pulling the model back out of the Table
> component:
>
> components.xxxTable.getTableModel().getColumnModel().getColumn('columnname').getColumnValue(currentRow)
>
> Now this ALMOST works, but I get some really odd behavior.. The last
> row of the table renders with NULL values! The SQL queries look exactly
> the same.
>
> So my question is.. how can I make this work with these newer Tapestry
> versions? I can't figure out whats changed that is breaking this.
>
> help :)
>
> --
> Steve J. Kondik <sh...@chemlab.org>
Re: Sample Hibernate/Tapestry App Online
Posted by John Harrison <sr...@yahoo.co.uk>.
Hi John,
Simple and nice application. Please let us know when the source is available for browsing.
Thanks for your help.
Regards
J H.
John Studarus <st...@jhlconsulting.com> wrote:
I've put together a sample Hibernate/Tapestry
application online. It illustrates several of
the components including "contrib:Table" (with
clickable body links) and PropertySelection (including
one that does a form submit).
http://thermal.jhlconsulting.com:8080/botany/app
I'll clean up the source code and place it
online as well. I'm using this sample as a baseline
for a mechanism to build Tapestry pages automatically
from a Hibernate XML file.
I'll put this on the Wiki and hopefully it'll
be helpful to newcomers.
John
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
---------------------------------
Yahoo! Messenger - Communicate instantly..."Ping" your friends today! Download Messenger Now
Sample Hibernate/Tapestry App Online
Posted by John Studarus <st...@jhlconsulting.com>.
I've put together a sample Hibernate/Tapestry
application online. It illustrates several of
the components including "contrib:Table" (with
clickable body links) and PropertySelection (including
one that does a form submit).
http://thermal.jhlconsulting.com:8080/botany/app
I'll clean up the source code and place it
online as well. I'm using this sample as a baseline
for a mechanism to build Tapestry pages automatically
from a Hibernate XML file.
I'll put this on the Wiki and hopefully it'll
be helpful to newcomers.
John
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
textarea not updating - but insert does OK
Posted by John Studarus <st...@jhlconsulting.com>.
I'm noticing an interesting behavior where the data of a
textarea is not being displayed in the GUI when it is set
in java code. The listener of a button updates the textarea
but it never shows up in the GUI. However, if I use an Insert
then all is well. What might I be doing wrong? Seems somewhat
straight forward, might this be a bug in the in/out properties
of the TextArea object? Ideas?
John
page:
<component id="autopopulate" type="Submit">
<binding name="listener" expression="listeners.autopopulate"/>
</component>
<component id="whoisOutputTextArea" type="TextArea">
<binding name="value" expression="whoisOutputTextArea"/>
</component>
<component id="whoisOutputInsert" type="Insert">
<binding name="value" expression="whoisOutputInsert"/>
</component>
<property-specification name="whoisOutputTextArea" type="java.lang.String" persistent="yes" />
<property-specification name="whoisOutputInsert" type="java.lang.String" persistent="yes" />
java:
public abstract String getWhoisOutputInsert() ;
public abstract void setWhoisOutputInsert(String output) ;
public abstract String getWhoisOutputTextArea() ;
public abstract void setWhoisOutputTextArea(String output) ;
void autopopulate(IRequestCycle cycle)
{
String whois = new String("some text") ;
setWhoisOutputInsert(whois) ; // displays OK
setWhoisOutputTextArea(whois) ; // does not display
}
html:
TextArea: <SPAN jwcid="whoisOutputTextArea"></SPAN>
Insert: <SPAN jwcid="whoisOutputInsert"></SPAN>
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org