question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

AutoUpdate: event/observer pattern

See original GitHub issue

Based on this https://github.com/primefaces-extensions/primefaces-extensions.github.com/issues/358

I’d like to be able to write something like this:

<pa:menuButton icon="fa-shopping-cart"
               model="#{cartManager.cartModel}">
    <p:autoUpdate on="update-cart" listener="#{cartManager.createMenuModel}" />
</pa:menuButton>

<p:commandButton value="#{i18n['ADD_ITEM_CART']}"
                 action="#{cartManager.addItemToCart}" 
                 update="@obs('update-cart)"/>

on: attribute indicating the kind of event to observe listener: action to execute when update-cart is fired (before getting updated, being said I don’t know if we should have a pre & post listener?) @obs: retrieve client ids from components subscribing to the specified event

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:3
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
tandraschkocommented, Jan 12, 2020

maybe ´@event´ instead ´@sub´?

0reactions
tandraschkocommented, Nov 26, 2020

yup

Read more comments on GitHub >

github_iconTop Results From Across the Web

Ajax Framework Observer / Event - PrimeFaces Showcase
AutoUpdate allows you to use the observer pattern in which a component maintains a list of its dependents, called observers, and notifies them...
Read more >
Magento 2 Create Events - Observer in Magento 2 - Mageplaza
Step 1: Dispatch event ... The dispatch method will receive 2 arguments: an unique event name and an array data. In this example,...
Read more >
Download of WindowsCloudNextGen failed from server http ...
12/27/2016,4:30:54 PM,Information,Sophos AutoUpdate is already ... 2017-01-18T11:59:44.240Z [ 2448] INFO Registering event observer
Read more >
Integration Guide - IBM
Viewing related event details in the Events Pattern portlet. ... Message Bus to support the Agile Service Manager Event Observer. Related information.
Read more >
Diff - 6bb9b62b86..5f1d8e0c95 - chromium/src - Git at Google
+ {"https://www.example.com/second/", true}, + // Different domain not in offer's ... const std::string& data); - void PumpXEvents(); // x11::EventObserver: ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found