Xtivia http://www.xtivia.com Your Trusted Technology Partner Thu, 02 Jul 2015 21:06:13 +0000 en-US hourly 1 Accessing InforCRM control values from Javascript http://www.xtivia.com/accessing-inforcrm-control-values-javascript/ http://www.xtivia.com/accessing-inforcrm-control-values-javascript/#comments Wed, 01 Jul 2015 16:20:08 +0000 http://www.xtivia.com/?p=8058 Often when one needs to access the value set in an HTML control from the client side script it is tempting to reach into the DOM object and retrieve it...

READ MORE

The post Accessing InforCRM control values from Javascript appeared first on Xtivia.

]]>
Often when one needs to access the value set in an HTML control from the client side script it is tempting to reach into the DOM object and retrieve it directly, using something like this for example:

var c = document.getElementById('TabControl_element_AccountOpportunities_element_view_AccountOpportunities_AccountOpportunities_InactiveTotal_InputCurrency_CurrencyTextBox');
// this will retrieve the value as a string - still needs to be parsed as a number!
var value = c.value;

Then to set the value something like:

// need to implement "formatValue" somehow!
c.value = formatValue(value);

The hard-coded id is not great of course but the main problem with the approach in my opinion is the fact that you’ll bypass the localization logic and have to parse / format the numbers yourself. Another potential issue is that because the logic of the “dijit” (the client-side widget used to render and control the currency textbox) is bypassed it will cause its internal state to be inconsistent. Often it is more reliable to access the dijit instead, using code such as:

var c = dijit.byId('TabControl_element_AccountOpportunities_element_view_AccountOpportunities_AccountOpportunities_InactiveTotal_InputCurrency_CurrencyTextBox');
// this will retrieve the "parsed" value as a number
var value = c.get('value');

And to set it:

c.set('value', 3000);

If you have some good examples of accessing the controls from client side script please share them in the comments!

The post Accessing InforCRM control values from Javascript appeared first on Xtivia.

]]>
http://www.xtivia.com/accessing-inforcrm-control-values-javascript/feed/ 0
Before you restore! http://www.xtivia.com/restore/ http://www.xtivia.com/restore/#comments Tue, 30 Jun 2015 13:00:10 +0000 http://www.xtivia.com/?p=7866 There are several times that you may have to restore from a production box to a beta or a QA environment as a different user. In that scenario, the restore...

READ MORE

The post Before you restore! appeared first on Xtivia.

]]>
There are several times that you may have to restore from a production box to a beta or a QA environment as a different user. In that scenario, the restore commands will work just fine but you will receive authorization errors even when the id you used to restore has SYSADM.

Cause:

Starting DB2 V9.7, SYSADM no longer has implicit DBADM privileges due to a change in security policies, You may see SQL errors like SQL0551N, SQL0552N or SQL3020N

Resolution:

Set the DB2_RESTORE_GRANT_ADMIN_AUTHORITIES registry variable BEFORE performing the restore. An instance bounce is required.

db2stop
db2set DB2_RESTORE_GRANT_ADMIN_AUTHORITIES=ON
db2set -all | grep -i db2_restore_grant
[i] DB2_RESTORE_GRANT_ADMIN_AUTHORITIES=ON
db2start

Once you set this variable, SECADM, DBADM, DATAACCESS, and ACCESSCTRL authorities are granted to the user that issues the restore operation.

The post Before you restore! appeared first on Xtivia.

]]>
http://www.xtivia.com/restore/feed/ 0
Unspecified Error logging into Infor CRM / SalesLogix http://www.xtivia.com/unspecified-error-logging-into-infor-crm-saleslogix/ http://www.xtivia.com/unspecified-error-logging-into-infor-crm-saleslogix/#comments Thu, 25 Jun 2015 00:25:22 +0000 http://www.xtivia.com/?p=7883 If you’ve worked with Infor CRM / SalesLogix for a while, you’ve probably run into the issue where you enter your username and password (correctly!) and all you get is...

READ MORE

