Giter Site home page Giter Site logo

Comments (16)

wombling avatar wombling commented on May 30, 2024

amusingly enough (and as a temp work-around the following works:

               <html:div id="grid-header-container">
                <html:div id="grid-layout-option-container">
                    <SegmentedButton id="grid-layout-option-container-seg-button"
                        selectedButton="list">
                        <Button id="grid-header-container--list" text="List View" />
                        <Button id="btn-layout-option-network" text="Network View" />
                    </SegmentedButton>
                    <html:div class="clr"></html:div>
                </html:div>
             </html:div>

from openui5.

Michadelic avatar Michadelic commented on May 30, 2024

Hi Wombling,

i tried to reproduce your issue, but it worked fine for me. The id of the button was "list" with the code you specified above.

Could you please copy your code into a working JSBin example so that we can have a closer look?
There is an "OpenUI5" entry in the "add library" list on the top left or you can use this example with an XML view as a base:
http://jsbin.com/yuferedi/1/edit

It might have to do something with the internal behaviour of this control. It accepts "sap.m.Button" as an interface but internally renders

  • tags for the buttons for technical reasons. Both should have the same id however.

    Kind Regards,
    Michael

  • from openui5.

    wombling avatar wombling commented on May 30, 2024

    Hi Michadelic (Michael)

    I will try to create a JSBin - perhaps if I include the rest of my page and split app it will cause the issue.

    if not, I can provide to a limited group access to the application that is causing the issue. Let me get back to you.

    Cheers,

    Chris

    from openui5.

    blaesius avatar blaesius commented on May 30, 2024

    Hi,
    please reopen the ticket if the issue still exists.
    Kind regards,
    Janina

    from openui5.

    wombling avatar wombling commented on May 30, 2024

    Hi Janina.

    please see http://jsbin.com/yuferedi/2/ which replicates this issue.

    lots of JS errors occuring when buttons pressed.

    from openui5.

    wombling avatar wombling commented on May 30, 2024

    Sorry but I can't reopen my own issue @Michadelic @blaesius could you please now that I have (finally) provided an example of the problem?

    Thanks,

    Chris

    from openui5.

    blaesius avatar blaesius commented on May 30, 2024

    Hi Chris,
    I just had a look into your example and found the reason.
    The property selectedButton is set before the buttons are set. This leads to your problem.
    But you are right, this is a bug. The order should not influence the result.
    I will talk to the control owner and we will provide a fix for this.
    To avoid you problem you can change the order, first set the buttons and then the selectedButton. Or just leave the seletecedButton empty, by default the first button is selected.
    The internal ticket number is: 0120061532 0001429454 2014

    Thanks for reporting this. We will inform you when this issue is fixed.

    Kind regards,
    Janina

    from openui5.

    blaesius avatar blaesius commented on May 30, 2024

    Hi Chris,
    the issue is even more complicated then we thought. But we are working on it.
    There seems to be something mixed up with the ids internally.
    Kind regards,
    Janina

    from openui5.

    Michadelic avatar Michadelic commented on May 30, 2024

    Hi Chris,

    fixed! Thanks for reporting this issue and sending us the JSBin example, great!
    With the example it could be debugged and there were actually two problems:

    1. The "selectedButton" state was not handled properly in all cases. The
      renderer changed the property directly, i fixed this to happen in
      "onBeforeRendering" instead and the handling of invalid ids was also
      fixed.

    2. And this is the root cause for the issue: When mixing HTML-Tags with
      Control tags in XMLViews, technically a new view is created in the
      background for each HTML Tag. The Ids were composed differently for
      controls (inner id) and associations (outer id). That is why the
      selected button was never found.

    Both issues were fixed internally and will get into the next patch set
    of OpenUI5 which is 1.22.7 and will most likely be built in the next
    week.

    Michael Graf
    OpenUI5 Developer

    from openui5.

    se38 avatar se38 commented on May 30, 2024

    Where's the "like" button if you need one ;)

    from openui5.

    akudev avatar akudev commented on May 30, 2024

    next patch set of OpenUI5 which is 1.22.7 and will most likely be built in the next week

    In case someone is confused because the current one is 1.22.5: patch 1.22.6 of OpenUI5 is not released, it is an SAPUI5-only interim patch required for an urgent issue in a control in the sap.me library, which is not contained in OpenUI5.

    from openui5.

    wombling avatar wombling commented on May 30, 2024

    πŸ˜„ Thanks guys, and sorry it took me so long to provide a working example 😊

    from openui5.

    Michadelic avatar Michadelic commented on May 30, 2024

    No Worries, i'm closing the issue now!

    from openui5.

    wombling avatar wombling commented on May 30, 2024

    @Michadelic I'm sure that this is your usual practice to close issue once code has been fixed, but given that code has yet to be released to community - I'd suggest it perhaps shouldn't be closed, perhaps given flag "pending release" and then closed when solution available for general use?

    from openui5.

    blaesius avatar blaesius commented on May 30, 2024

    You are right.
    On GitHub we normally leave the issue open until the fix is relased.

    from openui5.

    akudev avatar akudev commented on May 30, 2024

    Currently it is practice to close the issue when all work from our side is done, so it is gone from our radar. Sure, this causes a mismatch between bugs fixed in the tracker and bugs fixed in the code, but soon there should be code available here which corresponds to our nightlies or so, so this mismatch will be solved.
    We also write explicitly which version will contain the fix when closing an issue. This should make it easy enough to understand which version is fixed and which one is not.
    That's at least current practice, in order to avoid additional process steps going back to issue tickets later again. I guess this practice can be adjusted, but then it should be agreed and done by all.

    Andreas

    from openui5.

    Related Issues (20)

    Recommend Projects

    • React photo React

      A declarative, efficient, and flexible JavaScript library for building user interfaces.

    • Vue.js photo Vue.js

      πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

    • Typescript photo Typescript

      TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

    • TensorFlow photo TensorFlow

      An Open Source Machine Learning Framework for Everyone

    • Django photo Django

      The Web framework for perfectionists with deadlines.

    • D3 photo D3

      Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

    Recommend Topics

    • javascript

      JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

    • web

      Some thing interesting about web. New door for the world.

    • server

      A server is a program made to process requests and deliver data to clients.

    • Machine learning

      Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

    • Game

      Some thing interesting about game, make everyone happy.

    Recommend Org

    • Facebook photo Facebook

      We are working to build community through open source technology. NB: members must have two-factor auth.

    • Microsoft photo Microsoft

      Open source projects and samples from Microsoft.

    • Google photo Google

      Google ❀️ Open Source for everyone.

    • D3 photo D3

      Data-Driven Documents codes.