What is Component-Driven Development?

What is it? I think the definition in your answer covers this question well. Although, I question why the definition includes that a component needs to explicitly define its dependencies. A canonical example of a component is an ActiveX control – do they need to explicitly define their dependencies? What problems does it solve? Management … Read more

How to pass data between two components in Angular 2

You can transfer data using service. Make a service that holds the data while you switch components. Below is an example. import { Injectable } from ‘@angular/core’; @Injectable() export class TransfereService { constructor( private router:Router, private companyServiceService:CompanyServiceService ) { } private data; setData(data){ this.data = data; } getData(){ let temp = this.data; this.clearData(); return temp; … Read more

Binding attribute causes duplicate component ID found in the view

Duplicate component ID errors may occur when: Same ID is used on different components inside the same NamingContainer. Physically different components are bound to the same property of the same bean. The <f:subview> is been declared in the include page instead of the parent page. The same include page is included multiple times inside the … Read more

How does the ‘binding’ attribute work in JSF? When and how should it be used?

How does it work? When a JSF view (Facelets/JSP file) get built/restored, a JSF component tree will be produced. At that moment, the view build time, all binding attributes are evaluated (along with id attribtues and taghandlers like JSTL). When the JSF component needs to be created before being added to the component tree, JSF … Read more

Conditionally displaying JSF components

Yes, use the rendered attribute. <h:form rendered=”#{some boolean condition}”> You usually tie it to the model rather than letting the model grab the component and manipulate it. E.g. <h:form rendered=”#{bean.booleanValue}” /> <h:form rendered=”#{bean.intValue gt 10}” /> <h:form rendered=”#{bean.objectValue eq null}” /> <h:form rendered=”#{bean.stringValue ne ‘someValue’}” /> <h:form rendered=”#{not empty bean.collectionValue}” /> <h:form rendered=”#{not bean.booleanValue and … Read more