Git Product home page Git Product logo

jsf-updates-angular's People

Contributors

marcorinck avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

jsf-updates-angular's Issues

handle INSERT jsf changes too

current implementation only handles jsf UPDATES, not INSERTS.

(apparently inserts are seldom used, standard mojarra jsf doesn't seem to use them at all)

Not compatible to PrimeFaces

In a pure PrimeFaces view there's no JSF object. So the injector fails with this message:

Uncaught ReferenceError: jsf is not defined
jua-0.1.0.js.jsf?ln=AngularFaces:129 (anonymous function)

image

$compile isn't available on every DOM element

I observed an error message on this line:

var $compile = angular.element(document).injector().get('$compile')

Requesting the injector() specifically from the controller element does the trick for me:

var theInjector = angular.element(document.querySelector('[ng-controller]')).injector();
var $compile = theInjector.get('$compile');

Input fields: JSF updates of field values are overwritten by ng-model

Consider a JSF view containing an update="@Form". The form contains an input field that's incremented on the server side with each AJAX request. The input field also has an ng-model="myOldValue" directive.

The JSF response updates the value of the input field. Unfortunately, the old value is restored a short time later when the input field is compiled by AngularJS (because ng-model hasn't been updated).

String#contains() is not defined

For some reason, JUA complains about the missing contains() function. Maybe it's better to replace the two occurences with indexOf()>=0.

As far as I can see, jQuery is initialized before JUA:

image

Sometimes the injector isn't accessible after destroying child scopes

Under certain circumstances the $injector object can't be accessed after destroying the child scopes. However, it can be accessed before. So far I didn't notice any disadvantage of retrieving and storing it before destroying the scopes.

This issue is addressed by my pull request.

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.