Pages

Google ads Horizontal

Wednesday, November 25, 2015

HOW TO INSTALL GIT IN LOCAL PC ?

Git is a distributed version control system, this program allows for non-linear development of projects, and can handle large amounts of data effectively by storing it on the local server.
This tutorial will cover some steps to install Git.
Step1: At first we install the dependent packages. Installing Git with apt-get is a quick and easy process.
            $sudo apt-get install git-core
Step2: After that you can download the latest version of GIT.
$wget https://git-core-googlecode.com/files   /git-1.8.1.2.tar.gz
Step3: After it downloads, untar the file and switch into that directory:
$tar -zxf git-1.8.1.2.tar.gz
$cd git-1.8.1.2
Step4: Run the following
$sudo apt-get install libcurl4-gnutls-dev libexpat1-dev gettext libz-dev libssl-dev
$make prefix=/usr/local all
$sudo make prefix=/usr/local install
$which git
/usr/local/bin/git
Step5: Check installation
$git –version
[If Git version in not show the result then restart the PC and install it again.]

INSTALL JDK 6 IN UBUNTU

Oracle java 6 jdk 64-bit
 $ wget –no-cookies –header “Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F” http://download.oracle.com/otn-pub/java/jdk/6u45-b06/jdk-6u45-linux-x64.bin
$ chmod u+x jdk-6u45-linux-x64.bin 
$ ./jdk-6u45-linux-x64.bin $ sudo mv jdk1.6.0_45 /opt $ sudo update-alternatives --install "/usr/bin/java" "java" "/opt/jdk1.6.0_45/bin/java" 1 
$ sudo update-alternatives --install "/usr/bin/javac" "javac" "/opt/jdk1.6.0_45/bin/javac" 1 
$ sudo update-alternatives --install "/usr/lib/mozilla/plugins/libjavaplugin.so" "mozilla-javaplugin.so" "/opt/jdk1.6.0_45/jre/lib/amd64/libnpjp2.so" 1 
$ sudo update-alternatives --install "/usr/bin/javaws" "javaws" "/opt/jdk1.6.0_45/bin/javaws" 1  IMPORTANT choose the java you installed as default  
$ sudo update-alternatives --config java 
$ sudo update-alternatives --config javac
Optionally you can set a JAVA_HOME env variable:
export _JAVA_HOME=/opt/jdk1.6.0_45/ export PATH=$PATH:/opt/jdk1.6.0_45/bin

HOW TO DO AUTOCOMPLETE DROP DOWN IN FTL FILE

At first add a style display:none like this way to hide the drop down.
<select name=”supplierPartyId” id=”AssignSupplier_supplierPartyId” size=”1″ style=”display:none”>
<option>1</option>
<option>2</option>
</select>
Then add javascript like following.
<script language=”JavaScript” type=”text/javascript”>
ajaxAutoCompleteDropDown();
jQuery(function() {
jQuery(“#AssignSupplier_supplierPartyId”).combobox();
});
</script>
WOW! autocomplete come in ftl file.
Have Fun!

HOW TO ADD UNIQUE KEY IN OFBIZ

If you want to make unique field with barcode, productid, facilityid you need to do the following in entity.
Just give an index name and set unique= true.
<index name=”FIXEDASSET_UNQBARCD” unique=”true”>
<index-field name=”barCodeNumber”/>
<index-field name=”instanceOfProductId”/>
<index-field name=”facilityId”/>
</index>

N.B: It does not work in derby database.

CREATE NEW COMPONENT IN OFBIZ

  • Go to your project folder/ Open your project folder
  • Right click on the bottom of the panel where free white space and choose terminal
  • Type sudo ant create-component
  • After that command terminal will prompt for some information like:

  1. Component name: nmm
  2. Component resource name: Nmm
  3. Webapp name: nmm
  4. Base permission: NMM
  5. Confirm: Y

  • sudo ant run-install to install new created component
  • sudo ant run or sudo ant start to run the project
  • To see the component you have to visit like http://localhost:8080/nmm