TheCoder4eu / BootsFaces-OSP

BootsFaces - Open Source Project
Apache License 2.0
246 stars 102 forks source link

Closing a b:dropMenu and/or selecting an item in a b:dropMenu makes it disappear #116

Closed wfsaxton closed 8 years ago

wfsaxton commented 9 years ago

Very simple. I put the sample code (below) into a facelets page and tried using the dropMenu. If you close the menu or select something from the menu, the entire dropmenu disappears. (style attrbutes gets "display: none").

I'm using version .66. Not sure if this is fixed in later versions, but this is the latest version from the maven repository. I don't see this behavior in the component showcase though...so not sure what's going on.

<b:navBar brand="Brand" brandHref="#">
<b:navbarLinks>
    <b:navLink value="Home" href="#"></b:navLink>
    <b:navLink value="Link" href="#"></b:navLink>
    <b:navLink value="Link" href="#"></b:navLink>
    <b:dropMenu value="Dropdown">
        <b:navLink value="Action" href="#"></b:navLink>
        <b:navLink value="Another action" href="#"></b:navLink>
        <b:navLink value="Something else here" href="#"></b:navLink>
        <b:navLink></b:navLink>
        <b:navLink header="Nav header"></b:navLink>
        <b:navLink value="Separated link" href="#"></b:navLink>
        <b:navLink value="One more separated link" href="#"></b:navLink>
    </b:dropMenu>
</b:navbarLinks>
</b:navBar>
wfsaxton commented 9 years ago

It looks like this is an issue with ICEfaces 3.3. I removed that dependency and it works fine.

Any ideas how this could break this?

wfsaxton commented 9 years ago

It looks like it's, specifically, the icefaces-compat library which contains the ICEfaces ice tags.

<dependency>
    <groupId>org.icefaces</groupId>
    <artifactId>icefaces-compat</artifactId>
    <version>3.3.0</version>
</dependency>
stephanrauh commented 9 years ago

This particular incompatibility comes as a surprise. Just to be sure: the menu vanishes even if you don't trigger a request?

BTW, since yesterday the latest version is 0.7.0 :).

stephanrauh commented 9 years ago

Confirmed:

stephanrauh commented 9 years ago

The HTML code generated by the b:dropMenu looks a bit odd. There's at least one li tag that's opened but never closed.

wfsaxton commented 9 years ago

BTW, in case people want a workaround:

.dropdown {
    display: block !important;
}

Seems to do the trick. Not sure why the display has to be effected @ all by this component but...

wfsaxton commented 9 years ago

This particular incompatibility comes as a surprise. Just to be sure: the menu vanishes even if you don't trigger a request?

It only appears to happen when I trigger the "collapse" of the dropMenu or select one of the items in the menu.

stephanrauh commented 9 years ago

Yeah, I managed to reproduce the error in the meantime. I guess there are two problems:

The result really looks interesting - even if it's not quite what it should look like: image

stephanrauh commented 9 years ago

After fixing a couple of minor bugs of the generated HTML code, things look a lot better. I suspect the "automatic AJAX" engine reacts a bit nervous if it detects HTML code it can't parse. There's still work left to do: a few components still can't be rendered with ICEFaces.

image

stephanrauh commented 8 years ago

Frankly, ICEFaces support isn't a high priority to me. Let's admit we're incompatible and close this issue. BTW, compatibility has improved with BootsFaces 0.8.0.