You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by madan chowdary <ma...@yahoo.com> on 2007/03/26 14:13:09 UTC

[ Tobago ] Regarding Object Ref in Server Side

Hi All,

I have a sheet, which displays a set of items in a cart. 

The sheet has 5 columns, in which two are editable.

One is the 'Delete' column which has checkboxes and other is 'Qty' which has textfields.

I have a command button to recalculate the CartItems if any of these are changed, this is done when i click on that button.

But now i am planning to do this with Ajax. When i click on the delete checkbox for a particular item in a row, then it should be deleted ( or ) when value changes in Qty field then other columns in that should change.

using renderPartially, i was able to do an ajax call which can do the task.

But i need to get hold of the object which is to be deleted.

The checkbox name after rendering is " page:shoppingCart:checkOutSheet:0:p_code ".
where 
shoppingCart is the page Id, 
checkOutSheet: is the Sheet ID, 
p_code is the tc:selectBooleanCheckbox ID.

Now how can i refer this object in my controller, where i can delete the Item with an ajax call.

Regards,
Madan










		
__________________________________________________________
Yahoo! India Answers: Share what you know. Learn something new
http://in.answers.yahoo.com/

Re: [ Tobago ] Regarding Object Ref in Server Side

Posted by Volker Weber <v....@inexso.de>.
Hi Madan,

if you use a a actionListener method for deleting you can access the
rowObject via

event.getUIComponent().getRowData()

see also here: http://www.nabble.com/-Tobago--Popup-inside-tc%3Asheet-tf3466547.html

Regards,
  Volker


2007/3/26, madan chowdary <ma...@yahoo.com>:
>
> Hi All,
>
> I have a sheet, which displays a set of items in a cart.
>
> The sheet has 5 columns, in which two are editable.
>
> One is the 'Delete' column which has checkboxes and other is 'Qty' which has
> textfields.
>
> I have a command button to recalculate the CartItems if any of these are
> changed, this is done when i click on that button.
>
> But now i am planning to do this with Ajax. When i click on the delete
> checkbox for a particular item in a row, then it should be deleted ( or )
> when value changes in Qty field then other columns in that should change.
>
> using renderPartially, i was able to do an ajax call which can do the task.
>
> But i need to get hold of the object which is to be deleted.
>
> The checkbox name after rendering is "
> page:shoppingCart:checkOutSheet:0:p_code ".
> where
> shoppingCart is the page Id,
> checkOutSheet: is the Sheet ID,
> p_code is the tc:selectBooleanCheckbox ID.
>
> Now how can i refer this object in my controller, where i can delete the
> Item with an ajax call.
>
> Regards,
> Madan
>
>
>
>
>
>
>
>  ________________________________
>  Here's a new way to find what you're looking for - Yahoo! Answers