Error indicator always visible in Vaadin 7.3 TabSheet

Hi guys,

I just update my vaadin app to vaadin 7.3 from 7.1.15.
We are having a problem that the tabsheet.tabs show the “errorindicator” even though no error has been occured. please see the attached screen shot.
we are using a runo based custom theme. it is working very well with version 7.1.15.

I would appreciate any help or tips.
16308.jpg

Those tabs don’t look like a the regular TabSheet component. Correct me if I’m wrong.

Could you add a screenshot of the DOM structure for a single tab, and perhaps add the corresponding CSS you use to style them.

Hi Jouni,

Thanks for reply. please see the attached file with DOM structure. In fact all other components are working fine. even clicking on tabs with error indicator working as well.

Please let me know if you need some other logs.
16315.jpg

and Tab sheet scss
16318.txt (10.9 KB)

So it is indeed the TabSheet component! My mistake :slight_smile:

And it definitely looks like something is actually causing an error on the server side. The DOM structure looks OK, and the error incidator icon is the default one from Runo. So try to pinpoint some exception or something else from your Java code for each of those tab contents.

yes its a Tabsheet component. our designer has some wild ideas :slight_smile: .
Regrading error in jave code. As a matter of fact it work without problem with 7.1.15. Moreover, In case of server side error you see the stacktrace when you go with your mouse over the component havign error indicator. But as you can see from the first picture, it shows only “null” “null”. basically not exception is thrown on the server side. I am using eclipse with Tomcat 7.

Now, to rule out the stying problem. i replace the original runo tabsheet style. and it looks the same. see the attached pic.
16319.jpg

There are prpbably some changes to the TabSheet component/widget between 7.1.15 and 7.3.0 that cause the changed behavior. If you can, I suggest you create a reduced test case out of this, and write a
new ticket
for this so it gets a looked at properly.

I’d recommend first putting a breakpoint in AbstractComponent.setComponentError() and checking if it is called for the TabSheet and what is the stack trace there. It is quite possible that some error in your code (perhaps caused by changed API that you didn’t notice) is triggering this.

Hi Henri,

Thanks for your tip. I put a break point in setComponentErro(). it never comes to this method.
Then i tried debugging the client side and found out that may be the cause of my error.

The method
update()
in VTabSheet.TabCaption class has the following code :

[code]
private boolean update(TabState tabState) {
if (tabState.description != null || tabState.componentError != null) {
setTooltipInfo(new TooltipInfo(tabState.description,
tabState.componentError, this));
} else {
setTooltipInfo(null);
}

    }

[/code]while debugging i found that
tabstate.description
and
tabstate.componentError
contain a String “null” and not null value. thats why it sets the tooltipInfo.

But till yet i am not able to find where it comes from :slight_smile:

I can see on the server side that tabstate.componentError is null (not String “null”). So I found out that JsonDecoder.decodeValue decode the null into String “null” and set it back to tabstate.

in

private JsArrayObject<StateChangeEvent> updateConnectorState {
 ...
 JsonDecoder.decodeValue(new Type(state.getClass()
                                    .getName(), null), stateJson, state,
                                    ApplicationConnection.this);
...
}

Please see the attached pics.

It seems a vaadin bug. I would really hope for a solution here.

16433.jpg
16434.jpg
16435.jpg

Hi,

If you have a way to reproduce it using a test UI, please create a ticket at http://dev.vaadin.com. I tried to reproduce it using a 7.3.0 test at http://test.vaadin.com/7.3.0/run/TabSheetTest?restartApplication, but I don’t see any problems there.

Also, check the debug window that you are not accidentally mixing versions (servlet/widget set/theme)

Unfortunately, I am not able to reproduce the error if I create a new Project.
I verified that my application using the right libraries and widgetset build from vaadin 7.3 .

However, fortunately I found a workaround to my problem.

The problem disapperas If Tab is
initialized
with

description ="" and an Empty Error message returning “” as componentError instead of null .

private ErrorMessage clearError = new ErrorMessage() {

        @Override
        public ErrorLevel getErrorLevel() {

            return ErrorLevel.INFORMATION;
        }

        @Override
        public String getFormattedHtmlMessage() {

            return "";
        }

    };

 Tab t =super.addTab(c);
            t.setDescription("");
             t.setComponentError(clearError);