The post Unspecified Error logging into Infor CRM / SalesLogix appeared first on Xtivia.

]]>
If you’ve worked with Infor CRM / SalesLogix for a while, you’ve probably run into the issue where you enter your username and password (correctly!) and all you get is an Unspecified error! Very descriptive, isn’t it?

Cause: Essentially what the error means is that the application is unable to connect successfully with the SQL server database. There are several reasons for this, hence many possible fixes.

 

1) Correct Native Client Installed – the most common issue (and this affects Windows Client users or any web user who has any of the Windows based tools installed) is that the correct SQL Native Client is not installed.

The SQL Native client is like a “driver”, you can install multiple versions on the same machine (for example SQL 2005 Native Client, SQL 2008 R2 Native Client and SQL 2012 Native Client) without any adverse effects.

However you do need to verify you have the CORRECT one installed. The correct one is the one being used on the Infor CRM / SalesLogix server in the Saleslogix Connection Manager. In the example below you’ll notice that the EVAL81 database is using SQLNCLI10.1

ConnectionManager

 

Here’s how the various versions of SQL Native client show up as in the Data Link Properties:

NativeClients

 

Version Number Product Version
9.x SQL 2005
10.x SQL 2008 (or 2008 R2)
11.x SQL 2012
12.x SQL 2014

 

 

 

So based on the above, this tells us that the database connection is being made using a SQL 2008 (R2) Native client and that’s the version that should be installed to ensure connectivity.

Note that the version of the SQL Native client doesn’t necessarily have to match the version of SQL Server being used, technically a SQL 2005 Native Client could be used to connect to a database on a SQL 2008 platform. However it is recommended that the same version as SQL server is used. Using the wrong version of the SQL Native client causes issues with SQL 2012 databases in particular.

 

2) Saleslogix Connection Manager – Often the Saleslogix connection manager has not been setup correctly. A quick way to test this is to try connecting from another client machine or from the server itself. Check to ensure that the connection to the database has been setup correctly and for SQL 2008 Native Client and higher, ensure that you click on the Advanced Settings and set the following:

  • Integrated Security  – Click the Reset Button
  • Persist Security Info – Set to True

 

3) SQL Server Network Access – If none of the clients can connect, you may have an issue with the SQL server itself. By default SQL Express instances do not have TCP/IP protocol enabled so they are accessible via the local machine only. Check the settings in the SQL Server Configuration Manager to ensure TCP/IP protocol is enabled for your SQL instance.

 

4) Firewall and Network Connectivity – Even though the client connects via the Saleslogix Application Server, it still needs direct access to the SQL server as well. See if you can ping the SQL server from the client machine. You can also try to Telnet to the SQL server at port 1433.

 

5) Corrupt Connection Settings – occasionally you run into a client machine that has corrupt SalesLogix Connection settings, even though they appear to be correct and pass the connection test. Its recommended that the client connection be deleted and re-created. You may also have to delete all subkeys under:

HKCU\Software\SalesLogix\ADOLogin

 

6) Reboot – When all else fails, maybe all that’s needed is a reboot! Sometimes SQL settings don’t take effect until a reboot is done.

 

Hope this brings some clarity to this very vague error message! If you need further assistance, call Xtivia’s CRM support line at 1-877-777-9779 and we’ll be happy to help you!

The post Unspecified Error logging into Infor CRM / SalesLogix appeared first on Xtivia.

]]>
http://www.xtivia.com/unspecified-error-logging-into-infor-crm-saleslogix/feed/ 0
What are Page Splits? http://www.xtivia.com/page-splits/ http://www.xtivia.com/page-splits/#comments Tue, 23 Jun 2015 16:56:13 +0000 http://www.xtivia.com/?p=7838 Are you noticing a drop in performance? Are you seeing a large percentage of index fragmentation? If your data page fill factor value set to a high number, page splits...

READ MORE

The post What are Page Splits? appeared first on Xtivia.

]]>
Are you noticing a drop in performance? Are you seeing a large percentage of index fragmentation? If your data page fill factor value set to a high number, page splits could be the culprit. We have helped many of our VDBA customers with these problems.

