Mobile JSF how to start in Netbeans? - jsf

I would like to write a simple, hello world page in JSF as well as for mobiles and ordinary web pages. Found this: http://mobiforge.com/book/mobile-jsf but seems to be outdated. I cant even download the plugin which is mentioned there (download is unavailable, 404).
I searched Internet and it seems that theres no simple step by step tutorial for writing mobile JSF pages. Any ideas where and how can I start?

Maybe it can help you to use a mobile component framework like PrimeFaces Mobile or IceMobile.
There are some tutorials which describe how to build mobile websites with JSF and PrimeFaces Mobile:
Create Mobile Websites using Java Server Faces and PrimeFaces Mobile
Primefaces Mobile - Weather App Example
PrimeFaces tutorial
PrimeFaces Mobile User Guide
Here are some tutorials about IceMobile:
ICEmobile Tutorials & Samples
Just add mobility: JSF and JSP with ICEmobile
If you don't want to use a mobile JSF component framework you can search the web for the tutorials about combining mobile JavaScript frameworks like jQuery Mobile or Bootstrap with JSF.

Related

Migrating from Java Page Flow to JSF

I am currently working on a project that uses WebLogic Portal and Apache Beehive Page Flow Controller.
The team would like to remove WebLogic Portal and the Page Flow Controllers with JSF. Currently we have not found a way to manage the workflow with JSF as with PFC.
With Spring MVC it would be easy because we only remove Beehive annotations using Spring MVC Annotations but we would like to go directly with JSF so later we can start using icefaces.
Any suggestions of where I can find information about what we want to do?
Thank you very much in advance.

Is there a way to use Struts 2.0 and JSF togather in a web application?

I've been using Struts 1.x for more than 1 year now, and I've been learning about JSF recently. I know both JSF and Struts are different frameworks but I wanted to use Struts as Action framework and JSF as Component framework in my web application. I'm not sure if we can do that, and couldn't find any materials online regarding this.
Suggestions and links are welcome, Thanks in advance
Struts and JSF can be used in a web application, some(or no) changes might be required in the back end but as both the frameworks follow MVC, the "VIEW" tier would be much similar.
As JSF and Struts both have their own advantages, we can use the advantagesof of each combinedly, like ValidationFramework in Struts and JSF components (html components in Struts)
All this I would just only if you have an existing Struts application, can find more detailed information here
though the link talks about older versions, i hope it gives basic information

can i use a gwt library in a jsf project

I want to create a mobile app using PrimeFaces. In it, I also want to use Phonegap, but not directly, rather through its GWT abstraction- phonegap-gwt.
Some of the features provided by PhoneGap, in a phonegap application, require the web page accessing the phone's functionality to be a local page(on the device where phone's functionality is to be accessed)... this can be done using phonegap-gwt in a google web toolkit project also, i.e. dont put server side code in the page that utilises phonegap-gwt code(correct me if I am wrong here, so far?)... On the other hand, the program created by jsf(i.e. primefaces) is a mobile web application.
Hence, what I am confused about is, can I keep GWT code (for Phonegap access through GWT) and JSF code in the same project? I understand that the phonegap gwt code will get compiled into Javascript, but can such programming,i.e. keeping gwt code with jsf code, be implemented? Even if this is possible theoretically, wont there be issues/restrictions that I would have to keep track of? What are those restrictions? Have you tried combining GWT code with JSF code? Did it work?

JSF and Phonegap

I am a new Java developer and I would like to develop a JSF mobile application. I know I could use JSF 2.0 together with Richfaces, IceFaces or PrimeFaces to develop my app, but I think it would run only on the server and I am not sure if it would have access to offline storage and device’s camera, required by the application.
Question: is it possible to use Phonegap or a similar framework to make my JSF mobile app go native?
I don't think JSF and phonegap can be used together. Phonegap's app is HTML/CSS/javascript app, which doesn't require server. It is client only. JSF app is client-server: application logic mostly located on server and all html generated by server. You can't port it to phone now.
If you need access phone's stuff: offline storage, camera, you can create app in phonegap, sends ajax request to your server. Server can provide some API and you can write it in java. You don't need JSF in this case. Google for REST and Spring for java web services. Or better check this question: https://stackoverflow.com/questions/1710199/which-is-the-best-java-rest-api-restlet-or-jersey
You might want to look at Primeface Mobile. It is a UI toolkit for writing JSF web applications tailored for mobile clients.
http://www.primefaces.org/showcase-labs/mobile/index.jsf

Implementing chat in my JSF page

I have J2EE web application which uses JSF framework. Now I am trying to add chat functionality to my application. The problem that I am facing is
When someone pings me, i should be able to see a chat notification on my jsp page. Which means server should be able to update my page when new chat notification comes. Please tell me how can my jsp page listen to incoming packets.
You should look into push technologies. Many JSF libraries support it directly: icefaces, richfaces and primefaces at least. If you don't want to use any of these you may also check out atmosphere, but this will require some javascript and server side coding.

Resources