You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Ryan Cuprak <rc...@mac.com> on 2006/06/16 05:47:48 UTC
Table component problem
Hello,
I am having a extremely weird problem with the sort on contrib table. It worked perfectly fine (as far as I can tell) until I upgraded to Tapestry 4.0.2 from 4.0.1. When I click on sort I get an exception:
Either the tableModel parameter or both source and columns parameters must be specified by component pages/jobFunctionList/table.tableView
# org.apache.tapestry.contrib.table.components.TableView.getTableModel(TableView.java:220)
# org.apache.tapestry.contrib.table.components.inserted.SimpleTableColumnComponent.columnSelected(SimpleTableColumnComponent.java:149)
# sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
# sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
# sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
# java.lang.reflect.Method.invoke(Method.java:585)
# org.apache.tapestry.listener.ListenerMethodInvokerImpl.invokeTargetMethod(ListenerMethodInvokerImpl.java:214)
# org.apache.tapestry.listener.ListenerMethodInvokerImpl.invokeListenerMethod(ListenerMethodInvokerImpl.java:155)
# org.apache.tapestry.listener.ListenerMethodInvokerImpl.searchAndInvoke(ListenerMethodInvokerImpl.java:124)
# org.apache.tapestry.listener.ListenerMethodInvokerImpl.invokeListenerMethod(ListenerMethodInvokerImpl.java:77)
# org.apache.tapestry.listener.SyntheticListener.actionTriggered(SyntheticListener.java:51)
... (more)
The snippet from the page specification:
<component id="table" type="Contrib:Table">
<binding name="source" value="jobFunctions"/>
<binding name="columns" value="literal:!selected: :selected,name:Name:name,!description:Description:description"/>
<binding name="rowsClass" value="beans.evenOdd.next"/>
<binding name="columnsClass" value="literal:title"/>
</component>
Where is really gets weird is during debugging. I step from TableView.java line 249 into getSource() (abstract method) at which my debugger drops me into getBinding() of AbstractComponent.java line 311. It does find a binding for "source" which it returns. However, TableView gets a null which results in the exception above.
Any suggestions on troubleshooting? Are there any techniques for debugging that 'magical' layer - the dynamically generated object which calls getBinding(String name) on AbstractComponent as a result of a call on getSource(). I understand that getSource() gets converted to a string ('source') which is passed in as the name to lookup in the binding object of AbstractComponent. AbstractComponent finds a 'source' in its 'binding' object but that layer returns null instead.
Thanks!
-Ryan
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: Table component problem
Posted by Ryan Cuprak <rc...@mac.com>.
Hello,
As is usually the case right after sending the email below I
figured out my problem. I had spent over an hour digging and was
quiet perplexed. I needed to add a 'Persist' annotation to the 'get'
method used by the source. I did call the set method in the
pageBeginRender - which does not appear to be called when resorting
the table (don't quiet understand why yet...). However, any pointers
on how-to step into the 'dynamically' generated code/proxy would be
appreciated for future reference =)
Regards,
Ryan
On Jun 15, 2006, at 11:47 PM, Ryan Cuprak wrote:
> Hello,
> I am having a extremely weird problem with the sort on contrib
> table. It worked perfectly fine (as far as I can tell) until I
> upgraded to Tapestry 4.0.2 from 4.0.1. When I click on sort I get
> an exception:
> Either the tableModel parameter or both source and columns
> parameters must be specified by component pages/jobFunctionList/
> table.tableView
> #
> org.apache.tapestry.contrib.table.components.TableView.getTableModel
> (TableView.java:220)
> #
> org.apache.tapestry.contrib.table.components.inserted.SimpleTableColum
> nComponent.columnSelected(SimpleTableColumnComponent.java:149)
> # sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> # sun.reflect.NativeMethodAccessorImpl.invoke
> (NativeMethodAccessorImpl.java:39)
> # sun.reflect.DelegatingMethodAccessorImpl.invoke
> (DelegatingMethodAccessorImpl.java:25)
> # java.lang.reflect.Method.invoke(Method.java:585)
> #
> org.apache.tapestry.listener.ListenerMethodInvokerImpl.invokeTargetMet
> hod(ListenerMethodInvokerImpl.java:214)
> #
> org.apache.tapestry.listener.ListenerMethodInvokerImpl.invokeListenerM
> ethod(ListenerMethodInvokerImpl.java:155)
> #
> org.apache.tapestry.listener.ListenerMethodInvokerImpl.searchAndInvoke
> (ListenerMethodInvokerImpl.java:124)
> #
> org.apache.tapestry.listener.ListenerMethodInvokerImpl.invokeListenerM
> ethod(ListenerMethodInvokerImpl.java:77)
> # org.apache.tapestry.listener.SyntheticListener.actionTriggered
> (SyntheticListener.java:51)
> ... (more)
>
> The snippet from the page specification:
> <component id="table" type="Contrib:Table">
> <binding name="source" value="jobFunctions"/>
> <binding name="columns" value="literal:!
> selected: :selected,name:Name:name,!
> description:Description:description"/>
> <binding name="rowsClass" value="beans.evenOdd.next"/>
> <binding name="columnsClass" value="literal:title"/>
> </component>
>
> Where is really gets weird is during debugging. I step from
> TableView.java line 249 into getSource() (abstract method) at which
> my debugger drops me into getBinding() of AbstractComponent.java
> line 311. It does find a binding for "source" which it returns.
> However, TableView gets a null which results in the exception above.
> Any suggestions on troubleshooting? Are there any techniques for
> debugging that 'magical' layer - the dynamically generated object
> which calls getBinding(String name) on AbstractComponent as a
> result of a call on getSource(). I understand that getSource() gets
> converted to a string ('source') which is passed in as the name to
> lookup in the binding object of AbstractComponent.
> AbstractComponent finds a 'source' in its 'binding' object but that
> layer returns null instead.
>
> Thanks!
> -Ryan
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org