What are Page Splits?

Page splits occur when there is not enough free space on a data page to insert or update data. SQL Server takes the excess data and puts it on another data page. Imagine you have three  8oz jars filled to the rim with layers of alternating M&Ms colors. You need to add Green M&Ms to the layer in the middle of one of the jars. The jars cannot hold any more M&Ms so you have to get another jar. You take out half the M&Ms from the jar with the green layer and place them in the new jar. Then, you add the green M&Ms. Now you have four  8oz jars but only two are full. That costs time and resources and results in index fragmentation. This can decrease performance.

What do I need to look for to identify if page splits are the problem?

The Performance Monitor counter, “SQLServer:Access Methods\Page Splits/sec”, shows the number of page splits per second that occurs. To determine if this amount is a problem, there are several factors that need to be taken into consideration. This includes workload, workload type, table size, and the fill factor value. A large amount of batch requests consisting of mostly insert and update statements will cause a high number of page splits per second. This is due to the amount of changes that are being made to data pages when a batch is executed. Large tables will also cause a boost in the amount of page splits per second. This is because there are more data pages that need to be changed. Indexes with high fill factor values do not leave enough free space for changes so this will also increase the amount of splits.

How can I fix it?

One of the best places to start when fixing page splits per second is to set a fill factor value when the index is rebuilt. By default, SQL Server sets the fill factor to 100. This uses 100% of data page space. In the M&M example, filling up 100% of jar space reduced the amount of jars but left no space for changes. This meant there was no room to add more M&Ms later on. When the INSERT or Update statement is used, there is no room left on the data page to make those changes. When there is not enough room, new data pages are created and half of the data is added to the new data page. The best value for the fill factor varies based on the need of the client and their system. If the fill factor is set too high, page splits can occur. If the fill factor is set too low, the data is spread out too much and creates more data pages than needed. This can also affect the performance. If you have questions about finding the right fill factor value for your indexes or need assistance with SQL Server in general, reach out to us! XTIVIA and I can assist you with adding resiliency for your business.

 

The post What are Page Splits? appeared first on Xtivia.

]]>
http://www.xtivia.com/page-splits/feed/ 0
How to extract data using db2audit http://www.xtivia.com/db2audit/ http://www.xtivia.com/db2audit/#comments Tue, 23 Jun 2015 16:44:54 +0000 http://www.xtivia.com/?p=7765 One of our customers recently wanted to extract data using db2audit, but the documentation on this topic is very limited and scarce. Moreover, the commands have changed after V9.7 and...

READ MORE

The post How to extract data using db2audit appeared first on Xtivia.

]]>
One of our customers recently wanted to extract data using db2audit, but the documentation on this topic is very limited and scarce. Moreover, the commands have changed after V9.7 and finding documentation or following it could be tricky. After some testing, we were able to provide the customer with the exact syntax to use to extract data. Here’s how:

Make sure db2audit is on

$db2audit start

$db2audit flush

This forces any pending audit records to be written to the audit log. Also, the audit state is reset from “unable to log” to a state of “ready to log” if the audit facility is in an error state.

$ pwd

/home/db2inst1/sqllib/security/auditdata

$ ls -ltr

total 404204

-rw------- 1 db2inst1 db2iadm1      9122 Feb 14  2014 db2audit.instance.log.0.20140214184332

-rw-rw-rw- 1 db2inst1 db2iadm1         0 Feb 14  2014 auditlobs

-rw------- 1 db2inst1 db2iadm1 403732695 Dec  9 22:10 db2audit.instance.log.0.20141209221020

-rw------- 1 db2inst1 db2iadm1   3636219 Dec  9 23:32 db2audit.db.WCST01.log.0.20141209233216

-rw-rw-rw- 1 db2inst1 db2iadm1         0 Dec  9 23:40 audit.del

-rw------- 1 db2inst1 db2iadm1   5750894 Dec  9 23:42 db2audit.db.DBINST1.log.0

-rw------- 1 db2inst1 db2iadm1    333282 Dec  9 23:42 db2audit.instance.log.0

 

 

