Broadleaf: How to use the existing beans in broadleaf - broadleaf-commerce

Hi I Want to use the beans that are already available present in broadleaf jars
i want to use the broadleaf bean FieldImpl in my program
FieldImpl f;
in my custom program can any one tell me how to use those beans inside my custom program
Please Help me to solve the problem
Thanks In Advance

Related

Adding facelet taglib to Adf application

In my Adf application I need to use a javascript component called ckeditor (http://ckeditor.com/). Ideally I would like to use it on a facelet page (not a jsp page). It seems like this can be achieved by using ck-jsf-editor (https://code.google.com/p/ck-jsf-editor/). The problem is that I can't figure out how to add this library/taglib to my Adf application.
Anyone knows the best way to do this?
In JDeveloper, you need to add the JAR that contains the JSF component to the project properties under the JSP tag libraries section.
If you are on JDeveloper 11.1.2 or 12c then your ADF application can already use facelets.

How Can OSGI and JSF work together?

I'm new in OSGI and I'm having many problems to try to create WABs. I'm using BndTools with Eclipse to help me with OSGi. My problem now is how can I integrate JSF with OSGi. I want to make one main web server, and add bundles with jsf pages runtime. How can I do this? What are the needs?
Thanks in Advance!
JSF is quite complex due to it's classloading mechanism. If you use Pax-Web you are able to use JSF, though it requires some special handling. For more details get in contact with the OPS4j community.
Another hint, since you seem to try to build your own "web-container", I don't recommend that, try to use an existing one, makes life easier :)

Concept of JSF, EJB and form based login with JDBC-Realm

I am trying to learn the concepts of Java EE (EJB,JSF...) and therefore I am working on an example application.
Unfortunately I have problems to understand how some concepts should work together and if I am doing it in an correct professional manner. At this point, I am really confused about all these different methods and hope someone can help me out.
The core functionality of my application consists of a document server where registered users can upload documents and describe it with useful information.
The Documents should simply be saved on the Server and all Information should be stored in a MySQL Database.
I created three Projects with Netbeans.
Enterprise Application Project (DocApp)
EJB Module (DocApp-ejb)
and a Web Application Project (DocApp-war).
The main things work fine like
accessing the database with JPA
uploading files with primefaces FileUploader
injecting JSF with EJB
and even the user authorization with JDBC-Realm as shown in this tutorial
http://jugojava.blogspot.de/2011/02/jdbc-security-realm-with-glassfish-and.html
My Problem now is, that all pages in a specific subdirectory should only be accessible by registered users.
The only way i see is to use one SessionScoped ManagedBean, instead of using multiple RequestScoped ManagedBeans .
This seems to be a bad practice but I have no Idea how to handle this otherwise.
The way i understand it, there should be one ManagedBeand for every JSF Page (xhtml).
Is there a good way to handle this or am i doing anything wrong?
The default mechanism to give access to a whole sub directory is adding a security constraint in web.xml for the URL pattern representing that directory.
Every registered user should get a role that represents being registered, eg "REGISTERED"
This role is then added to the security constraint in web.xml.
The interaction between JSF and the Servlet container managed security is a little awkward, but it does work.

Using reCaptcha

I want to use reCaptcha on my project with JSF. Corresponding primefaces component doesn't want to work properly inside wizard component. I decided to try to use the code from example for JSP http://code.google.com/intl/en-en/apis/recaptcha/docs/java.html I can not understand how best to remake it to JSF. The problem is in java code injection into JSP and result validation via FacesValidator.
Can someone have any ideas?
Take a look at tomahawk t:captcha on MyFaces SVN. The code only use the standard JSF API (it was updated to use JSF 2.0 ResourceHandler API), so it can help you to build your own using recaptcha.

How to create custom component using JSF 1.2?

I am new in the JSF world, please tell me step by step answer of how to create JSF custom component i search on the net but i didn't get any proper answer or give me some link which shows how to create custom component.
Thanks
Vinod
Googling for "extend UIComponentELTag" or "extends UIComponentELTag" should yield enough hints.
This is one of my favourites: http://blogs.steeplesoft.com/2006/12/jsf-component-writing-check-list/
RichFaces includes CDK (component development kit) that can be used for components development.
Here is the link to the guide: RichFaces CDK Developer Guide

Resources