How to use Component class in JSF2 using JSP - jsf-2

Is there any way to write custom tags using components and renderers in JSF2.0 using JSP?
could you please send the example if it is possible.

Related

How to use ActionForm, ActionForward, DispatchAction, ActionMessages in Struts2

I am converting application from struts1 to struts2 so I need to use ActionForm, ActionForward, DispatchAction, ActionMessages.
How I can use that in struts 2?
If you convert an app from struts1 to struts2 then you don't need to use these classes because they belong to struts1, but if you want to use struts2-struts1-plugin then you can use them. Note that using this plugin is is not easy and requires some effort to configure such application. See Struts 1 Plugin.

How to retrieve HTML representation of components?

I would like to output HTML codes of my vaadin's components at my console. I didn't find any methods for this . Can it be possible ?
It is not possible to retrieve component's generated HTML with Vaadin's server-side programming mode.
If you really need to do it, you could write your own extension what transfers component's generated HTML from browser to server after it's rendered. Writing your extension means the you need to it with GWT (GWT Web Toolkit, formerly Google Web Toolkit).

What is the best way to build JQuery mobile custom components

I am working on a experiment of making JQuery mobile custom components with JQuery tmpl(Templating plugin). The component are building using existing JQuerymobile items and also they are programmatic components. I am using plain JavaScript functions and prototypes to create these components. The purpose behind this and I wanted to made a component that can be easily generate pragmatically, i.evar myAccordian = new Accordian() like that.
So is there a more structured way of doing these components(can say widgets) and also the event binding for each.
jQuery Mobile component is created using the $.widget () method defined internally in jQuery Mobile. This method allows to create and initialize the component and add any specific methods.
There are multiple tutorials available which explains the process such as
https://www.hiddentao.com/archives/2011/11/07/how-to-write-a-custom-widget-for-jquery-mobile/
http://the-jquerymobile-tutorial.org/jquery-mobile-tutorial-CH09.php

Which are the basic guidelines for using Delphi IntraWeb with Twitter Bootstrap?

I would like to use the Bootstrap Framework with Delphi's IntraWeb (I'm using XE2)? The idea is to have the server side logic done by Delphi, while using the nice controls that come with BootStrap?
What would be the basic components "Hello World" application for this configuration?
What would be the high-level approach for a more elaborate application, for example one with a Bootstrap nav component that has its tab contents populated by Delphi?
Is combining IntraWeb and Bootstrap an overkill? Would I would be better off with an Indy TIdHTTPServer + Bootstrap?
It does not have to be difficult to implement Boostrap with Intraweb, you just have to add the Js files in the ContentFiles property of the IWForm, you just have to take in mind you have to write the html for each component you use for BootStrap.
In http://www.codegearguru.com in the Movie #63 - Using jQuery Mobile with IntraWeb - CodeRage 6 Replay
They have explained how to develope the Fishfact demo using jQueryMobile, using the TIWTemplateProcessorHTML component and standard IW components, so it should no be difficult to adapt it for bootstrap.
Here is the link: http://codegearguru.com/video/063/jQueryMobileFishFacts.html
Althought, there have been a new component suite since last year implementing JQuery and jQuery mobile, you should take a loo at http://www.cgdevtools.com, I'm using them and let me tell it give you IW app a very nice view. AFAIK they are planning to generate a component suite for Bootstrap.
As far as the web-server is concerned, it should provide the necessary files when the client requests them to run bootstrap client-side: Bootstrap: File Structure
To populate the components (client-side), you'll have to create the server-side logic so it will enter the correct javascript that does so into the HTML of the pages.

Use custom CSS template in combination with Primefaces

I have a project which is developed by Primefaces 2.2 and JSF 2.1.
Since I am not satisfied with Primefaces' template neither ThemeRoller that they provide, I found very interesting themes on
http://themeforest.net
and I want to integrate one of those in my project.
Is it possible to integrate Primefaces with templates from Themeforest? Are there any traps that I need to consider?
Primefaces themes are powered by theme rollers, (separate css for structure and skinning). the only way of implementing themes is by using Primefaces's template or ThemeRoller. Or else you can try dynamic themes by defining EL expression as a param value
<context-param>
<param-name>primefaces.THEME</param-name>
<param-value>#{themeSwitcherBean.theme}</param-value>
</context-param>
as mentioned in primefaces document here http://www.primefaces.org/documentation.html
Yes, of course, but it's not a template. It's a theme. You can do that easily with facalet.
I never use the template / skinning provided by Primefaces, but sometimes integrate it in the project because there are some very useful components. Of course you can use a custom template like those you saw on Themeforest. All you have to do is create XHMTL instead of HTML files and correct some syntax (for example input tags need a closing tag in XHTML). The problem is you can't completely disable the styling of components like the p:inputText, you have to use h:inputText and then apply the classes provided by your template in the styleClass attribute.

Resources