You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Ashish Raniwala <ar...@gmail.com> on 2005/02/05 01:10:02 UTC
DynamicBlock
Guys,
I am getting NullPointer in using Table and Tree component while loading
these components with DynamicBlock.
Components work fine when I don't use DynamicBlock and just add those
components in page template.
For both of these components (Table/Tree) I notice that the default value of
some parameter is not being set which later gives NullPointer. Obviously
NULL check is not there in code as component expect property to be not null
as default value is supplied in template.
For table component spec is:
<parameter name="tableSessionStoreManager"
type="org.apache.tapestry.contrib.table.model.ITableSessionStoreManager"
required="no"
direction="auto"
default-value="null">
<description>
The manager defining where the session data will be stored.
</description>
</parameter>
And for tree component spec is:
<parameter name="nodeOffsetPixel" type="java.lang.Integer"
direction="custom" required="no" default-value="15"/>
I get NullPointers as when DynamicBlock component adds these components to
page these properties are not set as default value.
What could be the reason and how to resolve it.
Thanks,
Ashish
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: DynamicBlock
Posted by Michael Henderson <mh...@mac.com>.
Hi,
Others have indicated that Table components do not work inside
DynamicBlock. the code is programmatically creating a Block containing
your table and adding it to the component list of the DynamicBlock when
the componentName is resolved.
There may be a problem with the parameter initialization during this
process.
Perhaps it might work if you create a separate component which contains
your table or tree which do not require parameters and use DynamicBlock
to insert this component
Mike
PS It might help to post the HTML and the spec where you use
DynamicBlock
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org