Skip to main content



      Home
Home » Eclipse Projects » Remote Application Platform (RAP) » RAP Table: Row sometimes empty
RAP Table: Row sometimes empty [message #1009185] Thu, 14 February 2013 11:08 Go to next message
Eclipse UserFriend
Hi again!

I have a problem with the (more or less) default Table implementation. We have a rather complex application with a lot of tables and stuff. Now when navigating through the application, i sometimes get empty table rows, where there should be data. I can verify on the server side that the items are created and filled with the according data, but on the client, they are empty...

I have multiple cases identified until now: The first one is when i:

1) Fill the table with data
2) select a row
3) right click (menu opens) - choose an action > causes another dialog to open (table is not manipulated at all)
4) return to the first dialog - the selected row has no more texts.

looks like this:
index.php/fa/13422/0/

The second case is in some of our dialogs (actually have found one only until now Wink) if i open it and fill everything with data, the table in question has only one row, and this rows texts are all empty.

This one looks like this:
index.php/fa/13421/0/

I tried to follow the request payloads for both cases. In the first one it seems the table is left alone completely except from setting visibility and tabIndex - still data is gone.

In the second case, i'm pretty sure this is the request that causes the empty item:

[ "create", "w1977", "rwt.widgets.GridItem", {
"parent": "w448",
"index": 0
} ]


I'm a little bit stuck on where to continue with my investigations...?

[Updated on: Thu, 14 February 2013 11:08] by Moderator

Re: RAP Table: Row sometimes empty [message #1009198 is a reply to message #1009185] Thu, 14 February 2013 11:31 Go to previous messageGo to next message
Eclipse UserFriend
Hi Markus,
could you provide a snippet to reproduce the issue? Which RAP version
are you using? Did you try with RAP 2.0? Is this happen in all browsers?
Best,
Ivan

On 2/14/2013 6:08 PM, Markus Duft wrote:
> Hi again!
>
> I have a problem with the (more or less) default Table implementation. We have a rather complex application with a lot of tables and stuff. Now when navigating through the application, i sometimes get empty table rows, where there should be data. I can verify on the server side that the items are created and filled with the according data, but on the client, they are empty...
>
> I have multiple cases identified until now: The first one is when i:
>
> 1) Fill the table with data
> 2) select a row
> 3) right click (menu opens) - choose an action > causes another dialog to open (table is not manipulated at all)
> 4) return to the first dialog - the selected row has no more texts.
>
> looks like this:
>
>
> The second case is in some of our dialogs (actually have found one only until now ;)) if i open it and fill everything with data, the table in question has only one row, and this rows texts are all empty.
>
> This one looks like this:
>
>
> I tried to follow the request payloads for both cases. In the first one it seems the table is left alone completely except from setting visibility and tabIndex - still data is gone.
>
> In the second case, i'm pretty sure this is the request that causes the empty item:
>
>
> [ "create", "w1977", "rwt.widgets.GridItem", {
> "parent": "w448",
> "index": 0
> } ]
>
>
> I'm a little bit stuck on where to continue with my investigations...?