$ db2audit extract delasc delimiter ! category validate from files /home/db2inst1/sqllib/security/auditdata/db2audit.db.WCST01.log.0.20141209233216

 

AUD0000I  Operation succeeded.

 

$ ls -ltr

total 404204

-rw------- 1 db2inst1 db2iadm1      9122 Feb 14  2014 db2audit.instance.log.0.20140214184332

-rw-rw-rw- 1 db2inst1 db2iadm1         0 Feb 14  2014 auditlobs

-rw------- 1 db2inst1 db2iadm1 403732695 Dec  9 22:10 db2audit.instance.log.0.20141209221020

-rw------- 1 db2inst1 db2iadm1   3636219 Dec  9 23:32 db2audit.db.WCST01.log.0.20141209233216

-rw-rw-rw- 1 db2inst1 db2iadm1         0 Dec  9 23:40 audit.del

-rw-rw-rw- 1 db2inst1 db2iadm1      7295 Dec  9 23:41 validate.del

-rw------- 1 db2inst1 db2iadm1   5750894 Dec  9 23:42 db2audit.db.DBINST1.log.0

-rw------- 1 db2inst1 db2iadm1    333969 Dec  9 23:42 db2audit.instance.log.0

 

 

For more information on db2audit, please refer:

 

http://www-01.ibm.com/support/knowledgecenter/SSEPGG_9.7.0/com.ibm.db2.luw.admin.cmd.doc/doc/r0002072.html?cp=SSEPGG_9.7.0%2F3-6-2-6-13

The post How to extract data using db2audit appeared first on Xtivia.

]]>
http://www.xtivia.com/db2audit/feed/ 0
Logging into the Infor CRM Mobile Client with an iPhone / iPad http://www.xtivia.com/logging-infor-crm-mobile-client-iphone-ipad/ http://www.xtivia.com/logging-infor-crm-mobile-client-iphone-ipad/#comments Mon, 22 Jun 2015 14:33:52 +0000 http://www.xtivia.com/?p=7846 We’re often asked, why can’t I login to the Infor CRM (SalesLogix) mobile client using my iPhone / iPad? Here are some common things to check on your device: 1) Click...

READ MORE

The post Logging into the Infor CRM Mobile Client with an iPhone / iPad appeared first on Xtivia.

]]>
We’re often asked, why can’t I login to the Infor CRM (SalesLogix) mobile client using my iPhone / iPad?

Here are some common things to check on your device:

1) Click on Settings   unnamed

 

2) Click on Safari –> Under Privacy and Security –> Block Cookies –> Always Allow

Capture

 

3) Go one step back…now scroll down and click on Advanced –> Make sure Javascript is set to ON.

Capture

 

4) Clear your Safari cache. This is done in 2 steps:

a) Click on “Clear History and Website Data”. Tap the Clear button when prompted.

Capture         clear-safari-history-and-website-data

b) Click on Advanced –> Website Data –> Remove All Website Data

open-website-data

Usually these steps should let you login to the mobile client if you try again.

 

Assuming the above does not resolve your issue, here are some additional things to try:

a) Try logging into the Mobile client using your regular desktop browser on your computer (Chrome / Firefox). If you cannot login there, it indicates either an issue with either the version of the Mobile client being incompatible with your version of iOS, or an issue with your login.

b) Verify your login works by logging into the Infor CRM web client using your credentials. Often a concurrent user is locked out of the system due to several invalid login attempts and is not made aware of this when they login to the mobile client.

 

If you need further assistance, call Xtivia’s CRM support line at 1-877-777-9779 and we’ll be happy to help you!

 

The post Logging into the Infor CRM Mobile Client with an iPhone / iPad appeared first on Xtivia.

]]>
http://www.xtivia.com/logging-infor-crm-mobile-client-iphone-ipad/feed/ 0
Conditional styling of InforCRM grid with onStyleRow http://www.xtivia.com/conditional-styling-of-inforcrm-grid-with-onstylerow/ http://www.xtivia.com/conditional-styling-of-inforcrm-grid-with-onstylerow/#comments Fri, 12 Jun 2015 21:17:20 +0000 http://www.xtivia.com/?p=8122 This is a very common request – the customer wants to see some rows highlighted in the data grid based on the data. For example, they might want to see...

