Giter Site home page Giter Site logo

Comments (4)

BalusC avatar BalusC commented on May 30, 2024

Thank you for the proposal. However, I'm not exactly sure what its benefits are over "standard" tagfiles and JSTL (c:if, c:set, c:choose, etc).

from omnifaces.

skybber avatar skybber commented on May 30, 2024

there are 2 basic benefits:

  1. There is no support to define custom FACELET component in the same way like the standard composite components is done. Composite components has an interface section and an implementation section, this is very nice an it is missing in custom FACELETS components. Next the standard composite component creates a new component in the JSF tree. So std composite components cant be used to create non-component tag as p:ajax. Another example is p:column component used in composite component cant be in p:table since p:table expects p:column as a child. Tagext components doesn;t creates any parent component like std composite components. There are many restriction of standard composite component that can be solved by this library.
  2. Next benefit shows following example. Lets have custom FACELET component my:table with a parameter "value" - my:dataTable value="#{bean.list} Parameter "value" is passed by varMapper. Content of the my:table is injected in the FACELET component by ui:insert In this case the value parameter stays in the mapper, so all injected components has the implicit "value" ! Tagext solves id by parameter mapping. In this case "value" will be mapped to _value in implementation section and original "value" parameter is hidden so there will be no problems with ui:insert.

We use primefaces in our project. Just now we don't use the primefaces components directly. All components are wrapped by tagext components (we have our:datatable instead p:dataTable etc..) . So we can easily define default parameters, default behaviour etc. It allows changing JSF<->primefaces <-> richfaces on the fly. In this way we migrated our project (500 JSF pages, 100.000 LOC) from Richfaces 4.2 to Primefaces4 in 1.5 month in 2 mans.

from omnifaces.

skybber avatar skybber commented on May 30, 2024

Hi, I've closed this issue since the implementation is Mojarra specific and many issues connected with the facelet tags is solved in Myfaces. But in general ... it would be nice if the facelet tags have interface/implementation sections like composite components have.

from omnifaces.

arjantijms avatar arjantijms commented on May 30, 2024

But in general ... it would be nice if the facelet tags have interface/implementation sections like composite components have.

For sure! There's an issue for that at the JSF spec tracker, see https://java.net/jira/browse/JAVASERVERFACES_SPEC_PUBLIC-1196

(if you agree with the issue, please vote for it ;))

from omnifaces.

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.