Wednesday, November 30, 2016

Putting and getting data to/from infinispan

Example shown below is applicable and tested working in JBoss EAP 6.x and JBoss AS 7.x

1. Inject the cache container with @resouce annotation.
    a) name, inject with the container name
    b) lookup, inject with the jndi name configured in the cache container.

code below is presented with method (a)
@Resource(name = "java:jboss/infinispan/container/CACHE-CONTAINER-NAME-IN-STANDALONE.XML")
private CacheContainer container;

make sure the cache container name exist in standalone.xml 
else there will be NullPointerException when getting the cache from the cache container.

Monday, October 3, 2016

Add and remove JMS queue in JBoss admin console

1. navigate to JBoss Console login page and login as admin

2. navigate JMS Messaging Provider
    Profile > Messaging > Messaging Provider, click View

3. Click JMS Destination

4. under Queues tab, click add

5. fill in the form, click Save

6. Review the Queue summary






Done!!



Wednesday, September 21, 2016

How to activate / inactivate Portlet in LIferay

1. Login as Liferay Administrator

2. Navigate to Plugins Configuration
    Control Panel > Apps > Plugins Configuration

3. Click on 1 of the plugin from the list, eg. Documents and Media

4. untick the "Active" checkbox.

5. Save.

With these steps, the Documents and Media portlet/plugin has been deactivated.


Done!!

Tuesday, September 20, 2016

How to get size of a java collection in xhtml

Basically there are 2 ways to get the size of a collection / list in xhtml.
1. jstl function
#{ fn:length(myList) }
2. call the size() function directly
#{ myList.size() }

Done!!

Tuesday, August 2, 2016

PrimeFaces fileUpload javascript properties

fileuplaod_wgt.buttonBar.find("button.cancel")
fileuplaod_wgt.buttonBar.find("button.start")
fileuplaod_wgt.buttonBar.find('input[type=file]')

upload content
upload.uploadContent'

number of uploaded files
var files = fileuplaod_wgt.uploadContent.find('.files .template-upload');

invalid files
fileuplaod_wgt.uploadContent.find("tr.ui-state-error");



reference:
http://stackoverflow.com/questions/14881131/primefaces-upload-how-to-only-allow-one-upload-in-advance-mode

LinkWithin

Related Posts Plugin for WordPress, Blogger...