READ MORE

The post Conditional styling of InforCRM grid with onStyleRow appeared first on Xtivia.

]]>
This is a very common request – the customer wants to see some rows highlighted in the data grid based on the data. For example, they might want to see opportunities with a sales potential above $1M highlighted in green. How might we achieve that in InforCRM?

There is no mechanism “out of the box” for it, but it is definitely possible to leverage the underlying capabilities of the dojo grid (see grid row styling) to achieve the look. The challenge becomes then converting the dojo documentation into something that we can use in Saleslogix.

First step: convert the code from declarative style to procedural style (we won’t be able to use the declarative style from InforCRM since the grid is instantiated via code):

grid.on('StyleRow', function (gridRow) {
    var item = grid.getItem(gridRow.index);
    var pot = grid.store.getValue(item, "SalesPotential");
    if (pot > 1000000) {
        gridRow.customStyles += "color: red;";
    }
});

Second step: how do we get that code to run inside of InforCRM?? Unfortunately the grid is created inside of an anonymous function that runs via a setTimeout call, so it’s pretty hard to
hook into it directly. But we know the grid’s id (it’s hardcoded in the javascript file) so we can just register a script to run at a short interval until the grid is available, then add our style code to it.
For good measure we’ll add a call to resize() – this forces the grid to repaint its rows, applying our styles, in the unlikely event that it already got the rows built by the time our function runs.

ScriptManager.RegisterStartupScript(this, GetType(), "StyleGridRows", @"
require(['dijit/registry'], function(registry) {
    var i = setInterval(function() {
        var grid = registry.byId('AccountOpportunitiesgrdOpportunities');
        if(grid) {
            clearInterval(i);
            grid.on('StyleRow', function (gridRow) {
                var item = grid.getItem(gridRow.index);
                var pot = grid.store.getValue(item, 'SalesPotential');
                if (pot > 1000000) {
                    gridRow.customStyles += 'color: red;';
                }
            });
            grid.resize();
        }
    }, 250);    
});
", true);

I hard coded the id, but that’s OK, because it’s hard coded in the AccountOpportunities.js script also. Search for “id:” in that file, or use the Chrome developer tool, to find out what the id is.
Be sure to get the grid’s id and not the “gridNodeId” (which will end in _Grid) – that one is the container and does not have the style functions.

Here is the end result… obviously you can get “customStyles” as fancy as you want, you can also use “customClasses” to use a custom CSS class:

opps

Although the example is simplistic this is a powerful visualization aid and I think once it is prettied up a little bit the users will like it. Leave a comment if you have an interesting use of the onStyleRow event!

The post Conditional styling of InforCRM grid with onStyleRow appeared first on Xtivia.

]]>
http://www.xtivia.com/conditional-styling-of-inforcrm-grid-with-onstylerow/feed/ 0
Creating Instanceable Liferay Portlets with AngularJS http://www.xtivia.com/instanceable-liferay-portlet-angularjs/ http://www.xtivia.com/instanceable-liferay-portlet-angularjs/#comments Fri, 29 May 2015 13:00:33 +0000 http://www.xtivia.com/?p=6960 AngularJS is a great framework for Single Page Applications (SPAs) – it’s easy to learn and use. There’s no reason not to (and actually every reason to) create your Liferay portlets as AngularJS SPAs....

READ MORE

The post Creating Instanceable Liferay Portlets with AngularJS appeared first on Xtivia.

]]>
AngularJS is a great framework for Single Page Applications (SPAs) – it’s easy to learn and use. There’s no reason not to (and actually every reason to) create your Liferay portlets as AngularJS SPAs. Our organization considers this a primary implementation technique.

The purpose of this blog post is to explain how to create an instanceable Liferay portlet with an AngularJS front-end. This kind of portlet can be added to the same page multiple times and display different data depending on each portlet’s preferences.

