JSF component for Gantt chart - jsf

I need a JSF component for representing Gantt chart. Does any component library (like RichFaces) contain such a component?

JFreeChart has a Gantt chart and PrimeFaces has an image component which allows you to dynamically stream content in. Here is an example in combination with JFreeChart.
Alternatively you can also just grab h:graphicImage and let it point to a simple servlet which streams the JFreeChart result to the response based on the request parameters or pathinfo.

JFreeChart does it.
See here for example.

Recent versions of PrimeFaces include a timeline component.
Events in the custom example have end dates, which makes the events to be rendered as bars.
Though it is not full blown Gantt, it could be enough for certain projects.

Related

Netbeans JSF Palette

Ok, I have been trying to find answer for two days now. I created new Web Application and added JSF framework to it. But when I opened a palette I can see only few tags to be dragged and dropped. I can see HTML, HTML Forms and JSF categories with only about five tags in each. Do I have to add some library or something? Thank you for help.
You better get rid of Netbeans JSF palette when adding components to your page. Writing directly on the page you will be more productive because you have code completion assistance. If you look at the JSF palette it is like a set of squeleton generators more than an exhaustive components set. So basically I would use, perhaps, only the JSF Data Table [From Entity] palette item.

Zooming an image in PrimeFaces

I'm currently developing a website using PrimeFaces component library. I would like to know, is there any built in component for zooming (zoom in and zoom out) an image in PrimeFaces?
It's not quite the same, but there are two Primefaces extensions, called ImageAreaSelect and ImageRotateAndResize which give you (combined) the same functionallity.
The second extension lets you scale your image, which can be almost interpreted as zoomed.
Also take a look at that example as well.
No. Right now there isn't any component like that in Primefaces.
However you have other Non Primefaces options, you can go for Javascript,Jquery or Flash.

jsf popupwindow with a datatable

I have a form which one of it's fields is a code and description, also a button for opening a popup window that contains a list of all of the available codes.
when the user double clickes a row from that table i want to set these values to the code and description. - how can this be done?
Another question, I want to create this popup and table to be initialized dynamically - by that i mean that if i have a few forms in my application, when ever i have a field which has a description i want to be able to open this popup and to see the available list for that field. (every field can be from a diffrent table). is it possible to create something like that? if so, how?
Any help will be appritiated,
Thank's In Advance.
Yes, it is possible. Even more, many component libraries have ready to use popup/dialog components, such as RichFaces with <rich:popupPanel> and PrimeFaces with <p:dialog>.
If you do not want to use a component library for some reason, you would need to create a custom component for this which generates basically an absolutely positioned HTML <div> element with a CSS overlay which get shown/hidden by JS on a particular click/action. The HTML/CSS/JS part should be relatively simple if you are familiar with those languages. The JSF part is somewhat hard if you have never created a custom component before, but it should be possible with a composite component as well, so you could also just create one with pure XHTML. The updating/refreshing can just take place by the usual <f:ajax> means.

how to create graphs in jsf?

Can anyone give details about creating graphs like bars and lines in jsf ? which one is best ? I want graphs by taking data from database dynamically and should work offline.I want each and every
step of installation and execution.please reply.
Have a look for component libraries which offers graph (chart) components.
For example PrimeFaces (demo) and OpenFaces (demo).

Extend Richfaces components - for example customize Datatable component for specific implementation

How to extend the functionality of Richfaces components for example Data table with custom header and sorting techniques. i have seen extended data table but did not get much information from it. Please point me to an example if at it is available.
Thanks
Soma
Well, you can extend a JSF component with the regular java extension (extends). You will have to extend a number of classes, depending on the exact component:
UIComponentName/HtmlComponentName
HtmlComponentNameRenderer
ComponentNameTag
and you might need to register the renderer in faces-config.xml.
You can take a look at this thread, or google for "Extend JSF component" or "Create custom JSF component".

Resources