Home » Author Archives: Oleg Varaksin (page 3)

Author Archives: Oleg Varaksin

GET / POST with RESTful Client API

jsf-logo

There are many stuff in the internet how to work with RESTful Client API. These are basics. But even though the subject seems to be trivial, there are hurdles, especially for beginners. In this post I will try to summarize my know-how, how I did this in real projects. I usually use Jersey (reference implementation for building RESTful services). See ...

Read More »

Configure timeout for CDI conversations

apache-myfaces-logo

CDI conversation scope is a nice feature when developing JSF applications. Imagine you have large data tables which take a long time to be loaded. You normally don’t want to place the loaded data in session scoped beans by reason of high memory consumption. And you can’t place the loaded data in view scoped beans because you wouldn’t like always ...

Read More »

JSF Event-based communication: New-school approach

jsf-logo

In the last post, we learnt event-based communication on basis of Observer / Event Listener and Mediator patterns. Due to their shortcomings I would like to show more efficient ways for event-based communication. We will start with Google Guava EventBus and end up with CDI (Contexts and Dependency Injection for the Java EE platform). Guava EventBus Google Guava library has ...

Read More »

JSF Event-based communication: Old-school approach

jsf-logo

Web applications written in JSF consist of beans which interact among each other. Communication between beans is one of the main design patterns when developing a web application. Sometimes, one bean need to send events to other beans to inform them about some changes or whatever else. We can normally inject a managed or Spring bean into the property of ...

Read More »

Dynamic forms, JSF world was long waiting for

primefaces-logo

The new PrimeFaces Extensions release 0.5.0 brought a new DynaForm component. Normally, we can build a form quite straightforward by h:panelGrid oder p:panelGrid if the count of rows / columns, positions of elements, etc. are known. That’s true for static forms. But it’s not possible to use h:panelGrid oder p:panelGrid if a form is described dynamically, at runtime. E.g. if ...

Read More »

Custom JSF validator for required fields

jsf-logo

JSF components implementing EditableValueHolder interface have two attributes ‘ required’ and ‘ requiredMessage’ – a flag indicating that the user is required to input / select not empty value and a text for validation message. We can use that, but it’s not flexible enough, we can’t parameterize the message directly in view (facelets or jsp) and we have to do ...

Read More »

High Performance Webapps – Data URIs

software-development-2-logo

I continue to write tips for perfomance optimization of websites. The last post was about jQuery objects. This post is about data URIs. Data URIs are an interesting concept on the Web. Read ” Data URIs explained” please if you don’t know what it does mean. Data URIs are a technique for embedding resources as base 64 encoded data, avoiding ...

Read More »

JSON with GSON and abstract classes

json-logo

I have switched to Google Gson after many years of using org.json library for supporting JSON data interchange format in Java. org.json is a lower-level library, so that you have to create JSONObject, JSONArray, JSONString, … and do other low-level work. Gson simplifies this work. It provides simple toJson() and fromJson() methods to convert arbitrary Java objects to JSON and ...

Read More »

5 useful methods JSF developers should know

jsf-logo

The aim of this post is a summary about some handy methods for JSF developers they can use in their day-to-day work. An utility class is a good place to put all methods together. I would call such class FacesAccessor. The first method is probably the most used one. It returns managed bean by the given name. The bean must ...

Read More »
Want to take your Java Skills to the next level?
Grab our programming books for FREE!
  • Save time by leveraging our field-tested solutions to common problems.
  • The books cover a wide range of topics, from JPA and JUnit, to JMeter and Android.
  • Each book comes as a standalone guide (with source code provided), so that you use it as reference.
Last Step ...

Where should we send the free eBooks?

Good Work!
To download the books, please verify your email address by following the instructions found on the email we just sent you.