joinfaces-maven-jar-example | JoinFaces Maven Jar Example | Build Tool library
kandi X-RAY | joinfaces-maven-jar-example Summary
kandi X-RAY | joinfaces-maven-jar-example Summary
JoinFaces Maven Jar Example
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Encodes the form field
- Encode the output field
- Encodes the submit button
- Generate the INPUT field
- Initialize default properties
- Parses the model and returns model
- Find the versions
- Parses versions
- Returns the names of the component artifact ids
- Checks if contains by name
- Generate the Maven POM
- Merge template into string
- Starts the downloader
- Downloads a file from a URL
- Generate configuration
- Calculate the list of Addon artifact ids
- Is MOJAR
- Gets the JoinStarter with the given name
- The main entry point
- Configure the security filter
- Upload file
- Get the joinfaces header
- Get the join faces header
- Create user details manager
- This method decodes the request message
- Is the tomcat currently selected
joinfaces-maven-jar-example Key Features
joinfaces-maven-jar-example Examples and Code Snippets
Community Discussions
Trending Discussions on joinfaces-maven-jar-example
QUESTION
We are currently migrating a rather big project from JavaEE (Wildfly) to Spring Boot 2.0.5 using JoinFaces 3.2.5 for JSF support. Unfortunately when starting the server we always get the following message:
Scope 'view' is not active for the current thread; consider defining a scoped proxy for this bean if you intend to refer to it from a singleton; nested exception is java.lang.IllegalStateException: No FacesContext found.
The problematic UI bean is a Spring Component additionally annotated with javax.faces.view.ViewScoped (like class StarterMBean in the joinfaces-maven-jar-example).
Is there anything special we have to be careful about, e.g. forbidden dependencies, special configurations etc?
We are thankful for every hint!
...ANSWER
Answered 2018-Oct-13 at 22:07You have an singleton/application scoped bean which has a direct or indirect dependency on a view scoped bean. This forces the BeanFactory to construct the view scoped bean when the application starts, but view scoped beans can only be used in threads which are currently processing a JSF request.
There are multiple ways to solve this problem:
- Try to model your beans to only have dependencies to beans with the same or a higher scope. (So application scoped beans can only use application scoped beans, view scoped beans can use view, session or application scoped ones and so on)
- When you are 100% sure your application scoped bean will only use the view scoped one during the processing of a JSF request you can automatically or manually wrap the bean in a scoped proxy.
- To get a scoped proxy automcatically, change
@ViewScoped
to@Scope(scopeName = "view", proxyMode = ScopedProxyMode.TARGET_CLASS)
- If you have no access to the view scoped bean, you can declare the injection point as
ObjectProvider<>
in order to get a scoped proxy.
- To get a scoped proxy automcatically, change
More information about this problem can be found here: https://docs.spring.io/spring-framework/docs/current/spring-framework-reference/core.html#beans-factory-scopes-other-injection
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install joinfaces-maven-jar-example
You can use joinfaces-maven-jar-example like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the joinfaces-maven-jar-example component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer maven.apache.org. For Gradle installation, please refer gradle.org .
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page