Thank you, i have found my problem.
Inside my own cartHandler component, i have not set the productid as
form context, after doing so and getting the action with "public Object
onActionFromCartInsert(long productid){...}", i got the productid and
the related quantity.
...
<t:form t:id="cartInsert" context="productid"
xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd">
<t:textField t:value="productQuantity" size="2"
t:validate="required,maxlength=3" />
<t:submit />
</t:form>
...
Davor Hrg schrieb:
your code looks ok,
is it possible that any of the alements is actualy null,
how does your java code look like
currentProduct
and getCurrentProduct ans setCurrentProduct
...
Davor Hrg
On Feb 6, 2008 5:43 PM, T. Papke <[EMAIL PROTECTED]> wrote:
Hello,
i want just to get the current id of the product from earch row into my
own component (carthandler). But i always got a nullpointer because
currentProduct ist null? But wuy? CurrentPorduct is not null for the
column, where they render the pagelink for productdetailpage?
(with "prop:currentProduct.id" - its also not working)
(with fixed values like productid="3", everthing works as expected - but
i need the id from each product)
So general question is, how to pass dynamic properties to an other
component?
....
<t:grid source="resultList" row="currentProduct"
model="productListModel">
<t:parameter name="nameCell">
<a t:type="pagelink" page="productdetail"
context="currentProduct.id">${currentProduct.name}</a>
</t:parameter>
<t:parameter name="actionCell">
* <t:carthandler productid="currentProduct.id"/>*
</t:parameter>
</t:grid>
....
Thank you,
Thomas
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]