When developing AngularJS applications (apps), one usually sets the attribute ng-app on the HTML element that will contain the application. You are limited to declaring and bootstrapping one app per HTML page when using this technique. Try declaring two apps in this manner, and you will see lots of console errors. Plus your apps will not work. So how can we have multiple AngularJS apps on the same page and even multiple instances of the same portlet? The answer is to manually bootstrap AngularJS. Instead of allowing AngularJS to automatically bootstrap using the ng-app attribute, we will instead make the bootstrap call directly and pass in a unique ID for each instance.

The first step will be to make sure the Liferay portlet is instanceable by setting the proper configuration. You also need to namespace all global JavaScript functions and variables, html elements ids, and input field names.

In the liferay-portlet.xml file, configure the portlet to be instanceable as shown below:

<portlet>
<portlet-name>ng-instanceable-portlet</portlet-name>
 <icon>/icon.png</icon>
 <instanceable>true</instanceable>
 <header-portlet-css>/css/main.css</header-portlet-css>
 <footer-portlet-javascript>/js/main.js</footer-portlet-javascript>
</portlet>

The key here is to set instanceable to true.

Namespace all form and input elements properly using <portlet:namespace/>, for example:

...
<form name="<portlet:namespace/>fm" id="<portlet:namespace/>edit-pref-form" action="${updatePreferencesURL}" method="post">
...
<input id="<portlet:namespace/>radio1" type="radio" name="<portlet:namespace/>radioElement" value="Radio 1"/>

To make a portlet instanceable we need to manually bootstrap AngularJS. This code snippet shows an example of how to initialize an app with app-specific parameters.

<div id="<portlet:namespace />"  ng-cloak>
      <div ui-view></div>
</div>
<script>
      var config = {namespace:'<portlet:namespace />', 
                    groupName: groupName, people: people};
      bootstrap(config); 
</script>

The config object will contain values required by the AngularJS app module, its controllers and services that are unique to each portlet instance. The values of groupName and people come from the back end, which in turn are dependent on selected preferences, as shown below (two instances of the portlet on the same page with different preferences). We’ll talk about the call to bootstrap() in a bit.

preferences

The selected groupname determines which list of people is retrieved.

If all the custom JavaScript code is within jsp files, we will not require the Config object. Instead, we can namespace all the global variables like this:

var <portlet:namespace/>groupName = '${requestScope.groupName}';
var <portlet:namespace/>people = '${requestScope.people}';

That way all the variables are unique to each instance. The reference portlet for this blog has the AngularJS code within .js files and hence will need the Config object.

bootstrap(config)  is a custom function call. This function initializes the AngularJS app module, configures  routers, loads controllers and services, and then eventually calls the function to manually bootstrap AngularJS.

function bootstrap(config) {
  /** Initialize app module **/
  var app = angular.module(config.namespace, ['ui.router']);
 
  /** Configure routers **/
  app.config(['$stateProvider', '$urlRouterProvider',
   function($stateProvider, $urlRouterProvider) {
     $urlRouterProvider.otherwise('/'); 
     $stateProvider
       .state('people', {
          url: '/',
          templateUrl: path + '/partials/people.jsp',
          controller: 'PeopleCtrl'}) 
       .state('personDetails', { 
          url: '/' + config.namespace + '/personDetails/:groupName/:id',
          templateUrl: path + '/partials/personDetails.jsp', 
          controller: 'PersonDetailsCtrl' 
       });
   }]
  );
 
  /** Load controllers and services **/
  loadControllers(app, config);
 
  /** Manually bootstrap AngularJS **/
  angular.bootstrap(document.getElementById(config.namespace), 
                   [config.namespace]);
}

The function call loadController(app, config) is made to load all controllers. The reference portlet has no services; if  it did, there would have been another call to load services, that is, loadServices(app, config).

Below is the loadControllers() function:

