Archive for November, 2013

JSF 2.2: Pass Through – Using custom attributes without headache

JSF taglib is very helpful to build HTML forms and reports. Not all W3C’s attributes are available in standard tags. The h:inputText does not contains the attribute “placeholder”, available only in HTML5.

To make up this “limitation” without overwriting a component or building a new one, JSF 2.2 has the “workaround” called Pass Through Attributes. A new tag to inhibit to remove any custom attributes.

Declare tag using xmlns:p=”http://xmlns.jcp.org/jsf/passthrough”. Now, you can put “p:” in any JSF tag as attribute, like “<h:outputText p:MyAttribute=”MyValue” … />”. This will write “<input type=”text” MyAttribute=”MyValue” … />”.

Go to work:

JSF without Pass Through

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://xmlns.jcp.org/jsf/html">
	<h:head>
	</h:head>
	<h:body>
		<f:view contentType="text/html">
			<h:form>
				<!-- Numeric input text and placeholder attribute -->
				<h:inputText ... placeholder="Age" type="number" />
			</h:form>
		</f:view>
	</h:body>
</html>

There is not “placeholder” attribute

With Pass Through

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://xmlns.jcp.org/jsf/html"
    xmlns:p="http://xmlns.jcp.org/jsf/passthrough">
	<h:head>
	</h:head>
	<h:body>
		<f:view contentType="text/html">
			<h:form>
				<!-- Numeric input text and placeholder attribute -->
				<h:inputText ... p:placeholder="Age" p:type="number" />
			</h:form>
		</f:view>
	</h:body>
</html>
There is "placeholder" attribute

There is “placeholder” attribute


Windows 8.1 – Uninstall Sentinel License Service to update Windows to 8.1

update_windows_8_1I’ve just update Windows to 8.1 version, but with a little headache named “Sentinel License Service”.

Updater not works with this service installed in your system. You need remove it to complete the installation.

Ok, then go to Control Panel, right?! No! The service not appears in programs list.

To remove it, you’ll need download an uninstall program, available on Safenet site.

First, go to Safenet site (http://sentinelcustomer.safenet-inc.com/sentineldownloads/) and download “Sentinel HASP/LDK – Command Line Run-time Installer” (13MB).

Uncompress compacted file, open Command prompt and run the following command:

C:\...\Sentinel_LDK_Run-time_cmd_line>haspdinst.exe -purge

Wait uninstallation and continue with your Windows update!


  • Advertisement

  • Advertisement

  • Copyright © 1996-2010 André L. S.. All rights reserved.
    iDream theme by Templates Next | Powered by WordPress