Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

no refresh for b:tab against p:tab with p:gmap #205

Closed
Kristover opened this issue Nov 27, 2015 · 6 comments
Closed

no refresh for b:tab against p:tab with p:gmap #205

Kristover opened this issue Nov 27, 2015 · 6 comments
Labels
bug Solved This ticket has been solved. If it's still open, we're waiting for the user's confirmation.
Milestone

Comments

@Kristover
Copy link

Hi,
i encounter a problem with a distinctive comportment between p:tab and b:tab when it is the second tab (not active one) and where you put a gmap.
Let's try the following code : If you click on 2nd p:tab, gmap is displaying. If you click on 2nd b:tab, the gmap is not displaying ?

      <h:form>
         <b:row><b:column offset="2" col-lg="8">
            <b:tabView>
                <b:tab title="Test"></b:tab>
               <b:tab title="Test with b">
               <b:panel style="height: 400px">
                   <p:gmap center="49.005268,2.113863" type="ROADMAP" zoom="14" style="width:300px;height:300px"/>
               </b:panel>
               </b:tab>
            </b:tabView>
        </b:column></b:row>

        <b:row><b:column offset="2" col-lg="8">
           <p:tabView activeIndex="0" style="height:500px; width:100%;">
               <p:tab title="Test" ></p:tab>
               <p:tab title="Test with p" >
                    <p:gmap center="49.005268,2.113863" type="ROADMAP" zoom="14" style="width:300px;height:300px"/>
               </p:tab>
            </p:tabView>
        </b:column></b:row>
  </h:form>

of course need to add following to work...

<script src="http://maps.google.com/maps/api/js?sensor=true" type="text/javascript"></script>

Thanks in advance for any advice.
Regards

@stephanrauh
Copy link
Collaborator

I managed to reproduce the bug.

@stephanrauh stephanrauh added this to the v0.9.0 milestone Nov 27, 2015
@stephanrauh stephanrauh self-assigned this Nov 27, 2015
@stephanrauh
Copy link
Collaborator

Currrently we're busy releasing version 0.8.0, so I didn't find the time to investigate this issue further.

@Kristover
Copy link
Author

Kristover commented Jun 16, 2016

Hi again,
a little poke.
Have you anytime to investigate for this bug plz ? because this functionality (near user localization with gmap) is an interresting expected feature.

Thanks in advance.

@TheCoder4eu TheCoder4eu modified the milestones: v0.9.1, v0.9.0 Jun 16, 2016
@stephanrauh
Copy link
Collaborator

@Kristover Thanks for the reminder. It's important for us to know which features are really needed and which are just "nice to have". As another guy recently said, it's the squeaky wheel that gets the grease.

As far as I remember, this is a really nasty bug, but I'll have a look at it again. If you don't hear from me within the next couple of weeks, don't hesitate to poke me again :).

@stephanrauh stephanrauh modified the milestones: v1.0.0, v0.9.1 Jul 10, 2016
@Kristover Kristover modified the milestones: v1.1.0, v1.0.0 Nov 7, 2016
@TheCoder4eu TheCoder4eu modified the milestones: v1.5.0, v1.1.0 Apr 10, 2017
@stephanrauh stephanrauh removed their assignment Sep 24, 2017
geopossachs added a commit to geopossachs/BootsFaces-OSP that referenced this issue May 15, 2019
@geopossachs
Copy link
Collaborator

geopossachs commented May 15, 2019

I have found a same old bug in primeface too
Rapster/primefaces@357fdd9

But why is this commit where a solution?

I inspect the code and find gmap is a kind of DeferredWidget.
In the Background it call _render() for the gmap child if the p:panel is changed

In the definition of PrimeFaces.widget.DeferredWidget i found we need an outer div container with a class ui-hidden-container
https://github.com/primefaces/primefaces/blob/a431161884c09155f860dd3c62f1d929982a639d/src/main/resources/META-INF/resources/primefaces/core/core.widget.js - line 243

The definition of the global helper PrimeFaces.invokeDeferredRenders is in
https://github.com/primefaces/primefaces/blob/c6a754768d525719d2116beb0ec1484fdb08e875/src/main/resources/META-INF/resources/primefaces/core/core.js - line 552

So i add in my commit to the out div container the primeface class ui-hidden-container and a call by event for PrimeFaces.invokeDeferredRenders(outer-div-container-id)

@stephanrauh
Copy link
Collaborator

Solved by #1076. Thank you very much, @geopossachs.

I'll upload BootsFaces 1.4.2-SNAPSHOT in a minute. If you're still listening after such a long time - your PR has been pending for three months - please run a test with BF 1.4.2-SNAPSHOT and confirm the bug has been solved.

Thanks in advance, and greetings to Saxonia!
Stephan

@TheCoder4eu TheCoder4eu modified the milestones: v1.5.0, v1.4.2 Aug 28, 2019
@TheCoder4eu TheCoder4eu added the Solved This ticket has been solved. If it's still open, we're waiting for the user's confirmation. label Aug 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Solved This ticket has been solved. If it's still open, we're waiting for the user's confirmation.
Projects
None yet
Development

No branches or pull requests

4 participants