function loadControllers(app, config){
  app.controller('PeopleCtrl', ['$scope', function($scope) {
    $scope.groupName = config.groupName;
    $scope.people = config.people;
    $scope.deletePerson =  function(id){
      for(var i=0; i<$scope.people.length; i++) {
        if($scope.people[i].id == id){
          $scope.people.splice(i,1);
        }
      }
    };
  }]).controller('PersonDetailsCtrl', ['$scope', '$stateParams', '$state', 
                  function($scope, $stateParams, $state) {
    $scope.people = config.people;
    $scope.id = $stateParams.id;
    $scope.groupName = $stateParams.groupName;
    $scope.person = {};
    for(var i=0; i<$scope.people.length; i++) {
      if($scope.people[i].id == $scope.id){
        $scope.person = $scope.people[i];
      }
    }
    $scope.backToPeople = function(){
      $state.go("people");
    };
  }]);
}

Below are the controller templates:

people.jsp

<div class="chart-display-wrapper">
  <div class='group-name'><h2>{{groupName}}</h2></div>
  <div class="table-responsive">
    <table class="table">
      <thead>
        <tr><th>#</th><th>Name</th><th>Age</th><th>Action</th></tr>
      </thead>
      <tbody>
        <tr ng-repeat="person in people">
         <td><a ui-sref="personDetails({groupName: groupName,id: person.id})">
           {{person.id}}</a>
         </td>
         <td><a ui-sref="personDetails({groupName: groupName,id: person.id})">
           {{person.name}}</a>
         </td>
          <td>{{person.age}}</td>
          <td>
             <input type="button" class="btn btn-danger" 
                ng-click="deletePerson(person.id)" value="Delete"/>
          </td>
        </tr>
      </tbody>
    </table>
  </div>
</div>

personDetails.jsp

<div>
  <span style="font-weight:bold">Group: </span>
  <span>{{groupName}}</span>
</div>
<div>
  <span style="font-weight:bold">Id: </span>
  <span>{{person.id}}</</span>
</div>
<div>
  <span style="font-weight:bold">Name: </span>
  <span>{{person.name}}</</span>
</div>
<div>
  <span style="font-weight:bold">Age: </span>
  <span>{{person.age}}</</span>
</div>
<hr>
<div>
  <input type="button" class="btn btn-primary" 
    ng-click="backToPeople()" value="Back"/>
  </input>
</div>

The screen shot below shows the different instances of the portlet configured to show different data.

app

The delete action can be performed on each instance without interfering with another. Also, a user can also navigate back and forth to different routes; in this case a user can view the details of a person and then navigate back to the people page without interfering with the routes of another instance. The example below shows how the portlet instances operate independently, even though they appear on the same page.

viewDetails

You may find some additional details that are helpful here: https://www.liferay.com/web/fimez/blog/-/blogs/angular-adventures-in-liferay-land

The post Creating Instanceable Liferay Portlets with AngularJS appeared first on Xtivia.

]]>
http://www.xtivia.com/instanceable-liferay-portlet-angularjs/feed/ 0
Tip # 7 – Disaster Recovery Plans – Top 10 Tips for SQL Server Performance and Resiliency http://www.xtivia.com/tip-7-disaster-recovery/ http://www.xtivia.com/tip-7-disaster-recovery/#comments Thu, 28 May 2015 17:23:19 +0000 http://www.xtivia.com/?p=7553 This article is part 7 of a 10 part series explaining the most common mistakes that I have seen in reference to SQL Server Performance and Resiliency. However, this post...

READ MORE

The post Tip # 7 – Disaster Recovery Plans – Top 10 Tips for SQL Server Performance and Resiliency appeared first on Xtivia.

]]>
This article is part 7 of a 10 part series explaining the most common mistakes that I have seen in reference to SQL Server Performance and Resiliency. However, this post is not all-inclusive.

Most common mistake #7: Disaster Recovery Plans

Often when people hear “disaster recovery plan” their first concern is cost. Disaster recovery plans don’t have to be expensive, expensive disaster recovery plans come from strict requirements.

