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 Narra <ma...@gmail.com> on 2007/05/16 13:49:18 UTC

[Tobago] Regarding renderedPartially in Sheet

Hi All,

I have a sheet which has an inputText in one of its column and a simple
<tc:out> in another columns.

I need to add a <f:facet name="change"> for all the inputText available in
the sheet.

Based upon the value change in one of the rows in text filed, i need to
update its corresponing <tc:out>

Say the id of the sheet is " search" , now the inputText filed has got "
page:search:0:text " and the panel around tc:out has
"page:search:0:outPanel" for the first row

<tc:column label="Text" id="text">
    <tc:in value="#{search.text}" id="p_quantity"
width="40" markup="number">
    <f:validateLength  maximum="4"/>
    <f:facet name="change">
       <tc:command action="#{search.status}">
           <tc:attribute name="renderedPartially" value="*
:page:search:0:outPanel*"/>
       </tc:command>
    </f:facet>
   </tc:in>
</tc:column>
<tc:column label="Status" >
  <tc:panel id="outPanel">
    <tc:out value="#{search.statusText}"  markup="sheetTxt"/>
  </tc:panel></tc:column>

Was able to send the ajax request and update the panel in the first (0th)
row and show up the status.

But as you can see, i specifid the row number statically..which should not
be the case.

Based upon the value change in the text filed i need to get that value in
the controller and update that particular panel in the row.

How can this be achieved....

Thnx in Advance,

Regards,

Madan N

Re: [Tobago] Regarding renderedPartially in Sheet

Posted by Madan Narra <ma...@gmail.com>.
Hi Volker,

Will add the 'rowIndexVar' in the JIRA as feature request, Thnx for
informing .

Well, i have another doubt regarding the Sheet Component and its
functionality when an renderPartially is done.

I have an Array with around 100 objects which when used for sheet whould
display ten records per page and total of 10 pages.

Have a column with <tc:in/> which when changed refreshes the panel which has
a sheet inside that.

Am getting the Array, iterating the array and manipulating as needed in the
application code when there is a change in <tc:in/> and refreshing the whole
sheet.

But this is taking time as there are 100 or even more records.

Is there any way to get the CurrentPage records in the application code , so
that manipulation can be done for only those when a change in <tc:in>
occures and refresh only that page and not the whole sheet ?

Think you understand my case....

Regards,
Madan N

Re: [Tobago] Regarding renderedPartially in Sheet

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

this is not possible in tobago.

If you need this please add a feature request in jira for something
like the 'rowIndexVar' in tomahawks dataTable.

Regards,
  Volker

2007/5/19, Madan Narra <ma...@gmail.com>:
> Hi Volker,
>
> thnx for the solution... I have another doubt regarding the tc:sheet
> rowIndex.
>
> How can we know the current RowIndex for the rows in the sheet.
>
> If i want to display the Row Number in one of my column, how can i Display
> the current rowIndex for each row.
>
> Regards,
> Madan N

Re: [Tobago] Regarding renderedPartially in Sheet

Posted by Madan Narra <ma...@gmail.com>.
Hi Volker,

thnx for the solution... I have another doubt regarding the tc:sheet
rowIndex.

How can we know the current RowIndex for the rows in the sheet.

If i want to display the Row Number in one of my column, how can i Display
the current rowIndex for each row.

Regards,
Madan N

Re: [Tobago] Regarding renderedPartially in Sheet

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

it is currently not possible to do ajax refresh for components inside
of a sheet.

The current algorithm to find and render the requested componenent did
not setup a parent UIData component to the requested rowIndex.
so you will not get the correct values if you use the var attribute of
the sheet.

If you want to update a panel with a value which did not depends on the var
(did not make mutch sense inside a sheet) it should work just by setting the id
of the panel as renderedPartially e.g.:

<tc:attribute name="renderedPartially" value="outPanel "/>

In this case the command(-facet) and the panel needs to be inside the same
NamingContainer (the sheet in this case).


