OH3 Widgets -- more than one action command?

okay you mean when the vItem received command ON the popup opens, i must put the code for the ON command of the vItem in the Button where i call the popup and set the name of the actor.

Item_jsonsearch_name

but this dont works because the button has two commands see

action: command
actionCommand: =items.Item_actor1_name.state
actionItem: Item_jsonsearch_name
popupOpen: .somePopup

or missunderstand i you?

when i add it so

- component: f7-popup
config:
 animate: true
opened: '=(items.vItem.state == "ON") ? true : false'

and trigger over my rule the vItem the poup opens automatic, but this is not what i need.

if I understand you correctly you want the following:
Click on button opens popup after 3seconds so that the logic behind has time to update data?

if yes, then

  • trigger rule when pressing button vItem1 or button which is linked to an item which refreshes your json data, like this:
when
  item vItem1 received update
then
  code to update json data
  createTimer(now.plusSeconds(3), [ |
    vItem2.sendCommand("OFF")
//note that this is a different item (vItem2)
  ])
end
  • after 3 seconds vItem2 is triggered

change f7-popup accordingly:
opened: '=(items.vItem2.state == "ON") ? true : false'

it works. i dont know why?

its because the

opened: '=(items.vItem2.state == "ON") ? true : false'

says that the code in the popup only is loaded when vItem2 is changed to OFF?

@RGroll

is it possible to have a scrollbar?

or that he scrolls the popup when the entries are longer than the page?

now i see the last icon not because its to long:

correct. popup pops up when vItem2 is ON. If you tap on the popup, the invisible button inside the popup sets vItem to OFF, thus popup is closing

1 Like

they should appear automatically, if you swipe up content. but this requires to delete the button inside the popup code. remeber to set tabletFullscreen: false

1 Like

i have the tabletFullscreen:false in my popup, but i had no scrollbar and the last cover is still cut off like in my picture above.

here is my code perhaps you find a problem ?!
but be careful, that’s a lot of code

