Wednesday, March 4, 2015

Remote Deployment via the JBoss Admin Console

1. Login as JBoss admin or any management user

2. In the Runtime tab, click on Manage Deployments

Sunday, March 1, 2015

How to run Linux shell command in Windows

To run shell command in windows platforms, one of the option is to use Cygwin.

1. Download and install Cygwin at this url.
2. Start Cygwin command prompt.
3. Start entering shell command into Cygwin command prompt.


Done!!

Saturday, February 28, 2015

p:tabMenu model does not work with JSF 2.1.x

According to PrimeFaces demo page, <p:tabMenu /> is working with <p:menuItem /> to display tab content.
<p:tabMenu /> also works with model to display tab content.

<p:tabMenu activeIndex="#{backingBean.tabActiveIndex}"
    model="#{backingBean.tabModel}" />

But <p:tabMenu /> not working with some of the JSF2.1 distribution.
eg, JSF2.1.19, JSF2.1.22, JSF2.1.29, etc

When tabMenu with model running with JSF2.1.29. some of the tabs are not able to click.

The only solution to resolve this problem, is to use <p:menuItem /> instead of model.


Done!!

Tuesday, February 10, 2015

How to update JSF library in JBoss

1. Download the expected version of JSF library.
jsf-api
https://repository.jboss.org/nexus/content/groups/public/org/jboss/spec/javax/faces/jboss-jsf-api_2.1_spec/

jsf-impl
https://repository.jboss.org/nexus/content/groups/public-jboss/com/sun/faces/jsf-impl/

2. Copy the newly downloaded JSF jar into the following folder
jsf-api
<JBoss_AS>/modules/javax/faces/api/main
<JBoss_EAP>/modules/system/layers/base/javax/faces/api/main

jsf-impl
<JBoss_AS>/modules/com/sun/jsf-impl/main
<JBoss_EAP>/modules/system/layers/base/com/sun/jsf-impl/main

3. Modify module.xml with the new jar file name.
jsf-api
    <resources>
        <resource-root path="jboss-jsf-api_2.1_spec-2.1.19.1.Final-redhat-1.jar"/>
    </resources>
jsf-impl
    <resources>
        <resource-root path="jsf-impl-2.1.19-redhat-2.jar"/>
    </resources>

4. Restart JBoss


Done!!


Tuesday, February 3, 2015

How to display loop count in velocity

The following syntax will loop the map and display the value in the map.

#foreach($abc in $abcMap)
   $abc.get("a")  $abc.get("b")  $abc.get("c")
#endbbb


To display the loop count, just need to add velocityCount.

#foreach($abc in $abcMap)
   $velocityCount $abc.get("a")  $abc.get("b")  $abc.get("c")
#endbbb



Done!!

LinkWithin

Related Posts Plugin for WordPress, Blogger...