Regards,
    Volker

2007/5/17, Madan Narra <ma...@gmail.com>:
> Hi ,
>
> Is there anyway to implement the below said feature...
>
> awaiting for a response eagerly as we were in a urgent with this feature...
>
> Thnx
>
> Regards,
> Madan N
>
>
>
> On 5/16/07, Madan Narra <ma...@gmail.com> wrote:
> >
> > Hi All,
> >
> > I have a sheet which has an inputText in one of its column and a simple
> <tc:out> in another columns.
> >
> > I need to add a <f:facet name="change"> for all the inputText available in
> the sheet.
> >
> > Based upon the value change in one of the rows in text filed, i need to
> update its corresponing <tc:out>
> >
> > Say the id of the sheet is " search" , now the inputText filed has got "
> page:search:0:text " and the panel around tc:out has
> "page:search:0:outPanel" for the first row
> >
> >
> > <tc:column label="Text" id="text">
> >     <tc:in value="#{search.text}" id="p_quantity" width="40"
> markup="number">
> >     <f:validateLength  maximum="4"/>
> >     <f:facet name="change">
> >        <tc:command action="#{search.status}">
> >            <tc:attribute name="renderedPartially"
> value=":page:search:0:outPanel "/>
> >        </tc:command>
> >     </f:facet>
> >    </tc:in>
> > </tc:column>
> > <tc:column label="Status" >
> >   <tc:panel id="outPanel">
> >     <tc:out value="#{search.statusText}"  markup="sheetTxt"/>
> >   </tc:panel></tc:column>
> >
> > Was able to send the ajax request and update the panel in the first (0th)
> row and show up the status.
> >
> > But as you can see, i specifid the row number statically..which should not
> be the case.
> >
> > Based upon the value change in the text filed i need to get that value in
> the controller and update that particular panel in the row.
> >
> > How can this be achieved....
> >
> > Thnx in Advance,
> >
> > Regards,
> >
> > Madan N
>
>
>
> --
> Regards,
> Madan N

Re: [Tobago] Regarding renderedPartially in Sheet

Posted by Madan Narra <ma...@gmail.com>.
Hi ,

Is there anyway to implement the below said feature...

awaiting for a response eagerly as we were in a urgent with this feature...

Thnx

Regards,
Madan N


On 5/16/07, Madan Narra <ma...@gmail.com> wrote:
>
> Hi All,
>
> I have a sheet which has an inputText in one of its column and a simple
> <tc:out> in another columns.
>
> I need to add a <f:facet name="change"> for all the inputText available in
> the sheet.
>
> Based upon the value change in one of the rows in text filed, i need to
> update its corresponing <tc:out>
>
> Say the id of the sheet is " search" , now the inputText filed has got "
> page:search:0:text " and the panel around tc:out has
> "page:search:0:outPanel" for the first row
>
> <tc:column label="Text" id="text">
>     <tc:in value="#{search.text}" id="p_quantity"
> width="40" markup="number">
>     <f:validateLength  maximum="4"/>
>     <f:facet name="change">
>        <tc:command action="#{search.status}">
>            <tc:attribute name="renderedPartially" value="*:page:search:0:outPanel
> *"/>
>        </tc:command>
>     </f:facet>
>    </tc:in>
> </tc:column>
> <tc:column label="Status" >
>   <tc:panel id="outPanel">
>     <tc:out value="#{search.statusText}"  markup="sheetTxt"/>
>   </tc:panel></tc:column>
>
> Was able to send the ajax request and update the panel in the first (0th)
> row and show up the status.
>
> But as you can see, i specifid the row number statically..which should not
> be the case.
>
> Based upon the value change in the text filed i need to get that value in
> the controller and update that particular panel in the row.
>
> How can this be achieved....
>
> Thnx in Advance,
>
> Regards,
>
> Madan N
>



-- 
Regards,
Madan N