- component: f7-popup
                  config:
                    tabletFullscreen: false
                    animate: true
                    opened: '=(items.vItem2.state == "ON") ? true : false'
                    style:
                      background-color: rgba(37, 44, 40, 1)
                    class:
                      - somePopup
                  slots:
                    default:
                      - component: f7-navbar
                        slots:
                          default:
                            - component: f7-nav-right
                              slots:
                                default:
                                  - component: oh-link
                                    config:
                                      text: Schliessen
                                      popupClose: true  
                      - component: f7-block
                        config:
                          style:
                            class:
                             - no padding
                             - no margin
                        slots:
                          default:
                            - component: f7-row
                              config:
                                visible: =items.Item_actor1_movie1_title.state != "UNDEF"
                                style:
                                  width: auto
                                  position: relative
                                  left: 0px
                                class:
                                  - padding-top
                                  - padding-bottom
                                  - justify-content-left
                              slots:
                                default:
                                  - component: Label
                                    config:
                                      style:
                                        position: relative
                                        left: 10px
                                        top: -30px
                                        strong: true
                                        font-size: 24px
                                        width: auto
                                      class:
                                        - padding
                                      text: =items.Item_jsonsearch_name.state
                                      
                                  - component: f7-row
                                    config:
                                      visible: =items.Item_actor1_movie1_title.state != "UNDEF"
                                      style:
                                        width: 500px
                                        position: relative
                                        left: 0px
                                      class:
                                        - padding-top
                                        - padding-bottom
                                        - justify-content-left
                                    slots:
                                      default:
                                        - component: f7-block
                                          config:
                                           class:
                                             - no-padding
                                             - no-margin
                                          slots:
                                            default:
                                              - component: oh-image
                                                config:
                                                  visible: =items.Item_actor1_movie1_title.state != "UNDEF"
                                                  item: Item_actor1_movie1_poster
                                                  style:
                                                    margin: 0 0.4em
                                                    width: 70px
                                                    height: 110px
                                              - component: Label
                                                config:
                                                  visible: =items.Item_actor1_movie1_title.state != "UNDEF"
                                                  text: =items.Item_actor1_movie1_title.state
                                                  style:
                                                    strong: true
                                                    font-size: 16px
                                                    position: absolute
                                                    top: 0px
                                                    width: 385px
                                                    left: 90px
                                              - component: Label
                                                config:
                                                  visible: =items.Item_actor1_movie1_title.state != "UNDEF"
                                                  text: =items.Item_actor1_movie1_genre.state
                                                  style:
                                                    color: gray
                                                    font-size: 16px
                                                    position: absolute
                                                    top: 25px
                                                    width: 385px
                                                    left: 90px
                                              - component: Label
                                                config:
                                                  visible: =items.Item_actor1_movie1_title.state != "UNDEF"
                                                  text: =Math.round(items.Item_actor1_movie1_runtime.state / 60) + " min"
                                                  style:
                                                    color: gray
                                                    font-size: 16px
                                                    position: absolute
                                                    top: 50px
                                                    width: 385px
                                                    left: 90px
                                              - component: Label
                                                config:
                                                  visible: =items.Item_actor1_movie1_title.state != "UNDEF"
                                                  text: =items.Item_actor1_movie1_year.state
                                                  style:
                                                    color: gray
                                                    font-size: 16px
                                                    position: absolute
                                                    top: 90px
                                                    width: 385px
                                                    left: 90px
                                  
                                  - component: f7-row
                                    config:
                                      visible: =items.Item_actor1_movie2_title.state != "UNDEF"
                                      style:
                                        width: 500px
                                        position: relative
                                        left: 0px
                                      class:
                                        - padding-top
                                        - padding-bottom
                                        - justify-content-left
                                    slots:
                                      default:
                                        - component: f7-block
                                          config:
                                           class:
                                             - no-padding
                                             - no-margin
                                          slots:
                                            default:
                                              - component: oh-image
                                                config:
                                                  visible: =items.Item_actor1_movie2_title.state != "UNDEF"
                                                  item: Item_actor1_movie2_poster
                                                  style:
                                                    margin: 0 0.4em
                                                    width: 70px
                                                    height: 110px
                                              - component: Label
                                                config:
                                                  visible: =items.Item_actor1_movie2_title.state != "UNDEF"
                                                  text: =items.Item_actor1_movie2_title.state
                                                  style:
                                                    strong: true
                                                    font-size: 16px
                                                    position: absolute
                                                    top: 0px
                                                    width: 385px
                                                    left: 90px
                                              - component: Label
                                                config:
                                                  visible: =items.Item_actor1_movie2_title.state != "UNDEF"
                                                  text: =items.Item_actor1_movie2_genre.state
                                                  style:
                                                    color: gray
                                                    font-size: 16px
                                                    position: absolute
                                                    top: 25px
                                                    width: 385px
                                                    left: 90px
                                              - component: Label
                                                config:
                                                  visible: =items.Item_actor1_movie2_title.state != "UNDEF"
                                                  text: =Math.round(items.Item_actor1_movie3_runtime.state / 60) + " min"
                                                  style:
                                                    color: gray
                                                    font-size: 16px
                                                    position: absolute
                                                    top: 50px
                                                    width: 385px
                                                    left: 90px
                                              - component: Label
                                                config:
                                                  visible: =items.Item_actor1_movie2_title.state != "UNDEF"
                                                  text: =items.Item_actor1_movie2_year.state
                                                  style:
                                                    color: gray
                                                    font-size: 16px
                                                    position: absolute
                                                    top: 90px
                                                    width: 385px
                                                    left: 90px 
                                  - component: f7-row
                                    config:
                                      visible: =items.Item_actor1_movie3_title.state != "UNDEF"
                                      style:
                                        width: 500px
                                        position: relative
                                        left: 0px
                                      class:
                                        - padding-top
                                        - padding-bottom
                                        - justify-content-left
                                    slots:
                                      default:
                                        - component: f7-block
                                          config:
                                           class:
                                             - no-padding
                                             - no-margin
                                          slots:
                                            default:
                                              - component: oh-image
                                                config:
                                                  visible: =items.Item_actor1_movie3_title.state != "UNDEF"
                                                  item: Item_actor1_movie3_poster
                                                  style:
                                                    margin: 0 0.4em
                                                    width: 70px
                                                    height: 110px
                                              - component: Label
                                                config:
                                                  visible: =items.Item_actor1_movie3_title.state != "UNDEF"
                                                  text: =items.Item_actor1_movie3_title.state
                                                  style:
                                                    strong: true
                                                    font-size: 16px
                                                    position: absolute
                                                    top: 0px
                                                    width: 385px
                                                    left: 90px
                                              - component: Label
                                                config:
                                                  visible: =items.Item_actor1_movie3_title.state != "UNDEF"
                                                  text: =items.Item_actor1_movie3_genre.state
                                                  style:
                                                    color: gray
                                                    font-size: 16px
                                                    position: absolute
                                                    top: 25px
                                                    width: 385px
                                                    left: 90px
                                              - component: Label
                                                config:
                                                  visible: =items.Item_actor1_movie3_title.state != "UNDEF"
                                                  text: =Math.round(items.Item_actor1_movie3_runtime.state / 60) + " min"
                                                  style:
                                                    color: gray
                                                    font-size: 16px
                                                    position: absolute
                                                    top: 50px
                                                    width: 385px
                                                    left: 90px
                                              - component: Label
                                                config:
                                                  visible: =items.Item_actor1_movie3_title.state != "UNDEF"
                                                  text: =items.Item_actor1_movie3_year.state
                                                  style:
                                                    color: gray
                                                    font-size: 16px
                                                    position: absolute
                                                    top: 90px
                                                    width: 385px
                                                    left: 90px
                                                    
                                  - component: f7-row
                                    config:
                                      visible: =items.Item_actor1_movie4_title.state != "UNDEF"
                                      style:
                                        width: 500px
                                        position: relative
                                        left: 0px
                                      class:
                                        - padding-top
                                        - padding-bottom
                                        - justify-content-left
                                    slots:
                                      default:
                                        - component: f7-block
                                          config:
                                           class:
                                             - no-padding
                                             - no-margin
                                          slots:
                                            default:
                                              - component: oh-image
                                                config:
                                                  visible: =items.Item_actor1_movie4_title.state != "UNDEF"
                                                  item: Item_actor1_movie4_poster
                                                  style:
                                                    margin: 0 0.4em
                                                    width: 70px
                                                    height: 110px
                                              - component: Label
                                                config:
                                                  visible: =items.Item_actor1_movie4_title.state != "UNDEF"
                                                  text: =items.Item_actor1_movie4_title.state
                                                  style:
                                                    strong: true
                                                    font-size: 16px
                                                    position: absolute
                                                    top: 0px
                                                    width: 385px
                                                    left: 90px
                                              - component: Label
                                                config:
                                                  visible: =items.Item_actor1_movie4_title.state != "UNDEF"
                                                  text: =items.Item_actor1_movie4_genre.state
                                                  style:
                                                    color: gray
                                                    font-size: 16px
                                                    position: absolute
                                                    top: 25px
                                                    width: 385px
                                                    left: 90px
                                              - component: Label
                                                config:
                                                  visible: =items.Item_actor1_movie4_title.state != "UNDEF"
                                                  text: =Math.round(items.Item_actor1_movie4_runtime.state / 60) + " min"
                                                  style:
                                                    color: gray
                                                    font-size: 16px
                                                    position: absolute
                                                    top: 50px
                                                    width: 385px
                                                    left: 90px
                                              - component: Label
                                                config:
                                                  visible: =items.Item_actor1_movie4_title.state != "UNDEF"
                                                  text: =items.Item_actor1_movie4_year.state
                                                  style:
                                                    color: gray
                                                    font-size: 16px
                                                    position: absolute
                                                    top: 90px
                                                    width: 385px
                                                    left: 90px   

