You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by chichi <ch...@yahoo.com> on 2008/02/24 17:15:08 UTC
Editing dynamic dataTable
Hello everyone,
I am having trouble editing a dynamic datatable. I've tried so many
solutions but nothing worked for me. Every time I click the edit button, it
just stays on the page even though the navigations are correct. I also tried
the getRowData but that too didnt work.
Thanks for your help.
--
View this message in context: http://www.nabble.com/Editing-dynamic-dataTable-tp15665521p15665521.html
Sent from the MyFaces - Users mailing list archive at Nabble.com.
Re: Editing dynamic dataTable
Posted by Gerald Müllan <ge...@gmail.com>.
Hi,
a few lines of code would be helpful.
Apart from this. Maybe there are validation errors; Do you have a
messages tag on the page?
Try to put your bean in page-scope instead of the session one. You can
achieve this with the t:saveState component.
cheers,
Gerald
On Sun, Feb 24, 2008 at 5:15 PM, chichi <ch...@yahoo.com> wrote:
>
> Hello everyone,
>
> I am having trouble editing a dynamic datatable. I've tried so many
> solutions but nothing worked for me. Every time I click the edit button, it
> just stays on the page even though the navigations are correct. I also tried
> the getRowData but that too didnt work.
>
> Thanks for your help.
>
>
> --
> View this message in context: http://www.nabble.com/Editing-dynamic-dataTable-tp15665521p15665521.html
> 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
Re: Editing dynamic dataTable
Posted by Hemanth Abburi <ja...@gmail.com>.
Hi,
You should put the managed bean in session scope to get the values.
The following code can be used to retrieve the values:
UIComponent comp = FacesContext.getCurrentInstance
().getViewRoot().findComponent("myform");
//"myform" is form name
List l=comp.getChildren();
Iterator itr = l.iterator();
while(itr.hasNext()){
Object obj=itr.next();
if( obj instanceof UIData){
UIData uIData=(UIData)obj;
HtmlDataTable myTable = (HtmlDataTable)uIData;
System.out.println("ROWS in the datatable "+ uIData.getRows());
for(int i=0;i<myTable.getRowCount();i++){
myTable.setRowIndex(i);
System.out.println(myTable.getRowData());
}
This should solve your problem.
On 2/24/08, chichi <ch...@yahoo.com> wrote:
>
>
> Hello everyone,
>
> I am having trouble editing a dynamic datatable. I've tried so many
> solutions but nothing worked for me. Every time I click the edit button,
> it
> just stays on the page even though the navigations are correct. I also
> tried
> the getRowData but that too didnt work.
>
> Thanks for your help.
>
>
> --
> View this message in context:
> http://www.nabble.com/Editing-dynamic-dataTable-tp15665521p15665521.html
> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>
>