About 10 years ago when I started as an independent consultant one of my first clients was contacting me to help build a disaster recovery plan for them. After our initial discussion I learned that some consulting firms had forecasted one hundred thousand dollars for solutions. Many large companies would look at that number as a bargain, however this client’s company made less than 50k a year. The data changed about once a year, and if the database was down a week or two it was questioned if anyone would even notice. It was easy to see that the hundred thousand dollar solution was extremely over engineered for this client.

Don’t ignore the basics
Disaster Recovery Solutions should start with two basic questions, what is the recovery point object and what is the recovery time objective.
• RPO – Recovery Point Objectives – To what point must the database be restored after a disaster? Another way to ask this question would be, how much data can be lost?
• RTO – Recovery Time Objectives – How much time can elapse after the disaster has occurred? Or, how long can your system can be down?
Depending on these answers additional questions will arise, however these two questions can help determine what potential solutions will work. SQL Server offers a number of solutions from Transaction Log shipping to AlwaysOn Availability Groups.

Pay Attention to the Details
Whenever I visit a datacenter for a client I make sure that I take some time to review how the cages are wired. On more than one occasion I have seen servers with redundant power supplies that have both of the power cords plugged into one circuit. This configuration will protect you if one of the power supplies goes bad, however if the circuit goes down the redundant power supply isn’t any help.

When executing a disaster recovery plan, ensure all the small details are double checked. If there is a single point of failure in the system, Murphy is going to find it.

Test
I can tell you the most common mistake I see, on a regular basis, with Disaster Recovery solutions is the lack of testing. Some testing is better than no testing, but the best testing is testing that mimic’s actual disasters. If there is a power outage for your servers and you have 5 min. to get everything moved, do you know the steps to complete, before the unlimited power supply loses its charge? What steps must you take if you don’t have the 5 minutes? I was working with the chief technology officer for a major education facility and he had another vendor telling him he was safe. Saying he didn’t have to worry about it. The contract was for a 15-minute recovery point. We reached out to the vendor and asked them to prove it.

The lesson here, perform regular realistic tests, if they don’t work, find out why, and make the needed changes.

If you have questions about SQL Server Disaster Recovery plans or need assistance with SQL Server in general, reach out to us! XTIVIA and we can assist you with adding resiliency for your business. Please don’t miss my other blogs regarding this topic. http://www.xtivia.com/contact-us

Top 10 Tips for SQL Server Performance and Resiliency
1. Improper Backups
2. Improper Security
3. Improper Maintenance
4. Not having a baseline
5. Max Memory settings
6. Change History

The post Tip # 7 – Disaster Recovery Plans – Top 10 Tips for SQL Server Performance and Resiliency appeared first on Xtivia.

]]>
http://www.xtivia.com/tip-7-disaster-recovery/feed/ 0
SoundCloud Display Portlet http://www.xtivia.com/soundcloud-display-portlet/ http://www.xtivia.com/soundcloud-display-portlet/#comments Thu, 28 May 2015 15:31:03 +0000 http://www.xtivia.com/?p=7532 The SoundCloud Display Portlet allows you to play and display your favorite tracks from SoundCloud.  All you need is a valid username from SoundCloud and you can play your public...

READ MORE

The post SoundCloud Display Portlet appeared first on Xtivia.

]]>
The SoundCloud Display Portlet allows you to play and display your favorite tracks from SoundCloud.  All you need is a valid username from SoundCloud and you can play your public tracks from the portlet. The free version of the portlet currently shows up to 3 playlists and each playlist can contain a maximum of 20 tracks.

Get Started
You can configure the portlet by going to portlet preferences, as shown below.

ScreenCapture1

SoundCloud Username: This is the SoundCloud username that determines which playlists and tracks will be retrieved. Only public playlists and tracks will display.
SoundCloud Tag: This field allows you to select the playlists you wish to hear. The portlet displays only playlists with the tag matching the value of this field.

Below is a screenshot showing the tracks and playlists you might see after configuration:
SCREEN2

Below is a mobile view screenshot:
SCREEN3

An empty playlist shows no tracks, as shown below:
SCREEN4

The post SoundCloud Display Portlet appeared first on Xtivia.

]]>
http://www.xtivia.com/soundcloud-display-portlet/feed/ 0