i tested it with a new widget with a popup with only labels inside, and make 6 labels with a height: 200px and the popup dont has a scrollbar. and dont scrolls

okay i found it.

i must declare after the popup a f7-page , then the scrollbar is visible.

- component: f7-popup
                  config:
                    tabletFullscreen: false
                    animate: true
                    opened: '=(items.vItem2.state == "ON") ? true : false'
                    style:
                      background-color: rgba(37, 44, 40, 1)
                    class:
                      - somePopup
                  slots:
                    default:
                      - component: f7-navbar
                        slots:
                          default:
                            - component: f7-nav-right
                              slots:
                                default:
                                  - component: oh-link
                                    config:
                                      text: Schliessen
                                      popupClose: true
                      - component: f7-page
                        config:
                          style:
                            background-color: rgba(37, 44, 40, 1)
                            class:
                              - no padding
                              - no margin

is it possible to count the number items in a group or ( individual items) if the status is not “UNDEF”?
and then make a postUpdate to a item?

okay here the solution

val sr1 = foundtvshows.members.filter[ i | i.state != UNDEF ].size

Here you can See what i made with the help from you All.

Thank you

1 Like

It would be nice if you can share this work with others in the UI category of this forum.

Its still under tweaking, but when its done, i Do this of course.

@Oliver2

Can i write you a pm?
I had still a question to the time delayed open of the popup.

And are you german?

yes, german. sure, write a pm