A big thank you to you Gerald. It worked for me. But, when I set the session
separately in each bean object(but not all obejct) , I cannot remove it from
the session. Why is that ? 
I used, session.removeAttribute(atrib);



Gerald Müllan wrote:
> 
> Hi,
> 
> use t:saveState in this case. With this component, scope of the bean
> will be longer than request but shorter than session.
> 
> Usage:
> 
> <t:saveState value="#{yourBean}"/>
> 
> cheers,
> 
> Gerald
> 
> On 11/28/06, JS <[EMAIL PROTECTED]> wrote:
>>
>> Hi,
>>
>> I am getting the selected row value now. I am using javascript and
>> valueChangelIstener to get the rowData.
>> But it will work only if I gave the bean in session scope. Here is my
>> code :
>> jsp :
>>
>> function dataTableSelectOneRadio(radio) {
>> var id = radio.name.substring(radio.name.lastIndexOf(':'));
>> var el = radio.form.elements;
>> for (var i = 0; i < el.length; i++) {
>> if (el[i].name.substring(el[i].name.lastIndexOf(':')) == id) {
>> el[i].checked = false;
>>   }
>> }
>> radio.checked = true;
>> }
>>
>>
>> <h:dataTable value="#{EXTBean.clientDataList}" var="QuotesSelected"
>> style="width:100%;" cellspacing="0" border="0"
>> columnClasses="column1,column2,column3
>> ,column4,column5,column6,column7,column8,column9,column10,column11"
>> headerClass="dataHeader" binding="#{EXTBean.myDataTable}">
>> <h:column>
>> <f:facet name="header">
>> <h:outputText id="select" value="Select"/>
>> </f:facet>
>> <h:selectOneRadio  valueChangeListener="#{EXTBean.select}"
>> onchange="dataTableSelectOneRadio(this);">
>> <f:selectItem itemValue="#{QuotesSelected.quoteNo}" itemLabel=""/>
>> </h:selectOneRadio>
>>
>>
>> bean:
>>
>> public void select(ValueChangeEvent event) {
>>         qtSel = (QuotesSelected) myDataTable.getRowData();
>>     }
>>
>>     public HtmlDataTable getMyDataTable() {
>>         return myDataTable;
>>     }
>>
>>     public void setMyDataTable(HtmlDataTable myDataTable) {
>>         this.myDataTable = myDataTable;
>>     }
>>
>>
>> If I put the bean in session scope I cannot remove the earlier session
>> when
>> I do the actions.
>> How can I manage a session scoped bean ? Or can I use request scope to do
>> this ?
>>
>> Thanks,
>> JS.
>>
>>
>>
>> Cagatay Civici wrote:
>> >
>> >>
>> >> datatable rows :
>> >> select column1 column2
>> >> o         row1      row1
>> >> o         row2      row2
>> >>
>> >> Generate     Delete
>> >
>> >
>> > Hi JS, have you tried selectOneRow in sandbox?
>> >
>> > http://example.irian.at/example-sandbox-20061127/selectOneRow.jsf
>> >
>> > Cagatay
>> >
>> > On 11/27/06, JS <[EMAIL PROTECTED]> wrote:
>> >>
>> >>
>> >> Hi Andrew,
>> >>
>> >> Thanks for the reply. I have downloaded the jar. But where can I find
>> the
>> >> jenia tag library documentation ?
>> >>
>> >> Thanks,
>> >> JS.
>> >>
>> >>
>> >> Andrew Robinson-5 wrote:
>> >> >
>> >> > I recommend using the controls from "http://www.jenia.org/";. They
>> have
>> >> > a radio and a checkbox that are made to work with data tables (and
>> >> > work nicely with the tomahawk data table).
>> >> >
>> >> > -Andrew
>> >> >
>> >> > On 11/26/06, JS <[EMAIL PROTECTED]> wrote:
>> >> >>
>> >> >> Thanks Gerald. Let me just clear, so in short you are saying, I can
>> >> use
>> >> >> radio
>> >> >> inside command link for just selection purpose even though its a
>> >> circular
>> >> >> way.
>> >> >>
>> >> >> Thanks,
>> >> >> JS.
>> >> >>
>> >> >> Gerald Müllan wrote:
>> >> >> >
>> >> >> > Hi,
>> >> >> >
>> >> >> > from usability point of view i would suggest to delete an item
>> >> >> > directly via clicking on a commandLink as the "o"; the
>> requirement
>> >> of
>> >> >> > selecting only one entry can be also met with this approach.
>> >> >> >
>> >> >> > You are achieving the same result as with the radio structure,
>> the
>> >> >> > radio way seems little bit circular to me.
>> >> >> >
>> >> >> > The only way which comes to my mind to simulate the
>> >> commandLink-radio
>> >> >> > is doing a submit on every onchange event. But
>> updateActionListener
>> >> >> > will not work in this case, it`s only for components with an
>> action
>> >> >> > attribute (ActionSource comps).
>> >> >> >
>> >> >> > cheers,
>> >> >> >
>> >> >> > Gerald
>> >> >> >
>> >> >> > On 11/26/06, JS <[EMAIL PROTECTED]> wrote:
>> >> >> >>
>> >> >> >> Thanks Gerald.
>> >> >> >> What I want exactly is,
>> >> >> >>
>> >> >> >> datatable rows :
>> >> >> >> select column1 column2
>> >> >> >> o         row1      row1
>> >> >> >> o         row2      row2
>> >> >> >>
>> >> >> >> Generate     Delete
>> >> >> >>
>> >> >> >> Above shown 'o' represents radio(or checkbox or commandlink)
>> >> Generate
>> >> >> and
>> >> >> >> Delete are command buttons. So when I select a row and press a
>> >> command
>> >> >> >> button I only need to get the value of the unique id. So when I
>> >> user
>> >> >> >> press
>> >> >> >> the link or radio or check box , he can select only one row ,
>> not
>> >> >> >> multiple
>> >> >> >> rows. When he press another row the earlier slected one needs to
>> be
>> >> >> >> deselected. I think as you said command link works for that. But
>> >> can
>> >> I
>> >> >> >> use
>> >> >> >> radio inside command link ?
>> >> >> >>
>> >> >> >> Thanks,
>> >> >> >> JS.
>> >> >> >>
>> >> >> >>
>> >> >> >>
>> >> >> >> Gerald Müllan wrote:
>> >> >> >> >
>> >> >> >> > Hi,
>> >> >> >> >
>> >> >> >> > well, in this case it would be best to use
>> >> t:updateActionListener.
>> >> >> You
>> >> >> >> > can specify a value and push it to somewhere in the model.
>> There
>> >> is
>> >> >> no
>> >> >> >> > special need of a radio button or checkbox, you only have to
>> give
>> >> it
>> >> >> a
>> >> >> >> > commandLink and embed the updateActionListener in it.
>> >> >> >> >
>> >> >> >> > Have a look:
>> >> >> >> >
>> >> >> >> > <h:commandLink value="delete entry"
>> >> action="#{bean.goDeleteItem}">
>> >> >> >> >          <t:updateActionListener property="#{entry.id}"
>> >> >> >> > value="#{bean.entryId}"/>
>> >> >> >> > </h:commandLink>
>> >> >> >> >
>> >> >> >> > Hope this helps,
>> >> >> >> >
>> >> >> >> > cheers,
>> >> >> >> >
>> >> >> >> > Gerald
>> >> >> >> >
>> >> >> >> > On 11/26/06, JS <[EMAIL PROTECTED]> wrote:
>> >> >> >> >>
>> >> >> >> >>
>> >> >> >> >>  Thank you. Sorry for my vague question. I know we can select
>> a
>> >> row
>> >> >> >> using
>> >> >> >> >> checkbox. But I don't want multiple row selection. I want to
>> >> select
>> >> >> >> only
>> >> >> >> >> one
>> >> >> >> >> row since I want to get a unique id from that. So can I use
>> >> >> >> selectBoolean
>> >> >> >> >> checkbox for that ? Thanks for the time for me.
>> >> >> >> >>
>> >> >> >> >> JS.
>> >> >> >> >>
>> >> >> >> >>
>> >> >> >> >> Cagatay Civici wrote:
>> >> >> >> >> >
>> >> >> >> >> > Builds are here;
>> >> >> >> >> > http://people.apache.org/builds/myfaces/nightly/
>> >> >> >> >> >
>> >> >> >> >> > There are several ways to select a row, selectOneRow is
>> just
>> >> one
>> >> >> of
>> >> >> >> >> them
>> >> >> >> >> > that uses a radio button.
>> >> >> >> >> >
>> >> >> >> >> > Regards,
>> >> >> >> >> >
>> >> >> >> >> > Cagatay
>> >> >> >> >> >
>> >> >> >> >> > On 11/26/06, JS <[EMAIL PROTECTED]> wrote:
>> >> >> >> >> >>
>> >> >> >> >> >>
>> >> >> >> >> >> Thanks for your reply Cagatay. Can you please tell me from
>> >> where
>> >> >> >> can I
>> >> >> >> >> >> download jar for sandbox ?
>> >> >> >> >> >> Is there anyway in jsf or myfaces for selecting a row ?
>> >> >> >> >> >>
>> >> >> >> >> >> Thanks,
>> >> >> >> >> >> JS.
>> >> >> >> >> >>
>> >> >> >> >> >>
>> >> >> >> >> >> Cagatay Civici wrote:
>> >> >> >> >> >> >
>> >> >> >> >> >> > Hi,
>> >> >> >> >> >> >
>> >> >> >> >> >> > There is a special datatable enhancement in sandbox for
>> >> that
>> >> >> >> called
>> >> >> >> >> >> > selectOneRow;
>> >> >> >> >> >> >
>> >> >> >> >> >> >
>> >> >> http://example.irian.at/example-sandbox-20061126/selectOneRow.jsf
>> >> >> >> >> >> >
>> >> >> >> >> >> > Cagatay
>> >> >> >> >> >> >
>> >> >> >> >> >> > On 11/26/06, JS <[EMAIL PROTECTED]> wrote:
>> >> >> >> >> >> >>
>> >> >> >> >> >> >>
>> >> >> >> >> >> >> Hi paul,
>> >> >> >> >> >> >>
>> >> >> >> >> >> >> Thanks for the reply. Could you please tell me how can
>> I
>> >> >> select
>> >> >> >> a
>> >> >> >> >> row
>> >> >> >> >> >> >> from
>> >> >> >> >> >> >> the datatable ? I need to take a unique id from the
>> >> datatable
>> >> >> >> and
>> >> >> >> >> with
>> >> >> >> >> >> >> that
>> >> >> >> >> >> >> id I need to do different actions. Please give me a
>> >> solution
>> >> >> .
>> >> >> >> Can
>> >> >> >> >> I
>> >> >> >> >> >> use
>> >> >> >> >> >> >> selectBooleanCheckBox for that purpose ? Can I get that
>> >> >> unique
>> >> >> >> >> value ?
>> >> >> >> >> >> >>
>> >> >> >> >> >> >> Thanks for the help,
>> >> >> >> >> >> >> JS.
>> >> >> >> >> >> >>
>> >> >> >> >> >> >>
>> >> >> >> >> >> >>
>> >> >> >> >> >> >> Paul Spencer-3 wrote:
>> >> >> >> >> >> >> >
>> >> >> >> >> >> >> > JS,
>> >> >> >> >> >> >> > I am not sure what you are asking for. A radio button
>> is
>> >> >> not a
>> >> >> >> >> link,
>> >> >> >> >> >> >> > this it can not be used to select a row.  See the
>> >> >> MasterDetail
>> >> >> >> >> >> >> > example[1] for an example of linking from an detail
>> row.
>> >> >> >> >> >> >> >
>> >> >> >> >> >> >> > Paul Spencer
>> >> >> >> >> >> >> >
>> >> >> >> >> >> >> >
>> >> >> >> >>
>> >> [1]http://example.irian.at/example-simple-20061125/masterDetail.jsf
>> >> >> >> >> >> >> >
>> >> >> >> >> >> >> >
>> >> >> >> >> >> >> > JS wrote:
>> >> >> >> >> >> >> >> Hi,
>> >> >> >> >> >> >> >>
>> >> >> >> >> >> >> >> Please anyone tell me how can I select a row from
>> >> >> t:datatable
>> >> >> >> >> using
>> >> >> >> >> >> >> >> t:selectoneradioButton ?
>> >> >> >> >> >> >> >>
>> >> >> >> >> >> >> >> Please help me.
>> >> >> >> >> >> >> >>
>> >> >> >> >> >> >> >> Thanks,
>> >> >> >> >> >> >> >> JS.
>> >> >> >> >> >> >> >
>> >> >> >> >> >> >> >
>> >> >> >> >> >> >> >
>> >> >> >> >> >> >>
>> >> >> >> >> >> >> --
>> >> >> >> >> >> >> View this message in context:
>> >> >> >> >> >> >>
>> http://www.nabble.com/select-a-row-tf2705195.html#a7546933
>> >> >> >> >> >> >> Sent from the MyFaces - Users mailing list archive at
>> >> >> >> Nabble.com.
>> >> >> >> >> >> >>
>> >> >> >> >> >> >>
>> >> >> >> >> >> >
>> >> >> >> >> >> >
>> >> >> >> >> >>
>> >> >> >> >> >> --
>> >> >> >> >> >> View this message in context:
>> >> >> >> >> >> http://www.nabble.com/select-a-row-tf2705195.html#a7547087
>> >> >> >> >> >> Sent from the MyFaces - Users mailing list archive at
>> >> >> Nabble.com.
>> >> >> >> >> >>
>> >> >> >> >> >>
>> >> >> >> >> >
>> >> >> >> >> >
>> >> >> >> >>
>> >> >> >> >> --
>> >> >> >> >> View this message in context:
>> >> >> >> >> http://www.nabble.com/select-a-row-tf2705195.html#a7547126
>> >> >> >> >> Sent from the MyFaces - Users mailing list archive at
>> >> Nabble.com.
>> >> >> >> >>
>> >> >> >> >>
>> >> >> >> >
>> >> >> >> >
>> >> >> >> > --
>> >> >> >> > http://www.irian.at
>> >> >> >> >
>> >> >> >> > Your JSF powerhouse -
>> >> >> >> > JSF Consulting, Development and
>> >> >> >> > Courses in English and German
>> >> >> >> >
>> >> >> >> > Professional Support for Apache MyFaces
>> >> >> >> >
>> >> >> >> >
>> >> >> >>
>> >> >> >> --
>> >> >> >> View this message in context:
>> >> >> >> http://www.nabble.com/select-a-row-tf2705195.html#a7548643
>> >> >> >> Sent from the MyFaces - Users mailing list archive at
>> Nabble.com.
>> >> >> >>
>> >> >> >>
>> >> >> >
>> >> >> >
>> >> >> > --
>> >> >> > http://www.irian.at
>> >> >> >
>> >> >> > Your JSF powerhouse -
>> >> >> > JSF Consulting, Development and
>> >> >> > Courses in English and German
>> >> >> >
>> >> >> > Professional Support for Apache MyFaces
>> >> >> >
>> >> >> >
>> >> >>
>> >> >> --
>> >> >> View this message in context:
>> >> >> http://www.nabble.com/select-a-row-tf2705195.html#a7550444
>> >> >> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>> >> >>
>> >> >>
>> >> >
>> >> >
>> >>
>> >> --
>> >> View this message in context:
>> >> http://www.nabble.com/select-a-row-tf2705195.html#a7556438
>> >> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>> >>
>> >>
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/select-a-row-tf2705195.html#a7577462
>> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>>
>>
> 
> 
> -- 
> http://www.irian.at
> 
> Your JSF powerhouse -
> JSF Consulting, Development and
> Courses in English and German
> 
> Professional Support for Apache MyFaces
> 
> 

-- 
View this message in context: 
http://www.nabble.com/select-a-row-tf2705195.html#a7579540
Sent from the MyFaces - Users mailing list archive at Nabble.com.

Reply via email to