You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Svetozar Radojčin <Sv...@energosoft.rs> on 2009/05/20 12:02:52 UTC

tr:table : how to expand just one detailStamp ?

Hi all,

What I want, it to set the current row automatically when selecting the + image (for detailStamp) _and to close previously opened detail stamp when a new detailStamp opens. So, how to select an tr:table row with the detail stamp link ?
In that way, user does not need to select particular row first, in order to see all his detail records, contained in the detailStamp


Any idea ?


RE: table : how to expand just one detailStamp ?

Posted by Svetozar Radojčin <Sv...@energosoft.rs>.
Hi,    thanks for response

 

"detailStamp" is a facet for <tr:table>, for example

 

<tr:table var="row" value="#{myBean.allDepartments}">

  <f:facet name="detailStamp">

       ....

  </f:facet>

</tr:table>

 

In my case, detailStamp contains anoter tr:table, with all employees from the current department

So, when user expand one detailStamp, what I want, is :

1.   to close previously opened detail stamp

2.        Set the current Row, in order to enable detailStamp to show Employees for current Department

 

From: Anton Gavazuk [mailto:antongavazuk@gmail.com] 
Sent: Wednesday, May 20, 2009 12:37 PM
To: MyFaces Discussion
Subject: Re: table : how to expand just one detailStamp ?

 

Hi Svetozar,

please explain what is "detailStamp"

do you mean list-detail scenario, when list and detail form are shown on the same page?

2009/5/20 Svetozar Radojčin <Sv...@energosoft.rs>

Hi all,

What I want, it to set the current row automatically when selecting the + image (for detailStamp) _and to close previously opened detail stamp when a new detailStamp opens. So, how to select an tr:table row with the detail stamp link ?
In that way, user does not need to select particular row first, in order to see all his detail records, contained in the detailStamp


Any idea ?

 


Re: table : how to expand just one detailStamp ?

Posted by Anton Gavazuk <an...@gmail.com>.
Hi Svetozar,

please explain what is "detailStamp"

do you mean list-detail scenario, when list and detail form are shown on the
same page?

2009/5/20 Svetozar Radojčin <Sv...@energosoft.rs>

>  Hi all,
>
> What I want, it to set the current row automatically when selecting the *+
> * image (for detailStamp) *_and* to close previously opened detail stamp
> when a new detailStamp opens. So, how to select an tr:table row with the
> detail stamp link ?
> In that way, user does not need to select particular row first, in order to
> see all his detail records, contained in the detailStamp
>
>
> Any idea ?
>

Re: tr:table : how to expand just one detailStamp ?

Posted by Marco Grimm-2 <Ma...@rz-service-mannheim.de>.

Cwele wrote:
> 
> What I want, it to set the current row automatically when selecting the +
> image (for detailStamp) _and to close previously opened detail stamp when
> a new detailStamp opens. So, how to select an tr:table row with the detail
> stamp link ?
> In that way, user does not need to select particular row first, in order
> to see all his detail records, contained in the detailStamp
> 

I guess, you have got rowSelection="single", because you wrote that you
would like set the row selected, where + was choosen. Did you try adding
selectedRowKeys- and rowDisclosureListener-attributes to your table? The
RowKeySet of selectedRowKeys-attribute has to have the same CollectionModel
as the value-attribute of the table was set to. You must create your
CollectionModel extending org.apache.myfaces.trinidad.model.CollectionModel
with overwritten getRowKey()- and setRowKey(Object)-methods. Then you will
be able to handle the RowDisclosureEvent and call
"UIXTable.getDisclosedRowKeys().clear();
UIXTable.getSelectedRowKeys().clear();
UIXTable.getSelectedRowKeys().add(RowDisclosureEvent.getAddedSet().iterator().next());"
there.
-- 
View this message in context: http://www.nabble.com/tr%3Atable-%3A-how-to-expand-just-one-detailStamp---tp23632524p23675653.html
Sent from the MyFaces - Users mailing list archive at Nabble.com.