--
Ivan Furnadjiev

Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Re: RAP Table: Row sometimes empty [message #1009451 is a reply to message #1009198] Fri, 15 February 2013 01:58 Go to previous messageGo to next message
Eclipse UserFriend
I was not able to produce one yet... i have to investigate more, but i don't know where...

EDIT: ah, and i'm already using 2.0.0 release. and it happens at least with chrome, firefox, IE and safari.

[Updated on: Fri, 15 February 2013 02:02] by Moderator

Re: RAP Table: Row sometimes empty [message #1009538 is a reply to message #1009451] Fri, 15 February 2013 04:42 Go to previous messageGo to next message
Eclipse UserFriend
i tried rather hard now to come up with a small example, but really, i have no idea what causes this. it must be something in conjunction with our big application. i don't know...
Re: RAP Table: Row sometimes empty [message #1009583 is a reply to message #1009538] Fri, 15 February 2013 05:50 Go to previous messageGo to next message
Eclipse UserFriend
Markus,
you didn't say which RAP version are you using. Is it reproducible in
all browsers - Firefox, IE7/8/9, Chrome? Is this happens with plain
Table or you are using JFace TableViewer? Is the Table virtual or not?
Best,
Ivan

On 2/15/2013 11:42 AM, Markus Duft wrote:
> i tried rather hard now to come up with a small example, but really, i
> have no idea what causes this. it must be something in conjunction
> with our big application. i don't know...

--
Ivan Furnadjiev

Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Re: RAP Table: Row sometimes empty [message #1009607 is a reply to message #1009583] Fri, 15 February 2013 06:26 Go to previous messageGo to next message
Eclipse UserFriend
Are you using a version prior to 1.5M7. I had a such a rendering issue which got fixed in 1.5M7. https://bugs.eclipse.org/bugs/show_bug.cgi?id=377746
Re: RAP Table: Row sometimes empty [message #1009621 is a reply to message #1009538] Fri, 15 February 2013 06:53 Go to previous messageGo to next message
Eclipse UserFriend
i can at least confirm that the TableItemLCA.renderChanges receives an empty TableItem as widget... i added a breakpoint that sysouts the table item plus all it's columns texts when rendering the table, and sysouts when creating the actual item.

CREATE: 23932502 - TableItem {0}:0;1;10,00;1,00;0,00;1,00;0,00;1,00;true;0;;02.07.2012 10:46:39;;Normal;true;;1 kg;1,00;10;0;0;1;PKG;
LCA:23932502 - TableItem {}:;;;;;;;;;;;;;;;;;;;;;;


i also made sure that there is no clear or whatever involved, so nobody should destroy it in the meantime. also the first number in the output above is .hashCode() of the item, so i'm sure it's the same instance...

[Updated on: Fri, 15 February 2013 06:54] by Moderator

Re: RAP Table: Row sometimes empty [message #1009630 is a reply to message #1009621] Fri, 15 February 2013 07:11 Go to previous messageGo to next message
Eclipse UserFriend
ah, i have it. there /was/ some code calling table.clearAll(). this called clear() on the item, thus the behaviour. it was obviously thought for a virtual table to force re-reading of the data... pff. is table.redraw() a viable alternative on RAP? javadoc says no... what can i do to force redrawing?
Re: RAP Table: Row sometimes empty [message #1011296 is a reply to message #1009630] Tue, 19 February 2013 04:01 Go to previous messageGo to next message
Eclipse UserFriend
Hi Markus,
yes... calling table.redraw() will trigger the re-reading of the cleared
data. If you are using JFace viewers, viewer.refresh() is the way to go.
HTH,
Ivan

On 2/15/2013 2:11 PM, Markus Duft wrote:
> ah, i have it. there /was/ some code calling table.clearAll(). this
> called clear() on the item, thus the behaviour. it was obviously
> thought for a virtual table to force re-reading of the data... pff. is
> table.redraw() a viable alternative on RAP? javadoc says no... what
> can i do to force redrawing?

--
Ivan Furnadjiev

Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Re: RAP Table: Row sometimes empty [message #1872578 is a reply to message #1011296] Sat, 09 November 2024 01:47 Go to previous message
Eclipse UserFriend
Hi,

There is a solution that empty rows are displaying in middle and while adding the new row or deleting the new row.

Need to look at Databinding side as shown below items.

Override ObservableList class and implement the customizable ObservableList
there we need to forcethefireList change manually.

@SuppressWarnings("unchecked")
public boolean add(Object element) {

List oldList = new ArrayList(wrappedList);
wrappedList = new ArrayList(wrappedList);
// Bug 7786
boolean added = true;
if (!wrappedList.contains(element))
added = wrappedList.add(element);
if (added)
updateInnerObservableValueForAdd(oldList);
return added;
}

@SuppressWarnings("unchecked")
public boolean remove(Object element) {
List<?> oldList = new ArrayList<Object>(wrappedList);
wrappedList = new ArrayList<Object>(wrappedList);
boolean removed = wrappedList.remove(element);
if (removed)
updateInnerObservableValueForRemove(oldList);
return removed;
}

private void updateInnerObservableValueForAdd(List<?> oldList) {
if (innerObservableList != null) {
innerObservableList.removeListChangeListener(innerListener);
innerObservableList.dispose();
}
//if (valMgr != null)
// valMgr.disableAll();
innerObservableList = new ValidationWritableList(outerObservableValue.getRealm(), wrappedList, type, valMgr);
wrappedList = innerObservableList;
Object innerValueType = innerObservableList.getElementType();
Assert.isTrue(getElementType().equals(innerValueType), "Cannot change value type in a nested updatable value");
innerObservableList.addListChangeListener(innerListener);
// fireListChange(createListDiff(oldList, wrappedList));//always force the list change
if (wrappedList != null && !wrappedList.isEmpty()) {
fireListChange(createListDiff(new ArrayList(), wrappedList));
}
else {
fireListChange(createListDiff(oldList, wrappedList));
}
}


private void updateInnerObservableValueForRemove(List<?> oldList) {
if (innerObservableList != null) {
innerObservableList.removeListChangeListener(innerListener);
innerObservableList.dispose();
}
//if (valMgr != null)
// valMgr.disableAll();
innerObservableList = new ValidationWritableList(outerObservableValue.getRealm(), wrappedList, type, valMgr);
wrappedList = innerObservableList;
Object innerValueType = innerObservableList.getElementType();
Assert.isTrue(getElementType().equals(innerValueType), "Cannot change value type in a nested updatable value");
innerObservableList.addListChangeListener(innerListener);
fireListChange(createListDiff(oldList, wrappedList));
}
Previous Topic:Part view in a subproject with fragment.e4xmi: method with annotation @PostConstruct is not called
Next Topic:[ANN] RAP 4.0 meets Jakarta EE 10
Goto Forum:
  


Current Time: Tue May 13 04:03:24 EDT 2025

Powered by FUDForum. Page generated in 0.07982 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top