Skip to main content

Posts

Sending SMS using java code and Clickatell API

ClickatellSMS .java /**  * For executing the code you may need the following requirements 1. Clickatell  * account : You may have a user name, password and an API id. 2. Need to import  * two external jar files i. smsj-20051126.jar (Source :  * https://sourceforge.net/projects/smsj/files/) ii. slf4j-simple-1.0-beta4.jar  * (Source :  * http://www.findjar.com/jar/org/slf4j/slf4j-simple/1.0-beta4/slf4j-simple  * -1.0-beta4.jar.html;jsessionid=74226B10CDFB28C183745181681836C7)  */ import java.io.IOException; import java.util.Properties; import org.marre.sms.SmsAddress; import org.marre.sms.SmsException; import org.marre.sms.SmsTextMessage; import org.marre.sms.transport.SmsTransport; import org.marre.sms.transport.SmsTransportManager; public class ClickatellSMS { /** * @param args */ public static void main(String[] args) { // The username, password and apiid is sent to the clickatell transport // in a Properties Properties props = new

How can I change appearance of ADempiere ERP webui login page?

In trunk/zkwebui/theme/default there are a couple of files: login-left.zul, vendor-logo.zul, version-info.zul etc. File version-info.zul contains the server info data. You can change these files so the login page appears as you please. In file vendor-logo.zul there is the possibility of customization to own logo, links etc. Configuring the files in trunk/zkwebui/theme/default enables you to change the appearance of the webui login page to your needs. A build is needed.

Message box in ADempiere ERP

ADempiere have its own standard in its pop up messages. Normally we can use JOptionPane provided by  java. But you need to compromise its look and feel in your application. The following are the commonly used pop up box menthods in ADempiere in different instances. 1. mTab.fireDataStatusEEvent("Already open access","message",true); Used in callouts. 2. log.saveError("Invalid Date", message); Used in model classes. 3. ADialog.error(m_WindowNo, this, "FillMandatory", sb.toString());             return false; Used in client classes. If it is used in the higher build priority classes, you may have build error. 4. throw new IllegalStateException("Could not create accrual entry"); Used to throw exceptions in your code.

Adempiere Schema Diagram

From the below mentioned link, you may get the entire table schema in adempiere. http://globalqss.com/idempiere/1.0c/schemaspy/MaterialManagement/relationships.html

Cleanup of Ant build scripts

ADempiere 370LTS contains the following Ant build scripts which are required to build the entire system: tools/build.xml base/build.xml extend/build.xml client/build.xml JasperReports/build.xml serverRoot/build.xml serverApps/build.xml webStore/build.xml webCM/build.xml sqlj/build.xml posterita/posterita/build.xml zkwebui/build.xml install/build.xml More details in the following link http://www.adempiere.com/FR3409987_Cleanup_of_Ant_build_scripts

To add a external jar to ADempiere ERP

1. Get the jar file 2. Edit the Adempiere370\tools\Build.xml 3. Copy the jar file to Adempiere370\tools\ 4. Add the code fragment in the xml file     both in CSTools and CCTools eg:     <!-- Joda                -->     <zipfileset src="lib/joda-time-2.3.jar">         <patternset refid="manifest.exclude" />     </zipfileset> 5. If we are using the jar objects in base, client or zkwebui, edit respective build.xml files

To Debug Adempiere Web UI or Server

1. Open Adempiere\jboss\bin\run.bat 2. There is a command "rem set JAVA_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y %JAVA_OPTS%" 3. delete "rem" from the code , So server will listen to the port 8787 4. open eclipse -> Debug Configuration -> Remote Java Application , Then, create a new configuraion, Give the configuration name : 'AdempiereWeb'(anything) Give the Project Name, Connection Type : Standard(Socket Attach) Host : localhost Port : 8787 5. Run Adempiere370\utils\RUN_Server2.bat It will start and waiting to the response from the port 8787. 6. Debug the 'AdempiereWeb' configuration 7 set the debug break points on the class, It will detect the break points ; DONE