Friday, May 6, 2016

AutoComplete feature with multiple element section in ADF

Auto suggest feature in ADF

We use the <af:autoSuggestBehavior/> tag to support the auto complete functionality in ADF - JSF screens.

Limitation with auto complete in ADF

It allows the selection of just one element. If we want multiple elements to be selected as shown below, it is not possible with ADF

Solution

We can use this JQuery add on - The link to download the JQuery is her

How to use that plugin?

JSF Code is as below

<af:inputText id="it1" rows="1" columns="50" label="To" simple="true"
styleClass="user-search-token-input" autoSubmit="true"
value="#{backingBeanScope.TestBean.sampleInput}"
binding="#{backingBeanScope.Test.sampleText}">
</af:inputText>


   <div style="display:none" data-bind="
                            tokenInput: 'REST API to get the code',
                            tokenInputSelector: '.user-search-token-input input',
                            tokenInputOptions: {
                                method: 'POST',
                                queryParam: 'query',
                                jsonContainer: 'users',
                                propertyToSearch: 'uid',
                                tokenValue: 'uid',
                                hintText: 'Please enter name or email address'
                            }"><jsp:text/></div>


Expected input to the Add on

$(document).ready(function() {
$("#user-search-token-input").tokenInput([{
"first_name": "Arthur",
"last_name": "Godfrey",
"email": "arthur_godfrey@nccu.edu",
"url": "https://default_profile_images/default_profile_2_normal.png"
},
{
"first_name": "Andre",
"last_name": "Jolly",
"email": "andre.jolly@uol.com.br",
"url": "https://default_profile_images/default_profile_2_normal.png"
},
{
"first_name": "Andre",
"last_name": "Henderson",
"email": "andre.henderson@globo.com",
"url": "https://default_profile_images/default_profile_2_normal.png"
}
 ]);
});

How to make the customization to the JQuery add on

Customize the required values in the plugin at the place shown in the below diagram.



Native transport for Oracle Service Bus with Apache Kafka

What is Apache Kafka?

Kafka is a distributed, partitioned, replicated commit log service. It provides the functionality of a messaging system, but with a unique design.
What does all that mean?
First let's review some basic messaging terminology:
  • Kafka maintains feeds of messages in categories called topics.
  • We'll call processes that publish messages to a Kafka topic producers.
  • We'll call processes that subscribe to topics and process the feed of published messages consumers..
  • Kafka is run as a cluster comprised of one or more servers each of which is called a broker.
So, at a high level, producers send messages over the network to the Kafka cluster which in turn serves them up to consumers like this:


 


Native transport for Oracle Service Bus 

Native transport for Oracle Service Bus allows the connection and data exchange with Kafka – supporting message consumption and production to Kafka topics. This is done in a way that allows Service Bus to scale jointly with Kafka, both vertically and horizontally.

How to install and exchange the data between Oracle Service Bus and Apache Kafka Can be found here