User:Trifonnt

From ADempiere
Revision as of 11:38, 15 June 2008 by Trifonnt (Talk) (GWT - Google Web Toolkit)

Jump to: navigation, search
This Wiki is read-only for reference purposes to avoid broken links.
Name This user real name is : Trifon Nikolaev Trifonov
Sourceforge logo.png This user has a Sourceforge account.
Wikipedia logo.png This user has a Wikipedia account.


Contents

About Me

I started my own company last year providing Adempiere and Compiere consultancy and development. I like developing business systems. This makes me headache from time to time, but also makes me very happy when i see system working.

  • I'm SUN Certified Programmer 1.4.
  • Graduated High School of Economics and Computer Science
  • Bachelor degree in Mathematics

As a member of ADempiere Council i like to review patches and SVN commits in order to be sure that code remains stable and system functional.

My Blogs

Trifon's Paid Services

Adempiere customized with client's own brand

  • Client must send two images.
  • Price 200 EURO.
  • Services created for small and mid-sized implementation companies which do not have own java developers and find modifying of source code impossible task.

Adempiere Virtual Appliance

  • Fully setup and ready to use Adempiere!
  • Standard users: Garden Admin and Garden Users can send emails!
  • VMWare with Linux - Fedora Core - 5/7
  • Adempiere
  • Sun JDK
  • Database - Oracle or Postgres
  • Jakarta James email server
  • Price 45 EURO

On demand Adempiere build

  • Build of Adempiere upon user request.
  • Price - 125 EUR
  • 17 EUR will be donated to Adempiere.

Users can donate smaller amount and when 125 EUR is reached a build will be made.

  • Build can include additional functionality like Fixed Asset or other not included in trunk.

Adempiere DVD by Trifon

  • DVD with complete Adempiere sources, Eclipse IDE and Sun JDK. Developer need to copy one directory to his local hard drive and can start customizing Adempiere.
  • Available version for Linux and Windows.
  • Price is: 30 EURO + shipping cost to your place or only 30 EUR and download from FTP Server.
  • Jakarta James email server.
  • Please contact me if you would like to have it.

  • Need urgent advice for your Adempiere implementation or need to talk with experienced Adempiere developer - call now to get friendly help. Ask for Trifon.
  • Price is 0.80 EUR per minute

Use Skype Prime service to call now. More info about Skype Prime


  • Ether Another pay per call service

  • 1500 EUR per week + ticket + hotel
  • Training plan can be customized to fit client needs.
  • Example training plan:
1) General overview of Adempiere ERP-CRM system.
2) Introduction to user interface.
3) How to setup new Company in Adempiere.
4) How to setup new Organization in Adempiere.
5) How to create and import Chart of Accounts.
6) How to create new Product, Product Category and set Product Price and Price List.
7) How to create hierarchical Categories of Services and Products (categories, subcategories, etc)
8) How to import Products from external sources/systems.
9) How to create Discount Schema and Price List and apply specific discount/overcharge for specific Product Group/Product, e.t.c. How to create Discount based on a percent or fixed ammount.
10) How to create new Business Partner(Client, Vendor and Employee).
11) How set Credit Limit for Business Partners. Apply a credit limit to a client and Adempiere lock sales when limit is reached.
12) How to Assign discount to specific Business Partner, and change it in every sell.
13) How to import Business Partners from external sources/systems.
14) How to create Purchase Order.
15) How to track purchases: list purchases that are not received, due dates.
15) How to create Material Receipt.
16) How to create Invoice (Vendor)
17) How to create Sales Order.
18) How to create Shipment (Customer)
19) How to create Shipment Confirmation.
20) How to create Invoice (Customer).
21) How to create Payment.
22) How to match Purchase Order - Material Receipt - Invoice (Vendor).
23) How to match Sales Order - Shipment - Invoice (Customer).
24) How to create Cash Payment and Cash Receipt.
25) How to create Bank Account and Bank transaction.
26) How to modify Print Format of documents.
27) How to setup emails of Adempiere users and send emails with attached document(Purchase Order, Invoice, e.t.c) to clients.
28) How to create Users and assign User permissions.
29) How to setup Window, Tab and Field permissions for specific Roles and Users.
30) How to share data between Organizations and users.
31) How to setup records to be readable only by their creators.
32) How to setup taxes.

</pre>

  • If you need training or support for EDI in Adempiere, please do not hesitate to contact me.
  • Prices start from 30 EUR per hour.

  • Leading Open Source Enterprise Portal
  • JSR-168 compliant
  • Business Friendly Open Source License: MIT License


  • Suitable for:
    • Small applications which need to be developed from scratch
    • Development of applications which must be part of a Web Portal.
    • Applications based on OpenXava can run on any DB which is supported by Hibernate.
    • Licensed under LGPL. You can develop commercial application using OpenXava.
    • Applications based on OpenXava can run on any application server (Tomcat, JBoss, WebSphere, etc).
    • Applications based on Openxava have easy integration of reports made with JasperReports.

Trifon's contributions to OpenXava

  • Please contact me for quotation.

  • Development of java applications.
  • Please contact me for quotation.

Trifon's projects based on Compiere/Adempiere

Project 0 (area: Supply Chain Management)


Migrated from Microsoft Access based application to Compiere ERP-CRM
Company is the biggest distributor of newspapers in Bulgaria.
Huge migration effort.
Imported definitions of:
Vendors, Customers, Sales Agents, Products, Price Lists, Accounts, Purchase Orders, Sales Orders, Billing addresses, Warehouses.
Imported ~  20 000 Product definitions.
Imported ~ 100 000 Purchase Orders.
Imported ~ 100 000 Sales Orders.
Developed new module in Compiere ERP-CRM in order to fit company needs in Product Distribution area.
Developed mobile application and data synchronization module for real time tracking of products.
Implemented:
Product Attributes, Purchase Orders, Material Receipts, Invoices (Vendor), Sales Orders, Shipments, Invoices (Customer), Warehouse management, Price Lists, Accounting, Discount Schema.


Project 1 (area: ERP)

Migrated from 20 years old application to Compiere ERP-CRM.
Huge effort in import of data from legacy system.
Imported definitions of:
Vednors, Customers, Sales Agents, Products, Price Lists, Accounts, Purchase Orders, Sales Orders, Shippers, Billing addresses, Discount Schema.
Developed import functionality in Compiere ERP-CRM.
Developed Slading Scale Commissions in Compiere ERP-CRM.
Developed Bill of Ladding in Compiere ERP-CRM.

Implemented:
Purchase Orders, Material Receipts, Invoices (Vendor), Sales Orders, Shipments, Invoices (Customer), Warehouse management, Price Lists, Accounting.


Project 2 (area: ERP)

Migrated from Microsoft Solomon to Compiere ERP-CRM.
Fast migration path.
Imported definitions of:
Vendors, Customers, Products, Accounts.
Developed better user interface to fit needs of users used to work with Microsoft Solomon.
Developed export from Compiere ERP-CRM to People Soft system.
Improved traceability of Orders to fit needs of purchasing agency.

Implemented:
Purchase Orders, Material Receipts, Invoices (Vendor), Sales Orders, Shipments, Invoices (Customer), Warehouse management, Price Lists, Accounting.


Project 3 (area: Supply Chain Management)

Extension for Compiere MFG-SCM project.
Developed java application for java enabled mobile phones.
Developed web application.
Developed connection module that enables data scanned with bluetooth enabled barcode scanner to be transferred to mobile phone and after that to web application.
Application allows factory to track in real time product/part availability.
Used Java, JSP, Servlet, AJAX and J2ME technologies.

Trifon's Recent thoughts

Strange live

Working in Open Source space is very hard sometime or probably most of the time. Contributor's work is in public space and everyone can see it and make comments. I do not speak only for source code, but wiki contributions, forums posts and so on. Contribution to Open Source project has many faces and this is good as all we are good in different areas. Open Source project gather contributors at one space and gives them freedom to express their self. All this is very very nice, BUT, there is always one big BUT. This word makes me sad sometimes, not the word itself but the words which come after BUT. For me Open Source first of all means Free Will to do something, FREE will to comment something, and so on. Just FREE, like i'm free to do it. I do not want anyone to push me to do anything in my Open Source project especially when this man is a man like me, who works side by side with me. I understand that first job of people is for commercial companies with strict rules for everything, but applying rules to Open Source most of the times leads to mistakes. In Adempiere project i was one of the developers who expressed his opinion against rules and i made it not because i do not like rules, but because rules can't work in the Free world. At least rules which demand a contributor to do something when other contributor contribute. I do not see how a contributor can demand other contributor to review his contribution. Contributor can ask for opinion of other contributor, but trying to push other contributor to do something is just something which is not going to happen. Words 'demand' and 'rule' live outside the Free will world of Open Source and are not compatible with the Free world of Open Source. In Adempiere project we have one prove of my words - Policy which demanded a peer review of committed code was reverted, because trackers were left in not appropriate state (in most of the cases second developer do not took the demanded action). I write this words because i want to remember my thoughts and writing is the best way to save thoughts in time. I predicted that push of rules in Adempiere would fail, but my prediction increased my bad karma image and my image of complainer which makes me sad. I'm not a complainer, i'm a contributor. I was trying to show to other developers that rules will fail but i didn't found enough understanding at that past moment. Sometimes i wish not to see such bad things, i wish to be calm and nice guy applauding nice contributors and consuming their work anonymously. Trifonnt 10:24, 15 February 2008 (EST)


Open Source’s Missed Opportunity

Trifonnt 03:07, 18 January 2008 (EST)

Requirements of very small companies

  • sf.netInteresting post from OpenBravo forums.

How customers should approach Open source vendor

Very good post from Matt Asay


Yes, I get quite a few requests to have Alfresco integrate with JBoss and Liferay, and I've done business with both. But I didn't need a committee to tell me that. Customers did. Customers have yet to request integration with Compiere, for example, so we haven't done it. Someday we probably will. But when customers vote with dollars.


Interesting requirement: Map Your Contacts By Region


Select a group of accounts based on geography...let's say all accounts in Texas. Then be able to map those accounts on an interactive map that will show the locations of each of those accounts as push pins. When you roll over each push pin, it pops up the name of the account and any specified modules like opportunities, calendar etc. Another cool feature would be select any two accounts to calculate the distance/drive time and even download directions.

Trifonnt 02:07, 11 December 2007 (EST)


Number of Adempiere developers

22 May 2008.

Adempiere has 70 registered developers in sf.net.

trifon 03:28, 22 May 2008 (EDT)


11 December 2007.

Adempiere has 56 registered developers in sf.net.

Trifonnt 02:07, 11 December 2007 (EST)

Risk to be Open Source developer

Here i will try to identify some of the negative sides of being Open Source developer. This are real examples which happen to me and make me sad.

  • Help a user and after few days/weeks/months receive a spam message from the company where user work or from him personally.
    • NEVER help a user in private emails. Private emails are for paid support only!
  • Many times colleagues or other people tell me that i must increase my prices. It sounds quite good as advice, but the bad side is when they start working with you they are not so happy to pay you recommended by them price. ALWAYS RESPECT YOUR PRICE!

It is your price which is good for you and under your conditions.

  • Many times Managers invite me on a beer and pay the bill. In a return after few days they send me contacts of their employees to help them with technical question. Bad understanding of Open Source model. The fact that source are free do not gives them right to think that i will help their employees for free. It is developers time which must be paid, no matter if he works on Open Source project or commercial project.

Trifonnt 14:43, 1 November 2007 (EDT)

Idea for additional meta data: AD_Table NamedQuery

JPA has very nice feature 'Named Query'. It would make Application Dictionary more reach if Adempiere has such feature. This idea is very near to Finders, but it allows more wide range of queries. Trifonnt 19:17, 26 October 2007 (EDT)


Idea for additional java interface: DocumentConversion

Adempiere ERP-CRM has processes which generate new document from existing document. For example Generate Invoice from Sales Order. This are quite useful processes, but currently they are not designed with the idea for extendability's. For example if user define new fields in Sales Order and would like to see values of this fields transfered to Invoice and Shipment later then he must modify source code of GenerateInvoice and GenerateShipment processes. This is not easy and i think that design can be improved. Possible improvements:

  • Define new java interface and invoke classes which implement this interface. This require changes in existing GenerateXxx classes.
  • Define new structure in Application Dictionary which will describe which fields must be transfered during Document Generation process.

Trifonnt 17:59, 26 October 2007 (EDT)


Data Services

Rob Cardwell has very interesting article: Data Services: A Fundamental Building Block of SOA.

In middle of this article i found that Adempiere has this beautiful functionality.

This approach requires tools that can capture existing data structures from reverse-engineered relational database schema's, and can map these existing structures into more business-oriented data views.

Adempiere AD(Application dictionary) on which all tables and windows are based provides meta data for all data structures in the system and even for all graphical components! But with Adempiere user do not need to reverse-engineer database system, all data structures have business oriented view by design.

Trifonnt 22:51, 28 September 2007 (EDT)


Why fights in Open Source projects are bad?

Link to Adempiere post: here

What an ERP system MUST NOT allow user to do?

Recently i read a urgent post in OpenBravo forum.

i have deleted "big bazzar and System", the default clients and i can't enter to OpenBravo now what is the solution?

Interesting? This sounds like:

i have deleted "Local Disk C and D" and i can't enter my windows system what is the solution?

One of the most valuable ideas in Compiere is IsActive column and restriction to delete records in most of the tables. It is good if user can delete some Client, but System records must never be deletable! This makes another question to me. Is ERP for every user? My answer at this moment is NO. User who implement ERP must be very careful, conscious and most importantly must always make backup of data.

Trifonnt 17:01, 4 September 2007 (EDT)


OpenBravo Green?

Recently OpenBravo Green came into my mind(Jordi Mash told me about OpenBravo Green at Adempiere conference in Belrin) and i decided to review it and to check status.

First of all they have good document with intentions and requirements. Good number of frameworks and technologies are listed at this page: Design principles for Openbravo Green

They have a prototype and online demo, but i failed to login into demo page. OpenBravo Green demo

Source code of prototye was more interesting for me and it was the reason that made me write this post.

  • I expected to see more commnents and more TODOs. It is prototype and important is to see what developer intend to do than what has been done. Visibility of ideas and intentions is more important than actual work finished. This is not a minus it is just a note and wish from my side.
  • Source code dissapointed me, because:
    • I saw one regular web based application. No trace from the idea of Model Driven Architecture or Application dictionary. Probably model classes were generated by some tool, but no evidence or comment in the code or in the wiki pages.
    • Only one author, no participataion from community.
    • Author is Adrian Romero, who is very good POS developer(Tina POS), but i doubt about his experience in ERP systems and Application Driven systems. It looks that he is the only active visible OpenBravo developer.


Adempiere: Which is first Data or Code?

Recently i modified very deeply core of Adempiere in order to simplify development and to speed it up. I wasn't sure that such modification is possible and i was very happy when it happened and when at the end it even worked. After some tests i decided to revert to old version of persistent classes (X_xxx) and i deleted newly generated classes and started well known old GenerateModel, but... It failed because GenerateModel needs persistent classes in order to connect to Database. But developer can't generate persistent classes because GenerateModel can't connect to DB. So we got cycle... And here comes my question: Which is first Data or Code? I think that design of GenerateModel can be improved:


Trifonnt 12:55, 19 August 2007 (EDT)

Does Community Open Source project need roadmap?

  • What does Roadmap means for a project?
  • Goolge define:Roadmap says few things, but i like mostly one of them:
A program for future development indicating what will be developed and when.

My opinion is that it must be more like:

A program for future development indicating what will be developed, by who will be developed and when.
  • Three very important conditions in order to have Roadmap:
    • Functionality

This is easy to be done. All we need functionality and all we with pleasure advice what to be done. So i think that here ANY project can produce good number of items.

    • Who will develop it?

UPS, here the problems come. In order to develop something WE need knowledge, so from the big list of ALL only developers can participate in development. All this means that in Roadmap, Open Source project must identify developers or companies that will create new functionality. Ok, let's say that i would like to build this new functionality and i write my name against the feature.

    • When functionality will be developed?

Who knows? Who can answer? Who is responsible? It looks that WHEN brings more question than it answers. In Open Source project if no one commit his time to develop given functionality no one can answer the questions. Moreover if someone commit his free time does anyone has rights to push him for specific date? I do not think so... It is developers free will to participate and create functionality. And as you guess in most of the time it is hard to find free time for building big functionality.

My personal opinion is that spending time to create Roadmap without committed developers/companies against specific functionality is just good wast of time. Even worst it is confusing for the end user who read Roadmap and wait for new version and new functionality.

My big excuse to the users who will be frustrated from ssch Roadmaps. Trifonnt 19:31, 8 August 2007 (EDT)

To be Adempiere Developer or Adempiere Businessman(Seller)

I work with Adempiere/Compiere since more than 3 years. I must say that i like the product and area very much. I like to develop extensions for Adempiere and i do it everyday for 10-12 hours a day and sometimes more. I know it is not healthy, but... But last weeks i started to feel tired from all the rules for Developers and all fights in forums and in email lists. Also i realized that Business people around Adempiere do not have such limitations as Developers. For example:

  • On www.adempierebusiness.com there are 30 registered Implementation Partners. Good number.
    • What does this Implementation Partners give to Adempiere project?

Some of them nothing. Well business people say that if we limit and ask for money then this will stop add option of Adempiere. But may i ask how developers can survive?

    • What they get?

FREE Advertisement. Perfect... I think that Adempiere is the only project that allows such thing. Most of other Open Source projects take money for advertisement and put money back into the project.

  • I have read that some of Adempiere Implementation Partners do not work for less than 50 000 USD. Amount which i as developer do not had chance to see till now. Who knows someday Clients may find that contracting developer is much faster and cheaper...
  • User expect developers to provide FREE help in Adempiere forums, which gives additional workload to developers.
  • Developers are expected to be open and expose all their information to community.

So:

  • I found that i had made mistake.

It looks that to be Businessman and make money around Adempiere is much easy and painless than to be Adempiere developer. :(

  • I think to reconsider my role in Adempiere project. Role of Implementation Partner looks much safer and giving more incomes.
  • I should start making advertisements from now... So here it is: I can provide Adempiere on Site Implementation for 1500 EURO / week + expenses(hotel + ticket) in case i need to move to other location.

Adempiere trackers

Submitted by Trifon and Assigned to Trifon

Assigned to Trifon

Adempiere contributions

Functionality Contributions

EDI @ Adempiere - Sponsored Development: EDI Import/Export

Replication @ Adempiere - Sponsored Development: Replication

  • HermesJMSA console that helps you interact with JMS providers making it easy to browse or seach queues and topics, copy messages around and delete them.


JMS @ Salesforce.com:


Swing POS @ Adempiere - Sponsored Development: Swing POS

Cash Payments @ Adempiere - Sponsored Development: Cash Payments

Simplify and Speedup Adempiere development

SF.NET forum post here

Feature Requests:

This enhancement allows Adempiere developers to:

  • Speedup thier day to day work and to have more Object friendly code.
  • Work with Java Interfaces instead of Java Classes.

For example:

    • Adempiere - Old code
Trx trx = Trx.get(Trx.createTrxName("Test"), true);
trx.start();

MAlert alertOldWay = new MAlert(Env.getCtx(), 100, trx.getTrxName());
log.info(alertOldWay.toString());
		
X_AD_AlertProcessor alertProcessorOldWay = new X_AD_AlertProcessor(Env.getCtx(), alertOldWay.getAD_AlertProcessor_ID(), trx.getTrxName());
log.info("alertProcessorOldWay.getAD_AlertProcessor_ID = " + alertProcessorOldWay.getAD_AlertProcessor_ID());

alertOldWay.setDescription("Trifon test");
//--- Save; 
resultSave = alertOldWay.save();
log.info("resultSave = " + resultSave);
		
System.out.println("New value of Description = " + alertOldWay.getDescription());

trx.commit();
trx.close();
    • Adempiere - New code
Trx trx = Trx.get(Trx.createTrxName("Test"), true);
trx.start();

I_AD_Alert alert = new MAlert(Env.getCtx(), 100, trx.getTrxName());
log.info(alert.toString());

I_AD_AlertProcessor alertProcessor = alert.getI_AD_AlertProcessor();
log.info("I_AD_AlertProcessor.getAD_AlertProcessor_ID = " + alertProcessor.getAD_AlertProcessor_ID());

alert.setDescription("Trifon Description modified!");
//--- Save; PO.save(PO) must be static method!!! Two way of usage: PO.save(Object) or PO.save(PO)
//resultSave = PO.save((PO)alert); 
resultSave = PO.save(alert);  // Overloaded save method; For simple usage!
log.info("resultSave = " + resultSave);
				
System.out.println("New value of Description = " + alert.getDescription());

trx.commit();
trx.close();

This modificationas make Adempiere code closer to Hibernate

    • Hibernate code. Example code from here.
Session session = HibernateUtil.getSessionFactory().getCurrentSession();

session.beginTransaction();

Event theEvent = new Event();
theEvent.setTitle(title);
theEvent.setDate(theDate);

session.save(theEvent);

session.getTransaction().commit();

Proposed by Hengsin modification:

Add second interface I_Persistent with one method save()

public interface I_Persistent {
	public boolean save();
}


  • Using the coding pattern below instead of the old new MAlert(Env.getCtx(), 100, trx.getTrxName()) approach would ensure your code always using the correct model class.

How to load:

// to load existing record
int AD_Alert_ID = 100;
MTable table = MTable.get(Env.getCtx(), I_AD_Alert.Table_ID);
I_AD_Alert alert = (I_AD_Alert)table.getPO(AD_Alert_ID, trxName);

How to create new record:

// to create new record
MTable table = MTable.get(Env.getCtx(), I_AD_Alert.Table_ID);
I_AD_Alert alert = (I_AD_Alert)table.getPO(0, trxName);
...


  • Classes which override save() method:
org.compiere.process.DocActionTemplate
org.compiere.model.MClient
org.compiere.model.MClientInfo
org.compiere.model.MSystem

Generated Model class must implement both interfaces and extend PO.

Weak sides that need to be improved:

  • Hard coded Document Engine
  • Hard coded lookup of model class
  • Hard coded list of document type for new client
  • Incomplete Security Implementation
  • No plugin/module support. Both ADCK and 2Pack support dynamic deployment of AD changes but doesn't address the need to deploy java code extension ( especially problematic/messy if your extension needs to use additional third party library).
  • Incomplete web client port
  • Incomplete workflow engine implementation
  • Various swing client bug and limitation
Links

Planned Contributions and Tasks

  • Restrict form "Generate Invoices (manual)" to show only public records (hide locked records) BUG - 1713337
  • Restrict form "Generate Shipments (manual)" to show only public records (hide locked records) BUG - 1713317

Interesting bugs/patches/Feature Requests

Feature Requests

My favorite readings

General


  • OpenQA - Selenium a test tool for web applications. Selenium tests run directly in a browser, just as real users do.
  • ImageMagick v6 Examples -- Creating ThumbnailsImageMagick® is a software suite to create, edit, and compose bitmap images. It can read, convert and write images in a variety of formats (over 100) including DPX, EXR, GIF, JPEG, JPEG-2000, PDF, PhotoCD, PNG, Postscript, SVG, and TIFF



Interesting


Pivot Tables


Mozilla - Firefox Extensions

Project/Time/Bug management

  • Project Dune Web-based issue tracker. Integration with subversion or cvs, code inspections in the browser, SCRUM project management.
  • Open Proj - free, open source desktop alternative to Microsoft Project.
  • Open Workbench - Open source project similar to Microsoft Project.
  • workeffort Businesses perform work efforts within their organizations to accomplish tasks such as producing products, developing software, mantaining assets etc. This system helps in managing these kind of tasks. It also includes a time tracking system.
  • eHourTimesheet Management
  • OpenTimeEclipse, SWT/JFace, Hibernate, embedded relational databases, XML.
  • Matins Bug TrackerPHP

Communication

"I guess I should warn you, if I turn out to be particularly clear, you've probably misunderstood what I've said."


Software Engineers Salaries

Open Source Magazines and Articles

Magazines


Articles

We tried once to create an open-source developer out of a normal developer, but it completely failed.
We never tried it again. Truth be told, I had an aversion to it.
An open source developer is a self-starter. 
He's competitive - this is someone that wants to prove that they can do something better than you can. 
As such, it's a great recruitment/qualification vehicle, because you can see their work before you ever think of hiring them. 
You can see if they'll work out for the company. 
We definitely took that approach to hiring.
, but don't beg for help, the guys who work owe you nothing.

OSS Etiquette & Culture


How to ask questions in public forums?

Open Source Models

Giving It Away

My wish list - Books

Ordered by my desire!!!


Online books

with the J2EETM Platform, Second Edition]

Engine 6.20 - Administration Manual] Something which i have been part of!!!

Articles and posts from Martin Fowler

Financial based

Read and respond to this message at: https://sourceforge.net/forum/message.php?msg_id=4366156 By: drhayderaziz

I think that Adempiere would get a lot of kudos if Adempiere went the XBRL route www.xbrl.org for financial reporting. For listed companies (and even for unlisted) XBRL will be the way to go especially for any international company that has to consolidate accounts from multiple legal entities in multiple countries in a standardized manner. This would be an essential component of an ERP system in the 2008-2009 time frame. If Adempiere would have its COA structured the XBRL way and have XBRL compliant financial statements at company/consolidated level it would be an AMAZING value proposition to so many organizations.


Budgeting


CS and ROT explained

In UK two methods of trading are popular with manufactures and wholesalers - Consignment Stocking(CS) and Retention of Title (ROT). The question is does ERP handle these types correctly?

CS is where stock is supplied and title transferred on sale to the end user.

ROT is where title is transferred on payment by the wholesaler.

This means that some goods held in the wholesalers warehouse will not belong to him and should not be counted as assets until title is transferred in the case of ROT and not at all in the case of CS unless the wholesaler uses ROT himself.


Bank/SWIFT oriented

  • WIFEWIFE is an open source Java library for SWIFT messages parsing, writing and processing. The components are heavily tested and running in production environments since 2005.

Non IT Technology

Social networks

 Call me now http://www.bitwine.com/presence/1/25850.gif


Developer oriented social network


The Semantic Web - Information sharing - machine-readable way

  • The Friend of a Friend (FOAF) projectThe Friend of a Friend (FOAF) project is creating a Web of machine-readable pages describing people, the links between them and the things they create and do.

Adempiere


http://adempiere.globalqss.com/cgi-bin/get_ID?
USER=user
&PASSWORD=pass
&TABLE=AD_Column
&ALTKEY=
&COMMENT=SomeCommentHere
    • Show log
http://adempiere.globalqss.com/cgi-bin/showlog?AD_Column


Adempiere Brazil Localization effort people that are cooperating with Adempiere LBR (LBR = Localization Brazil). Those are their names, followed by their sourceforge username.

Eduardo Montenegro (emontenegro) Alvaro Montenegro (amontenegro) Mario Grigioni (mgrigioni)


Adempiere commit schema

  • Mentor/Commiter approach approved with 11/11 votes, according to this thread.

VERY IMPORTANT

Incoming events

Time: xx:xx GMT Day: Tuesday June 26 Venue: IRC channel #adempiere-team (on irc.freenode.net)

1 - Xxx

2 - Xxx

Possible integrations with external systems

  • Hospital Information System
    • care2x Care2x is a hospital information system which has lots of feature but no accounting at all.
    • NetEpi Open Source, network-enabled tools for epidemiology and public health practice.
    • OpenMRS



Adempiere Application dictionary vs. Axapta Data dictionary

Performance tests & results made by me

This are slower than on my laptop. On laptop result was around 17 products / second.

Processors..........: 2 x Pentium2 800MHz
RAM.................: 2 GB
OS..................: Linux, Fedora Core 5
DB..................: Oracle XE
JDK.................: Sun JDK 1.5.0_11
Adempiere version...: 3.3.0
Note................: Adempiere client on the same machine as DB.

Tables where records are inserted: 
AD_TREENODEPR     1095095
M_PRODUCT         1095095
M_PRODUCT_ACCT    1095095
M_PRODUCT_TRL     1095095

Performance table

Start Time      = Thu Aug 09 04:57:01 EEST 2007
End Time        = Thu Aug 09 05:13:54 EEST 2007
Duration(ms)    = 1012585
Duration(sec.)  = 1012
Duration(min.)  = 16
Products        = 5000
Time(seconds)   = 1012
Produsts/Second = 4.9407115

Start Time      = Thu Aug 09 05:17:04 EEST 2007
End Time        = Thu Aug 09 09:14:23 EEST 2007
Duration(ms)    = 14239657
Duration(sec.)  = 14239
Duration(min.)  = 237
Products        = 144000
Time(seconds)   = 14239
Produsts/Second = 10.11307 


Start Time       = Fri Aug 10 03:43:13 EEST 2007
End Time         = Fri Aug 10 07:42:25 EEST 2007
Duration(ms)     = 14351454
Duration(sec.)   = 14351
Duration(min.)   = 239
Duration(hours.) = 3
Products         = 144000
Time(seconds)    = 239
Produsts/Second  = 10.03
 
Start Time       = Fri Aug 10 13:00:23 EEST 2007
End Time         = Fri Aug 10 16:58:42 EEST 2007
Duration(ms)     = 14298664
Duration(sec.)   = 14298
Duration(min.)   = 238
Duration(hours.) = 3
Products         = 144000
Time(seconds)    = 14298
Produsts/Second  = 10.071339

Start Time       = Fri Aug 10 19:59:38 EEST 2007
End Time         = Sat Aug 11 03:59:55 EEST 2007
Duration(ms)     = 28817002
Duration(sec.)   = 28817
Duration(min.)   = 480
Duration(hours.) = 8
Products         = 288000
Time(seconds)    = 28817
Produsts/Second  = 9.994101

Start Time       = Sat Aug 11 17:53:38 EEST 2007
End Time         = Sun Aug 12 02:18:17 EEST 2007
Duration(ms)     = 30278812
Duration(sec.)   = 30278
Duration(min.)   = 504
Duration(hours.) = 8
Products         = 288000
Time(seconds)    = 30278
Produsts/Second  = 9.511857

Postal Code Web Service


Interesting Proposal for Web services

1. Products - When entering a new product, call an UPC/EAN webservice (http://www.gepir.org/) that validates a product UPC/EAN and populates the item description and trade info (size, weight, etc).

2. Business Partners - When entering a new Business Partner, call a Company Registrar to validate (and populate) company registration / vat numbers and registered address, directors, etc.

3. Credit Checking - When entering a new Business Partner, call a webservice to perform a credit vetting / check after which the report can be populated into a credit check table or attached to the record.


Comparison of Posterita Web UI and Robert Klein Ajax Web UI

  • Robert Klein Ajax is more usable than Posterita WebUI
    • Attachment works in Robert Klein but not in Posterita.
    • Grid of Posterita is mess up.
    • Scrolling and navigation are mess up in Posterita.
    • Decimal point of numeric has many zeros in Posterita.
    • Robert Klein Web UI runs fast than Posterita.

Adempiere Frequently Asked Question

Practical Use of Document Type & Sequence

  • What is its real purpose of Document Sequence

The purpose is to have different sequence (Document No) for each document type. For example: Imagine you want to difference the PO depending on what you buy. You could have the document type "Purchase Order-A" and the "Purchase Order-B".

"Purchase Order-A" --> Sequence (Document no):A00001 "Purchase Order-B" --> Sequence (Document no):B00001

So for the same transaction (Purchase order) you can difference distinct sequence numbers.


How to create new user and restricted access rights?

Define Role for User Create Role:

Click on the General Setup -> Security -> Role
Click on the New button(ex: MyRole).
Select the Organization from drop down.
Enter the Name for role.
Select the User Level from User Level drop down.
Tick on the Manual Checkbox.
Click on the Save button.
Click on the Grant Access button (eg:Access to All for Sale Module).
Select the Module from drop down that you have to include.
Select the Access To from drop down that you have to include.
Click on the OK button.
Click on the Save button.

Click on the Org Access tab.
Select the Organization for newely defined role.
Click on the Save button.

Create User:

Click on the General Setup -> Security -> User.
Select the Organization from organization drop down.
(Note: user organization and define role organization must be same.)
Enter the Name for user(ex: ABC). 
Set the Password for user.
Click on the Save button.

Assign Role to User:

-     Click on the User Roles tab. 
Select Role from drop down(ex:MyRole).
Click on the Save button.

Click on the User tab. Select the Default Role from drop down(ex:MyRole). Select Default Client from drop down. Select the Default Organization from drop down. Click on the Save button. Login as ABC user.


How to modify Invoice Posting?

Default Adempiere Account posting:

----------------------------------------------------------------
Account                     Debit               Credit
----------------------------------------------------------------
Account Receivable         55.000.000         
   A tax                                        5.000.000
   Service Revenue                             50.000.000
----------------------------------------------------------------


Desired Adempiere Account posting:

----------------------------------------------------------------
Account                     Debit               Credit
----------------------------------------------------------------
Account Receivable         52.750.000                           
An Account                  2.250.000 - which is 4.5%x50.000.000
   A tax                                        5.000.000        
   Service Revenue                             50.000.000
----------------------------------------------------------------
<pre>

Desired functionality can be achieved with Account splitting.
Rule must be defined in the system which will split posting into Account Receivable on two account entries.

=== Implementor hints ===

==== Show where products are located ====
Submitted By: Jan Kantert (jab_doa)

Summary: Show where products are located

sf.net tracker: [https://sourceforge.net/tracker/?func=detail&atid=879335&aid=1768749&group_id=176962 here]


Initial Comment:
Log in as System Administrator. Select "Application Dictionary" -> "Window, Tab & Field" -> Name = Product

Click on "Tab". 
Go to the end of the list and add a new row. Zoom in and set Table to "M_Storage_M_Storage", Name to "Located at", Description to "Where are my units located?", Tab Level to "2" and check "read only". 
Now save and click on "Create Fields". Thats it. Now you can see where your units are when zooming into a product.

==== Security ====
Submitted By: Armen (armenrz)

Summary: Security

sf.net tracker: [https://sourceforge.net/forum/message.php?msg_id=4451508 here]


1) ADempiere support role based security - Role window.
2) Role Data Access. You can also play around with SQLWhere in Window, Tab & Field.

Example:
(instr('@#User_Level@','C')<>0 OR C_BPartner.CreatedBy=@#AD_user_ID@ OR C_BPartner.SalesRep_ID=@#AD_User_ID@)

For pricelist, there's one place you can't hide price from user, which is  Product Info. You need to modify some codes to do this. What I did is add IsCanViewPrice option in Role so now each role can be set either they can view price or not.


==== Bank Transfer tips ====
Submitted By: usman88

Summary: Bank Transfer tips

sf.net tracker: [https://sourceforge.net/forum/message.php?msg_id=4467580 here]

* [http://www.adempiere.com/wiki/index.php/Bank_to_Bank_Transfer_Transaction_tips Bank to Bank Transfer Transaction tips]

Small tips to handle 1 source Bank to 1 recipient Bank transfer transaction. 

1. Create new cash journal.

2. Select appropriate cash book ( in my case i use dummy cash book to serve this transaction)

3. Next go to cash line and create a new line and select cash type as bank transfer.

4. Then select source bank account and type in transfer amount

5. Create 2nd line as in step 3. 

6. This time select recipient bank account and type in transfer amount but in negative sign.

7. Back to cash journal tab, complete and post it.

8. To finalize it create, complete and post Bank statement for each bank account.


PS. Above tips can be use for more complex scenario such as transfer from 2 bank to 1 recipient.

==== Listing a BOM within a BOM ====
Submitted By: stingreye

Summary: Listing a BOM within a BOM

sf.net tracker: [https://sourceforge.net/forum/message.php?msg_id=4369782 here]

Here is the view in Oracle... Because we have so many parts we ended up doing
a materialized view that we update with a process in Compiere everytime we
 change
a BOM.  We did that so we could report off of this view faster.

I am sure someone out here could write a much better query than this but here
is what I did.  Basically, created a view on top of itself so that the parent
records would null.  Then used the connect by clause to generate the hierarchy.
You will also notice the use of connect_by_root = Top level of bill.
Connect_by_ISLEAF = bottom level of bill.  Level = what level of the hierarchy.

<pre>
CREATE OR REPLACE VIEW BOM_INDENTED
(TOPLEVELID, TOPLEVEL, TOPLEVEL_DESC, PRODUCTNUM, PRODDEC, 
 M_PRODUCTBOM_ID, BOM_LEVEL, BOMQTY, DESCRIPTION, AD_CLIENT_ID, 
 AD_ORG_ID, ROWNUMBER, BOM_LEVEL_NUM, BOTTOMCOMPONENT)
AS 

SELECT   CONNECT_BY_ROOT M_ProductBom_ID AS TOPLEVELID,CONNECT_BY_ROOT Value
AS TOPLEVEL,CONNECT_BY_ROOT b.DESCRIPTION AS TOPLEVEL_DESC, Value AS
 ProductNum,
b.DESCRIPTION AS ProdDesc, M_PRODUCTBOM_ID,LPAD(' ',2*(LEVEL-1)) ||
 TO_CHAR(LEVEL)
BOM_Level, BOMQTY, a.DESCRIPTION,a.AD_CLIENT_ID, a.AD_ORG_ID, ROWNUM, LEVEL,
Connect_By_ISLEAF
  FROM 
  
-- part 2 subquerry combining top level and bom to create null to start from
( SELECT
 "M_PRODUCT_BOM_ID","AD_CLIENT_ID","AD_ORG_ID","ISACTIVE",--"CREATED","C
REATEDBY","UPDATED","UPDATEDBY",  (remove becuase unnnecessarry)
"LINE","M_PRODUCT_ID","M_PRODUCTBOM_ID","BOMQTY","DESCRIPTION","BOMTYPE"
FROM M_PRODUCT_BOM

UNION
-- part 1 the tope level querry creating the nulls that is combined in part 2
SELECT M_PRODUCT_BOM_1.M_PRODUCT_BOM_ID, M_PRODUCT_BOM.AD_CLIENT_ID,
M_PRODUCT_BOM.AD_ORG_ID, M_PRODUCT_BOM_1.ISACTIVE,-- M_PRODUCT_BOM_1.CREATED,
M_PRODUCT_BOM_1.CREATEDBY, M_PRODUCT_BOM_1.UPDATED, M_PRODUCT_BOM_1.UPDATEDBY,
(removed unnecessary)
 M_PRODUCT_BOM_1.LINE,M_PRODUCT_BOM_1.M_PRODUCTBOM_ID AS M_PRODUCT_ID,
M_PRODUCT_BOM.M_PRODUCT_ID AS M_PRODUCTBOM_ID,  M_PRODUCT_BOM_1.BOMQTY,
M_PRODUCT_BOM_1.DESCRIPTION, M_PRODUCT_BOM_1.BOMTYPE
FROM M_PRODUCT_BOM LEFT JOIN M_PRODUCT_BOM  M_PRODUCT_BOM_1 ON
M_PRODUCT_BOM.M_PRODUCT_ID = M_PRODUCT_BOM_1.M_PRODUCTBOM_ID
GROUP BY M_PRODUCT_BOM_1.M_PRODUCT_BOM_ID, M_PRODUCT_BOM.AD_CLIENT_ID,
M_PRODUCT_BOM.AD_ORG_ID, M_PRODUCT_BOM_1.ISACTIVE, M_PRODUCT_BOM_1.CREATED,
M_PRODUCT_BOM_1.CREATEDBY, M_PRODUCT_BOM_1.UPDATED, M_PRODUCT_BOM_1.UPDATEDBY,
M_PRODUCT_BOM_1.LINE, M_PRODUCT_BOM.M_PRODUCT_ID,
 M_PRODUCT_BOM_1.M_PRODUCTBOM_ID,
M_PRODUCT_BOM_1.BOMQTY, M_PRODUCT_BOM_1.DESCRIPTION, M_PRODUCT_BOM_1.BOMTYPE
HAVING (((M_PRODUCT_BOM_1.M_PRODUCTBOM_ID) IS NULL))) a
-- part 3 continued
   INNER JOIN M_PRODUCT b
   ON a.M_PRODUCTBOM_ID = b.M_PRODUCT_ID
  START WITH a.M_PRODUCT_ID IS NULL
  CONNECT BY PRIOR  M_PRODUCTBOM_ID = a.M_PRODUCT_ID
  ORDER SIBLINGS BY b.Value
/

If you want to use materialized views... we did it the following way (I really know very little about them, so if someone has a better idea of how to use them for this, it would be appreciated) The materialized view would be

CREATE MATERIALIZED VIEW BOM_INDENTED_MV
(PTX_Path,TOPLEVELID, TOPLEVEL, TOPLEVEL_DESC, PRODUCTNUM, PRODDEC, 
 M_PRODUCTBOM_ID, BOM_LEVEL, BOMQTY, DESCRIPTION, AD_CLIENT_ID, 
 AD_ORG_ID, BOM_LEVEL_NUM, BOTTOMCOMPONENT,TOPLEVEL_ISACTIVE, COMP_ISACTIVE,
TOP_Client)
 
 Build IMMEDIATE
 REFRESH ON DEMAND 
 DISABLE QUERY REWRITE
 
AS 
SELECT Path, TOPLEVELID,TOPLEVEL,TOPLEVEL_DESC, ProductNum, ProdDesc,
M_PRODUCTBOM_ID, BOM_Level, BOMQTY, f1.DESCRIPTION,mp2.AD_CLIENT_ID,
 mp2.AD_ORG_ID,
BomLevelNum, BottomComponent, MP.ISACTIVE AS TOPLEV_ISACTIVE, MP2.ISACTIVE AS
COMP_ISACTIVE, mp.AD_CLIENT_ID AS TOPLEVEL_Client
  FROM (
SELECT DISTINCT SYS_CONNECT_BY_PATH (M_PRODUCTBOM_ID,'/') AS Path,
 CONNECT_BY_ROOT
M_ProductBom_ID AS TOPLEVELID,CONNECT_BY_ROOT Value AS TOPLEVEL,CONNECT_BY_ROOT
b.DESCRIPTION AS TOPLEVEL_DESC, Value AS ProductNum, b.DESCRIPTION AS ProdDesc,
M_PRODUCTBOM_ID,LPAD(' ',2*(LEVEL-1)) || TO_CHAR(LEVEL) BOM_Level, BOMQTY,
a.DESCRIPTION,a.AD_CLIENT_ID, a.AD_ORG_ID, LEVEL AS BomLevelNum,
 Connect_By_ISLEAF
AS BottomComponent
  FROM 
  
-- part 2 subquerry combining top level and bom to create null to start from
( SELECT
 "M_PRODUCT_BOM_ID","AD_CLIENT_ID","AD_ORG_ID","ISACTIVE",--"CREATED","C
REATEDBY","UPDATED","UPDATEDBY",  (remove becuase unnnecessarry)
"LINE","M_PRODUCT_ID","M_PRODUCTBOM_ID","BOMQTY","DESCRIPTION","BOMTYPE"
FROM M_PRODUCT_BOM

UNION
-- part 1 the tope level querry creating the nulls that is combined in part 2
SELECT M_PRODUCT_BOM_1.M_PRODUCT_BOM_ID, M_PRODUCT_BOM.AD_CLIENT_ID,
M_PRODUCT_BOM.AD_ORG_ID, M_PRODUCT_BOM_1.ISACTIVE,-- M_PRODUCT_BOM_1.CREATED,
M_PRODUCT_BOM_1.CREATEDBY, M_PRODUCT_BOM_1.UPDATED, M_PRODUCT_BOM_1.UPDATEDBY,
(removed unnecessary)
 M_PRODUCT_BOM_1.LINE,M_PRODUCT_BOM_1.M_PRODUCTBOM_ID AS M_PRODUCT_ID,
M_PRODUCT_BOM.M_PRODUCT_ID AS M_PRODUCTBOM_ID,  M_PRODUCT_BOM_1.BOMQTY,
M_PRODUCT_BOM_1.DESCRIPTION, M_PRODUCT_BOM_1.BOMTYPE
FROM M_PRODUCT_BOM LEFT JOIN M_PRODUCT_BOM  M_PRODUCT_BOM_1 ON
M_PRODUCT_BOM.M_PRODUCT_ID = M_PRODUCT_BOM_1.M_PRODUCTBOM_ID
GROUP BY M_PRODUCT_BOM_1.M_PRODUCT_BOM_ID, M_PRODUCT_BOM.AD_CLIENT_ID,
M_PRODUCT_BOM.AD_ORG_ID, M_PRODUCT_BOM_1.ISACTIVE, M_PRODUCT_BOM_1.CREATED,
M_PRODUCT_BOM_1.CREATEDBY, M_PRODUCT_BOM_1.UPDATED, M_PRODUCT_BOM_1.UPDATEDBY,
M_PRODUCT_BOM_1.LINE, M_PRODUCT_BOM.M_PRODUCT_ID,
 M_PRODUCT_BOM_1.M_PRODUCTBOM_ID,
M_PRODUCT_BOM_1.BOMQTY, M_PRODUCT_BOM_1.DESCRIPTION, M_PRODUCT_BOM_1.BOMTYPE
HAVING (((M_PRODUCT_BOM_1.M_PRODUCTBOM_ID) IS NULL))) a
-- part 3 continued
   INNER JOIN M_PRODUCT b
   ON a.M_PRODUCTBOM_ID = b.M_PRODUCT_ID
  START WITH a.M_PRODUCT_ID IS NULL
  CONNECT BY PRIOR  M_PRODUCTBOM_ID = a.M_PRODUCT_ID
  ORDER SIBLINGS BY b.Value
) f1
INNER JOIN M_PRODUCT mp ON TOPLEVELID=mp.M_PRODUCT_ID
INNER JOIN M_PRODUCT mp2 ON M_PRODUCTBOM_ID = mp2.M_PRODUCT_ID
ORDER BY Path
/

Then to refresh the materialize view we used the following database procedure where we used a parameter in the "report process" window to identify which MV to refresh:

CREATE OR REPLACE PROCEDURE Indented_Bom_Mv_Refresh
(
	PInstance_ID    		IN NUMBER	
)
AS
--	Logistice
	ResultStr						VARCHAR2(2000);
	Message							VARCHAR2(2000);
	Record_ID						NUMBER;
	--	Parameter
	CURSOR Cur_Parameter (PInstance NUMBER) IS
		SELECT i.Record_ID, p.ParameterName, p.P_String, p.P_Number, p.P_Date
		FROM AD_PINSTANCE i, AD_PINSTANCE_PARA p
		WHERE i.AD_PInstance_ID=PInstance
		AND i.AD_PInstance_ID=p.AD_PInstance_ID(+)
		ORDER BY p.SeqNo;
	--	Parameter Variables
	p_MVIEW						VARCHAR2(2000);


BEGIN
	DBMS_OUTPUT.PUT_LINE('Updating PInstance - Processing ' || PInstance_ID);
    ResultStr := 'PInstanceNotFound';
    UPDATE AD_PINSTANCE
    SET Created = SYSDATE,
        IsProcessing = 'Y'
    WHERE AD_PInstance_ID=PInstance_ID;
    COMMIT;
--	Get Parameters
	ResultStr := 'ReadingParameters';
	FOR p IN Cur_Parameter (PInstance_ID) LOOP
		Record_ID := p.Record_ID;
		IF (p.ParameterName = 'MVIEW') THEN
 			P_PTX_MVIEW := p.P_String;
			DBMS_OUTPUT.PUT_LINE('  MVIEW=' || p_MVIEW);
		ELSE
			DBMS_OUTPUT.PUT_LINE('*** Unknown Parameter=' || p.ParameterName);
	 	END IF;
	END LOOP;	--	Get Parameter
	DBMS_OUTPUT.PUT_LINE('  Record_ID=' || Record_ID);

		
DBMS_MVIEW.REFRESH (p_PTX_MVIEW, 'c');


<<FINISH_PROCESS>>
	--  Update AD_PInstance
	DBMS_OUTPUT.PUT_LINE('Updating PInstance - Finished ' || Message);
    UPDATE  AD_PINSTANCE
    SET Updated = SYSDATE,
        IsProcessing = 'N',
        Result = 1,                 -- success
        ErrorMsg = Message
    WHERE   AD_PInstance_ID=PInstance_ID;
    COMMIT;
    RETURN;

EXCEPTION
    WHEN  OTHERS THEN
		ResultStr := ResultStr || ': ' || SQLERRM || ' - ' || Message;
		DBMS_OUTPUT.PUT_LINE(ResultStr);
        UPDATE  AD_PINSTANCE
        SET Updated = SYSDATE,
            IsProcessing = 'N',
            Result = 0,             -- failure
            ErrorMsg = ResultStr
        WHERE   AD_PInstance_ID=PInstance_ID;
        COMMIT;
        RETURN;
END ;
/


User authentication in Adempiere using LDAP

Submitted By: gemmiti

Summary: User authentication in Adempiere using LDAP

sf.net tracker: here

Enabling LDAP Functionality:

1. Log in as SysAdmin

2. Go to Menu > System Admin > System

3. In Field "Ldap URL" fill in your LDAP URL, i.e. "LDAP://YourLdapServer.com"

4. In field "LDAP Domain" Your Domain, i.e., "YourLdapServer.com"

5. Log Out as SysAdmin

6. Log In as SuperUser/Admin

7. GoTo Menu > General Rules > Security>User

8. In tab "User Contact" and "Internal" you will find a field for LDAP User Name -- Here (for a particular user) fill in the LDAP use name.

Upon logging in -- the user can enter his/her LDAP user name and password and it will associate the correct credentials to the user you have set up in Compiere.

Add OnHandQty In Product window

Submitted By: stingreye

Summary: Add OnHandQty In Product window

sf.net tracker: here

First the SQL 
1)	You want On Hand Qty -  Product can be stored in multiple locators in M_Storage table. I assume you want total of all locators
2)	So SQL = SELECT SUM (QTYONHAND) FROM M_STORAGE s
3)	Now you want to sync with product table,  so  we add WHERE s.M_PRODUCT_ID = M_PRODUCT.M_PRODUCT_ID
4)	So the final SQL we need is (SELECT SUM(QTYONHAND) FROM M_STORAGE s WHERE s.M_PRODUCT_ID = M_PRODUCT.M_PRODUCT_ID)

Now lets add it to compiere:
1)	Log in as SuperUser or System
2)	Role = System Administrator
3)	Open Table window
4)	Select Column tab
5)	Create new record
6)	Insert a  name for DB Column Name 
7)	Choose a system element in this case most likely Qty_OnHand
8)	Reference = String
9)	Length = 20 should be plenty
10)	Click Save
11)	Click synchronize column, cross fingers
12)	Look on bottom left of window for alter table M_PRODUCTADD name of the field you just made

Lets add it to the M_Product window.

1)	Go to Window Tab Field
2)	Choose Product Table
3)	Goto Tab 
4)	Choose the “tab” we want which is Product (it is for the M_PRODUCT table)
5)	Choose Field Tab
6)	New Record
7)	Name your Field (Qty on Hand)
8)	Column – Choose the new column you created.
9)	Save

Now open the Product window and it should work!

How to setup Workflow for PO Approval?


Workflow Simple approval

Workflow Dynamic approval

Changelog functionality

changelog functionality consists of two parts: who & what.

  • Via tables user can identify "what" wish to log.
  • Via roles "who".

By this way is possible to finely control the auditing. This means more tables to be flagged if user wish to log all tables.


SECURE SCENARIO to use Adempiere

Possible SECURE SCENARIO to use Adempiere (applicable Compiere installations also)

CLIENTS

  • 1 - Don't install clients
  • 2 - Install two servers - one for NX (call it NXServer), and the other for oracle and JBoss (call it ADServer)
  • 3 - Allow clients just run through NX connection (you'll have total control of the ADempiere.properties in a linux box)
  • 4 - Configure the ADServer to only accept connections from NXServer
  • 5 - Configure the Oracle in ADServer to only accept connections from the same ADServer and from NXServer

SERVICES ON WEB

  • 1 - Don't expose web services from jboss directly
  • 2 - Install an apache server to expose in a controlled way just the needed services and pages from jboss adempiere


In this scenario NX can be replaced with any terminal server software (Microsoft TS, Citrix, Sun Global Secure Desktop, etc). And you must incur in costs of terminal server software licensing - but security is not free. And you must ensure all those servers - ensure NX, ensure oracle, ensure jboss, ensure apache, ensure linux, etc.


Product Attribute Instance - Color/Size/Serial number


Material transaction between two organizations


Maintain multiple environments(Postgre multiple schema managing)


Report sales figures by product

1. Create a Report Line Set called All Products. 2. Create a Report Line under it called Product with a Line Type of Segment Value (leave Posting and Amount Types blank) 3. Create a Report Source under it with Type=Product and leave the Product field blank 4. Create a Report Column Set called Current Period and YTD 5. Create 2 report columns under it, one for Current Period and YTD. The first one should have Posting Type=Actual, Amount Type=Period Balance, Column Type=Relative Period, Relative Period=0. The second one should be the same except Amount Type=Year Balance. 6. Then create a Financial report using these Report Line and Columns Sets. Make sure to check List Sources when you run to see all the products. Warning, If there are more than 1000 products it won't work (we're obviously aware of this limitation and working on removing it).

You can easily produce a similar report for Sales by Business Partner by just substituting Type=Business Parter in Step 3.


How to monitor Oracle sessions?

SELECT SID, SERIAL#, STATUS, SERVER
  FROM V$SESSION
  WHERE USERNAME = 'ADEMPIERE';


How to get Oracle Character set?

 SELECT * FROM nls_database_parameters
 WHERE parameter = any('NLS_CHARACTERSET','NLS_NCHAR_CHARACTERSET');

How to change document numbers?

Go to Performance

Analysis -> Accounting Rules -> Document Type

Here you can see all existing document types like Purchase Order etc. If the 'Document is Number Controlled' checkbox is checked then you will have a Document Sequence field (a drop down). Right click and zoom to the Document Sequence window

Performance Analysis -> Accounting Rules -> Document Sequence

Here you can change the current next value, the increment and you can add prefix and or suffix for your order/invoice numbers.


Where to place JasperReport files?

JasperReport can be defined as:

http://
https://
attachment:
file:/ 
or a direct file_directory path 

An easier way to deploy jasper reports could be putting the .jasper in the customization.jar

For that we could add a new prefix like:

resource:org/adempiere/jasper/MyReport.jasper


How to handle imprests?


How to process credit card payments from Java GUI?

How a user could create a payment in the client (not the webstore) that will get passed to the payment processor?


Window 'Invoice (Customer)'.

Complete 'Invoice (Customer)'.
Set Payment Type - Press Button which by default has value 'On Credit'.
A new window open and user can change payment Type from 'On Credit' to 'Credit Card'.
Enter Credit Card data.


How to add comment on printed Invoice?

A line without product, charge and qty = 0 will be printed as a comment on invoice.

BOM price explained.

https://sourceforge.net/forum/message.php?msg_id=4740301
BOM Product price is depend of the price of the products which built it. 

For example Product A consist of 1 product B and 1 product C. Product B and C are being priced at USD 5 and USD 6 respectively. The price of Product A would be USD 11. You cannot change it.

Meanwhile we often find a case where the price of Product A IS NOT the price of product B or C combined. It can be higher or lower. I try to add price to product A, which not the combined price but it doesn't work. This is what happen.

I put price of USD 15 for product A. When I created Sales Order, and I chose product A the price was still USD 15. Everything felt right. And then the disaster came. When I click Complete button suddenly the price change to USD 11!


If the BOM is not stocked it is considered a 'basket; and will compute the price based on the component prices.
If you want to assign a price change it to 'stocked'


How to enable Multilingual documents?

Client Window -> Multilingual Documents
Language Window 
Language Maintenance -> Add missing translations


How Cost centers are implemented in Adempiere?

sf.net post Adempiere support cost center using organization setup( have a look at the organization and organization type setup). Also, the transact organization element could be turned on in accounting schema to handle this.


How to setup Extended Document Number Formatting?

Enhance Document No Formatting

@AD_Org_ID<Value>@ is replace by 'HQ' ( AD_Org.Value )

<Value> can be replaced by any other column from AD_Org table.


How to list General Ledger Transactions?


How to Merge Business Partner entities?

If you merge Business Partners you may need to run: Partner Relations -> Business Partner Rules -> Validate Business Partner

to get the correct open amounts, Life time value, etc...

If you merge Products, first move any inventory out of the product you will be deleting as that is not done in the merge process.

Costing records are not merged!

Developer hints

  • class dbPort/org.compiere.process.DocActionTemplate shows a template for DocAction, i think that it must be updated.


Hint-1; UPDATE columns which must have default value or have checked constraint

When developer add new column which is NOT NULL or which has checked constraint, please do not forget to execute proper UPDATE TABLE sql statements.

Example:

ALTER TABLE EXP_FormatLine
ADD IsPartUniqueIndex CHAR(1) CHECK(IsPartUniqueIndex IN ('Y', 'N'));

UPDATE EXP_FormatLine
SET IsPartUniqueIndex = 'N' 
WHERE IsPartUniqueIndex IS NULL;

Hint-2; Be carefull when creating VIEWS

Use LEFT/RIGHT OUTER JOINS, because in many cases fields do not have values and INNER JOIN will not show all records. In this example C_Invoice.C_Order_ID is not manadatory so view will not show records which do not have Order associated with Invoice!

FROM C_Invoice i 
    INNER JOIN C_DocType d ON (i.C_DocType_ID=d.C_DocType_ID) 
    LEFT OUTER JOIN C_Order o ON (i.C_Order_ID=o.C_Order_ID) 

Hint-3; Java on Ubuntu

Ubuntu came with default version of java 1.4.2 and installing 1.5.0 didn't change that. So developer have to change it. Exporting the path to your newer java to the .bashrc config file of your environment is a standadrd decision but is not system wide and in some cases is not enough. The decision is. When you type at the prompt:

  $ sudo update-java-alternatives -l

will see the versions of all javas installed into your system. In order to make the latest one default for the whole system type:

  $ sudo update-java-alternatives -s java-newer-ver 


Hint-4; How to truncate timestamp

Timestamp today = TimeUtil.trunc(new Timestamp (System.currentTimeMillis() ), TimeUtil.TRUNC_DAY);


Hint-5; How to use MTable.get(..) and MTable.getPO(..)

Class: base/src/org/compiere/model/MProduct.java

public MAttributeInstance getAttributeInstance(String name, String trxName) 
{
	MAttributeInstance instance = null;
	
	MTable table = MTable.get(Env.getCtx(), MAttribute.Table_ID);
	MAttribute attribute = (MAttribute)table.getPO("Name = ?", new Object[]{name}, trxName);
	if ( attribute == null ) return null;
	table = MTable.get(Env.getCtx(), MAttributeInstance.Table_ID);
	instance = (MAttributeInstance)table.getPO(
			MAttributeInstance.COLUMNNAME_M_AttributeSetInstance_ID + "=?" 
			+ " and " + MAttributeInstance.COLUMNNAME_M_Attribute_ID + "=?" ,
			new Object[]{getM_AttributeSetInstance_ID(), attribute.getM_Attribute_ID()},
			trxName);
	return instance;
}

Subversion Access

Subversion Plugin for Eclipse Subversive

Adempiere project's SourceForge.net Subversion repository can be checked out through SVN with the following instruction set: svn co https://adempiere.svn.sourceforge.net/svnroot/adempiere adempiere

MFG

sf.net forum post

Important Steps:

1. Apply the following patches: 
 
buildbase.patch.tim 
buildclient.patch.tim 
buildutils_dev.patch.tim 
X_AD_WF_Node.patch 
X_C_DocType.patch 
X_S_Resource.patch 
X_AD_Workflow.patch 
X_M_Cost.patch 
X_M_Transaction.patch 
X_M_Product.patch 
 
2. I copied adempiere/libero/build.xml.tim to adempiere/libero/build.xml 
 
Build your Adempiere and run it.  

3. Create a new client and import accounting etc... 
(If you don't do this you won't see all the menus, you can't just login under GardenAdmin/GardenAdmin that is not enough) 
It looks that 2pack file do not contains proper access records.
Must research!!!

4. Login with your new client Admin login you created in step3 and Libero away!!!


Compiling adempiere + libero from SVN head
1. Check out the head version of both libero and adempiere 
2. Build adempiere 
3. Build libero 
4. Rebuild adempiere (to get the libero.jar into the install) 
5. Set up the database. (Create database, run the pljava deployer, drop the
sqlj schema, import the dump file)
6. Run the 330-trunk database migrations 
7. Copy EE01.zip into the packages directory 
8. Run silent setup and start the app server.
9. Launch the Adempiere client
10. Add the EE01 entity type
11. Pack in the EE01.zip
12. Copy libero.jar into the packages/packages/EE01/lib directory.
13. Re-run silentsetup and start the server.

Template Process and steps to create a process

1)create a java class extends org.compiere.process.SvrProcess

2)Implements two methods void doIt() String prepare()

In Prepare method you can get different parameters ProcessInfoParameter[] para = getParameter(); for (int i = 0; i < para.length; i++) { String name = para[i].getParameterName(); if (para[i].getParameter() == null)

else System.out.println(name); } and in doIt method you try to insert this parameters into your table after you create this class Login with system administrator role

3) 'Report and Process' window define your process with parameter 4) 'Table and Column' window choose your table and create a column with Button Reference

5) Choose your process for this Button

package org.adempiere.process;

import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.logging.Level;

import org.compiere.model.MClient;
import org.compiere.model.MDocType;
import org.compiere.model.X_C_BPartner_EDI;
import org.compiere.model.X_C_EDIFormat;
import org.compiere.model.X_C_EDIProcessor;
import org.compiere.process.ProcessInfoParameter;
import org.compiere.process.SvrProcess;
import org.compiere.util.DB;
import org.compiere.util.Env;
import org.compiere.util.Msg;

/**
 *  @author Trifon Trifonov
 *  @version $Id:$
 */
public class ModelImporter extends SvrProcess
{
	/** Client Parameter			*/
	protected int	p_AD_Client_ID = 0;
	
	/** Business Partner Parameter */
	protected int p_C_BPartner_ID = 0;
	
	/** Document Type Parameter */
	protected int p_C_DocType_ID = 0;
	
	/** Record ID */
	protected int p_Record_ID = 0;
	
	/** Table ID */
	int AD_Table_ID = 0;
	
	/**
	 * 	Get Parameters
	 */
	protected void prepare ()
	{
		
		p_Record_ID = getRecord_ID();
		if (p_AD_Client_ID == 0)
			p_AD_Client_ID = Env.getAD_Client_ID(getCtx());
		AD_Table_ID = getTable_ID();
		
		StringBuffer sb = new StringBuffer ("AD_Table_ID=").append(AD_Table_ID);
		sb.append("; Record_ID=").append(getRecord_ID());
		//	Parameter
		ProcessInfoParameter[] para = getParameter();
		for (int i = 0; i < para.length; i++)
		{
			String name = para[i].getParameterName();
			if (para[i].getParameter() == null)
				;
			else if (name.equals("C_BPartner_ID"))
				p_C_BPartner_ID = para[i].getParameterAsInt();
			else
				log.log(Level.SEVERE, "Unknown Parameter: " + name);
		}
		
		log.info(sb.toString());
	}

	/**
	 * 	Process 
	 *	@return info
	 */
	protected String doIt () throws Exception
	{
		StringBuffer result = new StringBuffer("");
		
		MClient client = MClient.get (getCtx(), p_AD_Client_ID);
		log.info(client.toString());
		// get proper EDI Format from Document Type
		MDocType docType = MDocType.get(getCtx(), p_C_DocType_ID);
		
		int C_EDIFormat_ID = 0;
		int C_EDIProcessor_ID = 0;
		String sql1 = "SELECT C_EDIFormat_ID, C_EDIProcessor_ID "
			   + "FROM " + X_C_BPartner_EDI.Table_Name + " "
			   + "WHERE AD_Client_ID = ? "
			   + " AND C_BPartner_ID = ? "
			   + " AND C_DocType_ID = ? "
			   + " AND Inbound = 'N' " 
		;
		ResultSet rs1 = null;
		PreparedStatement pstmt1 = null;
		try
		{
			pstmt1 = DB.prepareStatement(sql1, get_TrxName());
			pstmt1.setInt(1, p_AD_Client_ID);
			pstmt1.setInt(2, p_C_BPartner_ID);
			pstmt1.setInt(3, p_C_DocType_ID);
			rs1 = pstmt1.executeQuery();
			if (rs1.next())
			{
				// Found specific C_EDIFormat for given BPartner and C_DocType_ID
				C_EDIFormat_ID = rs1.getInt(X_C_EDIFormat.COLUMNNAME_C_EDIFormat_ID);
				C_EDIProcessor_ID = rs1.getInt(X_C_EDIProcessor.COLUMNNAME_C_EDIProcessor_ID);
			} else {
				// Get C_EDIFormat_ID from Document Type
				C_EDIFormat_ID = docType.getC_EDIFormat_ID();
			}
			
		} finally {
			try {
				if (rs1 != null) rs1.close();
				if (pstmt1 != null) pstmt1.close();
			} catch (SQLException ex) {/*ignored*/}
			rs1 = null;
			pstmt1 = null;
		}
		if (C_EDIFormat_ID == 0) {
			throw new Exception("EDI Format is not set for C_DocType_ID = [" + p_C_DocType_ID + "]");
		}
		if (C_EDIProcessor_ID == 0) {
			throw new Exception("EDI Processor is not set for C_DocType_ID = [" + p_C_DocType_ID + "]");
		}
		
		addLog(0, null, null, Msg.getMsg (getCtx(), "EDISubmitProcessResult") + "\n" + result.toString());
		return result.toString();
	}
}

Migration with SQL statements - Oracle - AD_Element

INSERT INTO AD_Element
(AD_Element_ID, AD_Client_ID, AD_Org_ID, IsActive,
Created, CreatedBy,
Cpdated, UpdatedBy,
ColumnName, EntityType, Name,
PrintName
)
VALUES (500XX, 0, 0, 'Y',
TO_DATE ('02/26/2007 12:30:00', 'MM/DD/YYYY HH24:MI:SS'), 100,
TO_DATE ('02/26/2007 12:30:00', 'MM/DD/YYYY HH24:MI:SS'), 100,
'[ColumnNameHere]', 'D', '[NameHere]',
'[PrintNameHere]'
);
COMMIT;
UPDATE AD_Sequence
SET CurrentNextSys = (SELECT MAX (AD_Element_ID) + 1
FROM AD_Element
WHERE AD_Element_ID < 1000000)
WHERE NAME = 'AD_Element';


Migration with SQL statements - Oracle - AD_Table

INSERT INTO AD_Table 
(AD_Table_ID, AD_Client_ID, AD_Org_ID, IsActive,
Created, CreatedBy,
Updated, UpdatedBy, 
Name, Description, Help, TableName, 
IsView, AccessLevel, EntityType, AD_Window_ID, 
AD_Val_Rule_ID, LoadSeq, IsSecurityEnabled, IsDeleteable, 
IsHighVolume, ImportTable, IsChangelog, ReplicationType, 
PO_Window_ID, CopyColumnsFromTable
) 
VALUES 
(53014, 0, 0, 'Y', 
TO_DATE ('10/22/2007 09:30:00', 'MM/DD/YYYY HH24:MI:SS'), 100, 
TO_DATE ('10/22/2007 09:30:00', 'MM/DD/YYYY HH24:MI:SS'), 100,
'[NameHere]', '[DescriptionHere]', '[HelpHere]', '[TableNameHere]', 
'N', '4', 'D', null, 
null, 0, 'N', 'Y', 
'N', 'N', 'N', 'L', 
null, 'N'
);

COMMIT;
UPDATE AD_Sequence
SET CurrentNextSys = (SELECT MAX (AD_Table_ID) + 1
FROM AD_Table
WHERE AD_Table_ID < 1000000)
WHERE NAME = 'AD_Table';

Migration with SQL statements - Oracle - AD_Column

INSERT INTO AD_Column
(AD_Column_ID, AD_Client_ID, AD_Org_ID, IsActive,
Created,
Updated, CreatedBy,
UpdatedBy, Name, Description, Version,
EntityType, ColumnName, AD_Table_ID, AD_Reference_ID, 
FieldLength, IsKey, IsParent, IsMandatory, IsUpdateable,
IsIdentifier, SeqNo, IsTranslated, IsEncrypted,
IsSelectionColumn, AD_Element_ID, Callout, IsSyncDatabase,
IsAlwaysUpdateable
)
VALUES (502XX, 0, 0, 'Y',
TO_DATE ('02/26/2007 12:30:00', 'MM/DD/YYYY HH24:MI:SS'),
TO_DATE ('02/26/2007 12:30:00', 'MM/DD/YYYY HH24:MI:SS'), 100,
100, '[NameHere]', '[DescriptionHere]', 1,
'D', '[ColumnNameHere]', AD_Table_IDHERE, AD_Reference_IDHere,
1, 'N', 'N', 'Y', 'Y',
'N', 0, 'N', 'N',
'N', 50071, '[CalloutHere]', 'N',
'N'
);
COMMIT;
UPDATE AD_Sequence
SET CurrentNextSys = (SELECT MAX (AD_Column_ID) + 1
FROM AD_Column
WHERE AD_Column_ID < 1000000)
WHERE NAME = 'AD_Column';

Migration with SQL statements - Oracle - AD_Window

INSERT INTO AD_Window
(AD_Window_ID,AD_Client_ID, AD_Org_ID, IsActive,
Created, CreatedBy,
Updated, UpdatedBy, 
Name, Description, Help, WindowType, 
IsSoTrx, EntityType, Processing, AD_Image_ID, 
AD_Color_ID, IsDefault, WinHeight, WinWidth, 
IsBetaFunctionality
) 
VALUES (53003, 0, 0, 'Y', 
TO_DATE ('10/22/2007 09:30:00', 'MM/DD/YYYY HH24:MI:SS'), 100, 
TO_DATE ('10/22/2007 09:30:00', 'MM/DD/YYYY HH24:MI:SS'), 100, 
'[NameHere]', null, null, 'M', 
'N', 'D', 'N', null, 
null, 'N', 0, 0, 
'N'
);

COMMIT;
UPDATE AD_Sequence
SET CurrentNextSys = (SELECT MAX (AD_Window_ID) + 1
  FROM AD_Window
  WHERE AD_Window_ID < 1000000)
WHERE Name = 'AD_Window';


Migration with SQL statements - Oracle - AD_Tab

INSERT INTO AD_Tab 
(AD_Tab_ID, AD_Client_ID, AD_Org_ID, IsActive,
Created, CreatedBy,
Updated, UpdatedBy,
Name, Description, Help, AD_Table_ID, 
AD_Window_ID, SeqNo, TabLevel, IsSingleRow, 
IsInfoTab, IsTranslationTab, IsReadOnly, AD_Column_ID, 
HasTree, WhereClause, OrderByClause, CommitWarning, 
AD_Process_ID, Processing, AD_Image_ID, ImportFields, 
AD_ColumnSortOrder_ID, AD_ColumnSortYesNo_ID, IsSortTab, EntityType, 
Included_Tab_ID, ReadOnlyLogic, DisplayLogic, IsInsertRecord, 
IsAdvancedTab
) 
VALUES (53014, 0, 0, 'Y', 
TO_DATE ('10/22/2007 09:30:00', 'MM/DD/YYYY HH24:MI:SS'), 100, 
TO_DATE ('10/22/2007 09:30:00', 'MM/DD/YYYY HH24:MI:SS'), 100, 
'[NameHere]', null, null, [AD_TableIDHERE], 
[AD_Window_IDHERE], [SeqNoHERE], 0, 'N', 
'N', 'N', 'N', null, 
'N', null, null, null, 
null, 'N', null, 'N', 
null, null, 'N', 'D', 
null, null, null, 'Y', 
'N'
);

COMMIT;
UPDATE AD_Sequence
SET CurrentNextSys = (SELECT MAX (AD_Tab_ID) + 1
  FROM AD_Tab
  WHERE AD_Tab_ID < 1000000)
WHERE Name = 'AD_Tab';


Migration with SQL statements - Oracle - AD_Field

INSERT INTO AD_Field
(AD_Field_ID, AD_Client_ID, AD_Org_ID, IsActive,
Created, CreatedBy,
Updated, UpdatedBy,
Name, Description, IsCentrallyMaintained, SeqNo, AD_Tab_ID,
AD_Column_ID, IsDisplayed, DisplayLength, IsReadonly,
IsSameLine, IsHeading, IsFieldOnly, IsEncrypted, EntityType
)
VALUES (50184, 0, 0, 'Y',
TO_DATE ('02/26/2007 12:30:00', 'MM/DD/YYYY HH24:MI:SS'), 100,
TO_DATE ('02/26/2007 12:30:00', 'MM/DD/YYYY HH24:MI:SS'), 100,
'Store Archive On File System', 'Store Archive On File System', 'Y', 250, 145,
50214, 'Y', 1, 'N',
'N', 'N', 'N', 'N', 'D'
);
COMMIT;
UPDATE AD_Sequence
SET CurrentNextSys = (SELECT MAX (AD_Field_ID) + 1
  FROM AD_Field
  WHERE AD_Field_ID < 1000000)
WHERE Name = 'AD_Field';


Migration with SQL statements - Oracle - AD_Menu

INSERT INTO AD_Menu
(AD_Menu_ID, AD_Client_ID, AD_Org_ID, IsActive,
Created, CreatedBy,
Updated, UpdatedBy,
Name, Description, IsSummary, IsSoTrx, 
IsReadOnly, Action, AD_Window_ID, AD_Workflow_ID, 
AD_Task_ID, AD_Process_ID, AD_Form_ID, AD_Workbench_ID, 
EntityType
)
 VALUES( 53012, 0, 0, 'Y',
TO_DATE ('10/22/2007 09:30:00', 'MM/DD/YYYY HH24:MI:SS'), 100,
TO_DATE ('10/22/2007 09:30:00', 'MM/DD/YYYY HH24:MI:SS'), 100, 
'[NameHERE]', NULL, 'N', 'N', 
'N', 'W', [AD_Window_IDHERE], NULL, 
NULL, NULL, NULL, NULL, 
'D'
);
COMMIT;
UPDATE AD_Sequence
SET CurrentNextSys = (SELECT MAX (AD_Menu_ID) + 1
  FROM AD_Menu
  WHERE AD_Menu_ID < 1000000)
WHERE Name = 'AD_Menu';


Migration with SQL statements - Oracle - AD_TreeNodeMM

INSERT INTO AD_TreeNodeMM 
(AD_Tree_ID, Node_ID, AD_Client_ID, AD_Org_ID, IsActive, 
Created, Createdby, 
Updated, UpdatedBy, Parent_ID, SeqNo
)
VALUES (10, [Node_IDHERE], 0, 0, 'Y', 
TO_DATE ('10/22/2007 09:30:00', 'MM/DD/YYYY HH24:MI:SS'), 0, 
TO_DATE ('10/22/2007 09:30:00', 'MM/DD/YYYY HH24:MI:SS'), 0, [Parent_IDHERE], [SeqNoHERE]
);
COMMIT;
UPDATE AD_Sequence
SET CurrentNextSys = (SELECT MAX (AD_Menu_ID) + 1
  FROM AD_Menu
  WHERE AD_Menu_ID < 1000000)
WHERE Name = 'AD_Menu';

Migration with SQL statements - AD_Message

INSERT INTO AD_Message
(AD_Message_ID, AD_Client_ID, AD_Org_ID, IsActive,
Created, CreatedBy,
Updated, UpdatedBy,
Value, MsgText, MsgType
)
VALUES (500XX, 0, 0, 'Y',
TO_DATE ('02/26/2007 12:30:00', 'MM/DD/YYYY HH24:MI:SS'), 100,
TO_DATE ('02/26/2007 12:30:00', 'MM/DD/YYYY HH24:MI:SS'), 100,
'[VaueHere]','[MSG Text Here]','I'
);
COMMIT;
UPDATE AD_Sequence
SET CurrentNextSys = (SELECT MAX (AD_Message_ID) + 1
FROM AD_Message
WHERE AD_message_ID < 1000000)
WHERE NAME = 'AD_Message';

Migration with SQL statements - AD_Process_Para

INSERT INTO AD_Process_Para
(AD_Process_Para_ID, AD_Client_ID, AD_Org_ID, IsActive, Created,
CreatedBy, Updated, UpdatedBy, Name,
Description,
Help,
AD_Process_ID, SeqNo, AD_Reference_ID, AD_Reference_Value_ID,
AD_Val_Rule_ID, ColumnName, IsCentrallyMaintained, FieldLength,
IsMandatory, IsRange, AD_Element_ID, EntityType
)
VALUES (50019, 0, 0, 'Y', TO_DATE ('2007-03-03', 'YYYY-MM-DD'),
100, TO_DATE ('2007-03-03', 'YYYY-MM-DD'), 100, 'Shipment Date',
'Date printed on shipment',
'The Shipment Date indicates the date printed on the shipment.',
118, 15, 15, NULL,
NULL, 'MovementDate', 'N', 0,
'Y', 'N', 1037, 'D'
);
COMMIT;
UPDATE AD_SEQUENCE
SET currentnextsys = (SELECT MAX (ad_process_para_id) + 1
FROM AD_Process_Para
WHERE AD_Process_Para_ID < 1000000)
WHERE NAME = 'AD_Process_Para';


Migration with SQL statements - AD_Ref_List - Postgre

INSERT INTO AD_Ref_List (
Created, CreatedBy, Updated, UpdatedBy, 
AD_Org_ID, AD_Ref_List_ID, AD_Reference_ID, 
Value, Name, IsActive, AD_Client_ID, EntityType
) VALUES (
TO_TIMESTAMP('2008-01-19 22:45:00','YYYY-MM-DD HH24:MI:SS'), 0, TO_TIMESTAMP('2008-01-19 22:45:00','YYYY-MM-DD HH24:MI:SS'), 0, 
0, 53287, 329, 
'DOO', 'Distribution Order', 'Y',0,'EE01'
);

Session_IsChangeLog, AD_Table.IsChangeLog, AD_Column.IsChangeLog combination

1. Session_IsChangeLog=no,  AD_Table.IsChangeLog=no,  AD_Column.IsChangeLog=no
     =>is column logged: no
2. Session_IsChangeLog=no,  AD_Table.IsChangeLog=no,  AD_Column.IsChangeLog=yes
     =>is column logged: no
3. Session_IsChangeLog=no,  AD_Table.IsChangeLog=yes, AD_Column.IsChangeLog=no
     =>is column logged: no
4. Session_IsChangeLog=no,  AD_Table.IsChangeLog=yes, AD_Column.IsChangeLog=yes
     =>is column logged: yes
5. Session_IsChangeLog=yes, AD_Table.IsChangeLog=no,  AD_Column.IsChangeLog=no
     =>is column logged: no
6. Session_IsChangeLog=yes, AD_Table.IsChangeLog=no,  AD_Column.IsChangeLog=yes
     =>is column logged: yes
7. Session_IsChangeLog=yes, AD_Table.IsChangeLog=yes, AD_Column.IsChangeLog=no
     =>is column logged: no
8. Session_IsChangeLog=yes, AD_Table.IsChangeLog=yes, AD_Column.IsChangeLog=yes
     =>is column logged: yes

Note: Session_IsChangeLog means: AD_Role.IsChangeLog or is a webstore session.

Observation1: as you see, AD_Column.IsChangeLog=Y means inherit policy from
parent (AD_Table) and AD_Column.IsChangeLog=N means never log this record.

PS: in future, i think we can move from IsChangeLog flag to some
ChangeLogPolicy=(Always, Never, Inherit from parent).


How to use Transactions and Save points in Adempiere

String trxName = Trx.createTrxName("test");
Trx trx = Trx.get(trxName, true);
Savepoint save1 = trx.setSavepoint("save1");

location = new MLocation(m_Ctx, 0, trxName);

... 

trx.rollback(save1);

trx.commit();
trx.close();


How to build Adempiere customization.jar

Customization.jar is in the lib directory of trunk. (ie /trunk/lib ) Go to that directory and execute following commands:

jar uvf customization.jar -C ../libero/build/ ./org/compiere/model/ jar uvf customization.jar -C ../libero/build/ ./org/compiere/acct/ jar uvf customization.jar -C ../libero/build/ ./org/compiere/process/

Then goto utils_dev directory and ./RUN_build.sh

After the build has completed the new customized.jar will be in $ADEMPIERE_HOME/lib Adempiere should now use the customized classes.


How to Open Window from source code?

MQuery aQuery = new  MQuery ("C_Invoice");
aQuery.setRecordCount(1);
aQuery.addRestriction("C_Invoice_ID", "=", C_Invoice_ID );

AWindow frame = new AWindow();
frame.initWindow(183, aQuery); // 183=window "Invoice (Vendor)"

frame.validate();
AEnv.showCenterScreen(frame);


How to keep parameter window open after view report?


How to create confirmation for inventory move?


How to make Adempiere LDAP username registration compatible with OpenLDAP

- StringBuffer principal = new StringBuffer (userName).append("@").append(domain);
+ // For OpenLDAP uncomment the next line  
+ // StringBuffer principal = new StringBuffer("uid=").append(userName).append(",").append(domain);
+ StringBuffer principal = new StringBuffer(userName).append("@").append(domain);
  env.put(Context.SECURITY_PRINCIPAL, principal.toString());
  env.put(Context.SECURITY_CREDENTIALS, password);


How to use JSR 223: Scripting callouts in Adempiere?

How to get Adempiere/Compiere Home from java class?

org.compiere.util.Ini.findAdempiereHome()


How to set/update column ModelValidationClasses

Nice code from Carlos! Have to check if it works for Oracle and Postgre.

UPDATE AD_Client
SET ModelValidationClasses =
CASE
WHEN ModelValidationClasses LIKE '%org.adempiere.model.LCO_Validator%'
  THEN ModelValidationClasses
WHEN LENGTH (TRIM (ModelValidationClasses)) = 0 OR ModelValidationClasses IS NULL
  THEN TO_NCHAR ('org.adempiere.model.LCO_Validator')
ELSE 
   ModelValidationClasses || ';org.adempiere.model.LCO_Validator'
END
WHERE AD_Client_ID != 0


How to use Adempiere sequence from java code?

	MSequence sequence = new MSequence(getCtx(), sequenceId, get_TrxName());
	int nextId = sequence.getNextID();
	sequence.save();

License to use for new classes

/**********************************************************************
* This file is part of Adempiere ERP Bazaar                           *
* http://www.adempiere.org                                            *
*                                                                     *
* Copyright (C) Trifon Trifonov.                                      *
* Copyright (C) Contributors                                          *
*                                                                     *
* This program is free software; you can redistribute it and/or       *
* modify it under the terms of the GNU General Public License         *
* as published by the Free Software Foundation; either version 2      *
* of the License, or (at your option) any later version.              *
*                                                                     *
* This program is distributed in the hope that it will be useful,     *
* but WITHOUT ANY WARRANTY; without even the implied warranty of      *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the        *
* GNU General Public License for more details.                        *
*                                                                     *
* You should have received a copy of the GNU General Public License   *
* along with this program; if not, write to the Free Software         *
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,          *
* MA 02110-1301, USA.                                                 *
*                                                                     *
* Contributors:                                                       *
* - Trifon Trifonov (trifonnt@users.sourceforge.net)                  *
*                                                                     *
* Sponsors:                                                           *
* - Company (http://www.site.com)                                     *
***********************************************************************/
...
...
/**
 *	@author Trifon Trifonov
 *	@version $Id$
 */

Adempiere Export/Import Tools

  • ADCK can be used in two modes.
    • As Development tool. To model DB design and create/modify tables.

As Development tool ADCK uses Druid which allows developer to generate CREATE TABLE and ALTER table SQL statement for various DBs: Oracle, Postgres, MySQL, ... As Development tool ADCK can generate xml files for various tools and frameworks like: hibernate, torque.

    • As transfer tool for only migrating AD changes from Adempiere instance to instance or from version to version.

As transfer tool ADCK require initial just setting of proper settings in properties files.

2Pack vs. ADCK comparison table.

This table is made with the sole purpose to help me to organize information regarding import/export tools in Adempiere. I do not have any idea to push any of the tools mentiod here. It is user's choice to use or not to use any of them and also users choice to have headache after thier usage.

WARNING: !!!MAKE A BACKUP BEFORE ANY USAGE OF ANY OF THE TOOLS!!!

2PackADCK
menumenu
windowwindow
tabtab
fieldfield
processprocess
processparaprocesspara
tabletable
columncolumn
impformatAD_ImpFormat
impformatrowAD_ImpFormat_Row
printformatAD_PrintFormat
printformatitemAD_PrintFormatItem
reference[[ADCK |]]
referencelist[[ADCK |]]
referencetable[[ADCK |]]
reportview[[ADCK |]]
reportviewcol[[ADCK |]]
task[[ADCK |]]
form[[ADCK |]]
workbench[[ADCK |]]
preference[[ADCK |]]
roleAD_Role
???AD_User
userroleAD_User_Roles
orgroleAD_Role_OrgAccess
windowaccessAD_Window_Access
processaccessAD_Process_Access
formaccessAD_Form_Access
workflowaccessAD_Workflow_Access
taskaccess[[ADCK |]]
???AD_Column_Access
???AD_Language
???AD_Message
???AD_PrintTableFormat
???AD_Scheduler
???C_BP_Group
???M_Product_Category
???PA_ReportColumnSet
???PA_ReportColumn
???PA_Report
???PA_ReportLineSet
???PA_ReportLine
???PA_ReportSource
???AD_Client
2Pack Any TableADCK Any Table
???TEMPLATE

Weak sides of 2pack according me

  • Require integration at source code level with Adempiere, which means that if i need to customize any import functionality i must rebuild whole application or patch it.
    • Carlos pointed that 2Pack can import records into any table, even customized.
    • My comment is regarding main xml elements like: menu, window, tab, field, process, ... First time when i understood that i need to modify main xml elements was for JasperReports integration when i had to add new column into AD_Process table.
    • I think that GenericPO which is responsible to import records into Any Table had one issue (I have to remember the exact reason. It was regarding Sequences or something related. ).
    • Format of general imports is complicated.

  • Main class(org.adempiere.pipo.PackInHandler) which handle import is very big(3800 lines) and complex, which require lot of time for developer to study it and makes modifications hard task.
    • Since version 3.3.0 Low Heng Sin refactored org.adempiere.pipo.PackInHandler and now it is split into multiple classes.
  • 2Pack uses SAX Parser which makes developer job harder as developer can't look forward or backward in XML tree.

Weak sides of ADCK according me

  • It is external program, so user do not have such detailed control over security.
  • It is harder for developer to work with it as do not have automatic changes extraction like 2Pack.

Ideas for extensions

SOUNDX support


Computerized Maintenance Management System

sf.net post CMMS is Computerized Maintenance Management System that designed specially for preventive maintenance for assets such as light vehicle, heavy equipment etc. so that company can create budgeting for repair and maintenance for their assets. Technicaly the module give alert to user when an asset have to get action such as replace fuel filter, oil filter or other item spareparts. Therefore these module related with inventory (internal use). Inventory will decrease its stock when user CMMS request for repair and maintenance their an asset.


Additional fields in I_Xxx tables

sf.net forum post

By: Carlos (globalqss)

Hi, every time I customize tables for a customer (almost all projects) I need to change the importers and/or make some tricks with not used fields on import. [Struggling today with this case]

Idea!

Not tested, but I think I could make a ModelValidator on udpate of I_ table (i.e. I_BPartner) and process the corresponding fields.

The other thing we could do is to add some free fields to every I_ table as wildcards to save customized or non considered fields and process them properly with the ModelValidator. Maybe just adding i.e. 10 fields FreeField01 through FreeField10 on the tables can make the trick.

Recent Adempiere changes

Avoid usage of clearing accounts

Tracker also contains a .doc file which show the effect of the change and he scripts to test it with GardenWorld.


Add more query method to MTable

Date: 2007-08-21

MTable has new method:

	public Query createQuery(String whereClause, String trxName) 
	{
		return new Query(this, whereClause, trxName);
	}

Jar file in 2pack/lib will be packed into Adempiere.jar

Starting from revision 3261 of trunk, any jar file that is pack of the lib folder of a 2pack package will be packed into the Adempiere.jar by the run_setup process. What this mean is, you just need to compile all libero specific code, pack it in a jar file and place it under the lib folder of the libero 2pack archive. Please look at the latest FAPack006.zip in the svn packages folder for an example.


Reorganization of Adempiere menu

<menu name="" >
  <menu name="Export Format" >
    <window name="Export Format" />
  </menu>
</menu>


Suggested menu:

<menu name="Quote-to-Invoice" >
  <menu name="Sales Orders" >
    <menu name="Rules" >
      <window name="" />
      ...
    </menu>
    <menu name="Transact" >
      <window name="" />
      ...
    </menu>
    <menu name="Report and Inquire" >
      <window name="" />
      ...
    </menu>
    <menu name="Processes" >
      <window name="" />
      ...
    </menu>
  </menu>

  <menu name="Shipments" >
    <menu name="Rules" >
      <window name="" />
      ...
    </menu>
    <menu name="Transact" >
      <window name="" />
      ...
    </menu>
    <menu name="Report and Inquire" >
      <window name="" />
      ...
    </menu>
    <menu name="Processes" >
      <window name="" />
      ...
    </menu>
  </menu>
</menu>

CRM systems

Comparison of CRM systems


Localized in Bulgarian


Interesting news/Forum post regarding CRM systems

Wiki

XWiki

ERP Systems

  • Average price of ERP Good article. Shows TCO.
  • TinyERP design
  • PostBook Server part build with Postgre SQL procedures.
    • Good points[7]:
      • - Amazing categories in master data setup - accounting and so on.
      • - Very user-friendly forms
    • Weak points:
      • - PostBooks has not workflow (or i could not find it) and ERP system without wf is meaningless.
      • - Only desktop application
      • - Technical weakness are DB Stored procedures.



ERP Requirements

Features that a composite of UK government bodies classified as Mandatory, Highly Desirable and nice-to-have in financial systems. Chapter 9 sets out their requirements on fixed assets. List they came up seems to have general application.


Seats/tables in a restaurant (or plane or cinema)

In my opinion the seat/table numbering problematic could be solved with the help of the entities AccommodationClass, AccommodationMap described in the book vol2. I will give you a short description of these entities and example of the "numbering issue" solution.

AccommodationClass - description: It is designed to store classes information (these could be plane, bus classes, table types, chair types, room types etc)

AccommodationClass - definition (based on the book but modified a little) fields: accClassId, parentAccClassId, description


AccommodationMap - description: Its idea is to provide information of the number of spaces offered by a fa/accClass. Here we can extend it to provide overbooking information and seat numbering information(the last two fields in the definition below) fields: mapId, accClassId, faId, nrOfSpaces, overBooked, number

Example: Define two tables.

- Table number 5 has 3 chairs. Chair with number 1 is baby_chair. The other two chairs with number 2 and 3 are high_chairs.
- Table number 9 has 2 chairs. Chairs number 1 and 2 are normal_chairs.

In FixedAsset relate the tables to the chairs.

FixedAsset:fixedAssetId=table1,  parentFixedAssetId=NULL
FixedAsset:fixedAssetId=table2,  parentFixedAssetId=NULL
FixedAsset:fixedAssetId=chair11, parentFixedAssetId=table1 //chair11 belongs to table1
FixedAsset:fixedAssetId=chair12, parentFixedAssetId=table1 //chair12 belongs to table1
FixedAsset:fixedAssetId=chair13, parentFixedAssetId=table1 //chair13 belongs to table1
FixedAsset:fixedAssetId=chair14, parentFixedAssetId=table2 //chair14 belongs to table2
FixedAsset:fixedAssetId=chair15, parentFixedAssetId=table2 //chair15 belongs to table2

In Accommodationclass define the table/chair classes.

AccommodationClass: accClassId=tables,        parentAccClassId=NULL
AccommodationClass: accClassId=chairs,        parentAccClassId=NULL
AccommodationClass: accClassId=plane_classes, parentAccClassId=NULL
AccommodationClass: accClassId=baby_chair,    parentAccClassId=chairs;
AccommodationClass: accClassId=high_chair,    parentAccClassId=chairs;
AccommodationClass: accClassId=normal_chair,  parentAccClassId=chairs;


In AccommodationMap define how many places each table or chair has and which is its number.

AccommodationMap: accClassId=tables,        fixedAssetId=table1,  nrOfSpaces=3, number=5 //table number 5 has 3 chairs(faId=table1)
AccommodationMap: accClassId=baby_chair,    fixedAssetId=chair11, nrOfSpaces=1, number=1 //chair number 1 has one place(faId=chair11)
AccommodationMap: accClassId=high_chair,    fixedAssetId=chair12, nrOfSpaces=1, number=2 //chair number 2 has one place(faId=chair12)
AccommodationMap: accClassId=high_chair,    fixedAssetId=chair13, nrOfSpaces=1, number=3 //chair number 3 has one place(faId=chair13)
AccommodationMap: accClassId=tables,        fixedAssetId=table2,  nrOfSpaces=2, number=9 //table number 9 has two places(faId=table2)
AccommodationMap: accClassId=normal_chair,  fixedAssetId=chair14, nrOfSpaces=1, number=1 //chair number 1 has one place(faId=chair14)
AccommodationMap: accClassId=normal_chair,  fixedAssetId=chair15, nrOfSpaces=1, number=2 //chair number 2 has one place(faId=chair15)

In similar fashion you can define theaters, planes etc. Also overbooking data could be kept in the AccommodationMap entity which could be used for hotel reservations. Hourly reservations could be enabled as well with the introduction of the AccommodationSpot entity.

ERP articles


Historic Data

Comparison of Open Source ERP Systems


SAP


Compiere

My opinion is that this is very outdated information, but who knows...


  • Interesting posts from Compiere forums
Take over Compiere you need Albert

OpenBravo

Open Compiere

Tina POS


Weak sides


Questions and Answers

HTML/CSS



Tips for Ste design

J2EE


Java related






  • Calendar
    • Bedework: Open Source Calendar for the Enterprise
    • GCALDaemonOS-independent Java program that offers two-way synchronization between Google Calendar and various iCalendar compatible calendar applications. GCALDaemon is primarily designed as a calendar synchronizer but it can also be used as a Gmail notifier, Address Book importer, Gmail terminal and RSS feed converter.



Hibernate

  • Hibernate Synchronizer Eclipse plig-in which automatically generate java code when your hibernate mapping files are modified.


JPA

Dynamic model; Adding columns runtime


Data/Properties Binding


Bean Validation

  • OValObject validation framework for Java™ 5 or later

Java Tips

  • Iterating through entries of Map or EntrySet
// Assuming map = Map<String, String>
for (Iterator iter = map.entrySet().iterator(); iter.hasNext();)
{ 
    Map.Entry entry = (Map.Entry)iter.next();
    String key = (String)entry.getKey();
    String value = (String)entry.getValue();
}
  • Parsing date with java DateFormat
  DateFormat df = DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.SHORT, Locale.ENGLISH);
  df.parse("02/20/08 10:10 pm"); // Works
  df.parse("02/20/08 10:10"); // Fails

Frameworks

WidgetServer is a component based, server-side, Java/XML rich-client-framework which enables an application to run as either

- an application with a rich Web client based on AJAX (HTML, XML, CSS, Javascript)
- an application with a simple Web client based on HTML and CSS
- a standalone application with a Swing GUI,
- a client/server application with a thin Swing client,
- or a mobile application on different devices like PDAs or Smartphones


Spring


Struts


NetKernel


MD4J

  • MD4JMD4J is a passive, model driven, extensible J2EE webapp generator. Currently Hibernate 3 mappings are supported as input, with EJB 2.1, Struts 1.x and JSP 2.0 as output for CRUD and Search operations with patterns like MVC, DAO and SessionFacade. Ant task included.

Design Patterns, Design metrics, QA

  • JDepend JDepend traverses Java class file directories and generates design quality metrics for each Java package. JDepend allows you to automatically measure the quality of a design in terms of its extensibility, reusability, and maintainability to manage package dependencies effectively.

Java and IM


IRC


IRC Articles

Java Content Repository API


Autocompletion


CI - Continuous Integration

Dependency Injection


Java Graph/Report packages

  • Linguine MapsProvides clean object-oriented diagramming API for graph visualization. It visualizes Apache Ant files, Hibernate and Apache Object Relational Bridge mapping files, DTD's for XML and more.
  • Graphviz - Graph Visualization Software

Java GUI


Java GUI Libraries

UFace


SWT

  • SWT SnippetsSnippets are minimal stand-alone programs that demonstrate specific techniques or functionality

DMS - Document Management Systems


File Format conversion

CMS - Content Management Systems

Java based


PHP based

Eclipse IDE and Application build on Eclipse


Eclipse Easy Shell plugin

gnome-terminal --working-directory {1}
  • Seetings for windows
cmd.exe /C start /D{1} cmd.exe /K "rxvt.exe -fn "Console" -vb +sb -sl 1000 -e bash -I"


Eclipse Preprocessor Plugin

  • Adempiere Preprocessor Example code-1
/* $if isAdempiere $
  Env.setContext(Env.getCtx(), "#AD_Org_ID", AD_Org_ID);  // Adempiere
$else$ */
  Env.getCtx().setContext("#AD_Org_ID", AD_Org_ID);       // Compiere
/* $endif$ */


  • Adempiere Preprocessor Example code-2
			// =================
			/* $if isAdempiere $
			Env.setContext(Env.getCtx(), "#AD_User_ID", CreatedBy_ID);  // Adempiere
			$else$ */
			Env.getCtx().setContext("#AD_User_ID", CreatedBy_ID);       // Compiere
			/* $endif$ */
		}
		// =================
		/* $if isAdempiere $
		Env.setContext(Env.getCtx(), "#AD_Client_ID", AD_Client_ID);  // Adempiere
		$else$ */
		Env.getCtx().setContext("#AD_Client_ID", AD_Client_ID);       // Compiere
		/* $endif$ */
	    // =================
	    /* $if isAdempiere $
		Env.setContext(Env.getCtx(), "#AD_Org_ID", AD_Org_ID);  // Adempiere
		$else$ */
		Env.getCtx().setContext("#AD_Org_ID", AD_Org_ID);       // Compiere
		/* $endif$ */

Script Languages


Eclipse plugin

Java FTP Libraries and Articles


Posts regarding FTP and SSL


Commercial which support FTPS (FTP Over SSL)

OpenXava hints

  • Naming convention
    • Utility classes are in org.openxava.util package.
    • An utility class must be in plural and its methods have to be static.
    • Example utility class: For dates called Dates.


OpenXava User hints

Hint.1 How do to search in detail mode?

Click on 'new', fill the fields, and click on 'Search'.


OpenXava Developer hints

Hint.1 Always use different properties names

Let's have component Organization

<component name="Organization">
	<entity>
		<property name="orgId" type="String" key="true" hidden="true" >
			<default-value-calculator class="org.openxava.calculators.UUIDCalculator" on-create="true" />
		</property>
		<property name="orgName" type="String" size="30" required="false"/>
...
</component>

and component Warehouse

<component name="Warehouse">
	<entity>
		<property name="warehouseId" type="String" key="true" hidden="true" >
			<default-value-calculator class="org.openxava.calculators.UUIDCalculator" on-create="true" />
		</property>
		<property name="warehouseName" type="String" size="30" required="false"/>
...
</component>

by this way in Application_en.properties developer can define different names for properties:

organizationId=Organization ID
orgName=Organization Name
warehouseId=Warehouse ID
warehouseName=Warehouse Name

also it helps developer to understand well which exactly property he uses/modify.

Hint.2 Always create by hand DB migration scripts.

ORM(Hibernate) tools do not create proper DB migration scripts.

OpenXava Links & Info

  • OpenXava Wiki page
  • qaProjectManager Web based application used for keeping track of engineering and customer releases, Resource allocations and related information effectively in QA Projects. Powered by openXava.
  • Nice to have OpenXava features:
    • Icon in header of each column indicating that column can be sorted.
    • When hook over header of column to show more information for column. Information to be configured in OpenXava xml files.
    • Ability to align labels in forums.


==========================================================================================
                                                                  +----------------------+
                                                          Actions:|1.- Pick              |
                                                                  |2.- Edit              |
                                                                  |3.- Copy              |
                                                                  |4.- Delete            |
                                                                  |5.- See (Detail mode) |
                                                                  +----------------------+
                                                                  |A.- Detail of Subjects|
     +--------+-----+------------------------+----------------+   |B.- Send e-mail       |
     | ACTION |  ID | Pupil                  | Comments       |   |C.- Print curriculum  |
     +--------+-----+------------------------+----------------+   |D.- etc...            |
     |   A    |  1  | Eduard Escrihuela      | Firt pupil     |   +----------------------+
     +--------+-----+------------------------+----------------+
     |   C    |  2  | Enric Selfa            | Second pupil   |
     +--------+-----+------------------------+----------------+
     |  ..    | ..  | ..                     | ...            |
                                                                       +-----------------+
                                                                       | EXECUTE ACTIONS |
                                                                       +-----------------+
==========================================================================================

You can see to the left a grid whith the LIST mode of the PUPILS and the FIRST field is the ACTION to apply to the records. The A action (Detail of subjects of this pupil) is selected for the first pupil and the B action (Printing of his curriculum) is selected for the second pupil.

The actions possible are detailed in the combo on the TOP RIGHT of the window. Options 1 to 5 are standard (always available by default). The rest of actions are specific to the model .

Finally there is a button for executing ALL the actions at the same time.

The default actions are:

1.-Pick: For instance to select a Customer for a invoice. By using this action you choose your customer and return to previous model (invoice)

2.- Edit: To modifiy the record

3.- Copy: To create a new record but previously copying the information of an existing record that is very similar to the new one

4.- Delete: to delete the record

5.- See: To see the record in detail mode and READ ONLY

OpenXava Q & A

Created an entity ticketClass with a method GenerateTickets. Implemented the calculator using an IModelCalculator class.

Want to create a button/link when ticketClass is displayed so that user click on it the method gets executed.


Q.1 How do I set this up?

  • A1. Have to create an action and include it in the controller of your module.

In this action, you can obtain the object and call to you method, something like this:

public void execute() throws Exception {
  ...
  TicketClass ticketClass = (TicketClass) MapFacade.findEntity(getModelName(), getView().getKeyValues());
  ticketClass.generateTickets();
  getView().findObject(); // This refresh the view (Q2)
  ...
}


Q.2 How can I get the view of the entity refreshed after the method is executed.

  • A2. See the above code


Q.3 How can i reload other modules to reflect the changes made by an action that was performed in one module?

An action in one module (module A) that changes the value of the data contained in another module (module B), when i execute an action button (in module A), it executes successfully and updates the data in the other entity (entity B) in the database, but when i view module B, the module list view (of module B) is still showing the old data!

  • A3. In a Liferay 2.1.3 with OX2.2 it works fine, that is, I modify data in a portlet, I move to another and the data

is refreshed without touch filter nor any other action. Look at your web/WEB-INF/portlet.xml, have you <expiration-cache>0</expiration-cache> for your portlets? Since OX2.1 expiration-cache is 0 in the portlet.xml generated by OpenXava. Hence, if you are using OX2.1 or better you only need to execute the ant target 'redeployPortlets' in order to fix your portlet.xml file.


Q.4 How to avoid warnings that messages are not translated

  • A4.

This messages warn you about the labels that you need to put in your i18n/YourProyectName-labels_en.properties. Developer can avoid this messages putting the next line:

i18nWarnings=false

in the file properties/xava.properties of your project.


Q.5 Example TestCase

public class ExampleTest extends ModuleTestBase { 
 
  public DepartmentsTest(String testName) { 
  
  super(testName,"ExampleManager", "ExampleModlue");
  } 
  
  public void testCreateReadUpdateDelete() throws Exception { 
  
    //Test Create
    execute("CRUD.new");
    setValue("id", "ENG");
    setValue("name", "Example Name");
    setValue("description", "Example description");
    assertNoErrors();
  } 
}


Q.6 How to provide a web API for accessing the OpenXava application?

Just use Web Services. The OpenXava applications are standard Java Web applications, therefore you can use any Java API from your OpenXava application.

In this case you can create a simple Java class, with the services of you application that you want to expose. And use from it MapFacade or the model objects generated by OpenXava, or whatever code of your application you want. Something like this:

public class MyService {

  public Address getCustomerAddress(String customerId) throws Exception {
    // Here you use the POJOs generated by OpenXava
    Customer customer = (Customer) Customer.findById(customerId);
    return customer.getAddress();
  }
}

Now you can create a Web Service from MyService class using AXIS, or the wizard included in Eclipse WTP. But, remember, all this is a Java issue, not an OpenXava one.


Q.7 Magic numbers

It is possible to define some magic numbers in OX? The Environment Variables are not enough. I want to use the magic numbers in components.

  • A7. Use standard techniques for Java and XML.

In Java you can use "public final static" variables:

public class MyMagicNumbers {
  public final static int MY_MAGIC = 24324;
}

In XML you can use XML ENTITIES:

<!ENTITY mymagic "24324">

and then use &mymagic; instead of 34324.

These techniques are not from OpenXava but from Java and XML.

In XML you can use @mymagic@, and the filter of OpenXava ant build changes it from a value of your properties file. This allows you to have a different value of @mymagic@ for each customer or configuration. This is a technique from OpenXava.


Q.8 How to access EJB from OpenXava

  • Reference Guide section 3.14.
  • There is a example of using a EJB inside validator.
  • Developer can access EJB code in any part of OpenXava applications, for example:
Delivery delivery = DeliveryUtil.getHome().findByNumber(33);
delivery.generateInvoice();


Q.9 Access rights depending on the user profile

  • sf.net thread
  • User should only see fields or to execute actions depending on his user profile (or role).
  • Certain users to be able to update certain fields while others may only read them.


1. Option - provided by the container portal

  • Create two groups of users:
    • First with create-delete-edit rights.
    • Second only with read rights.
  • Define two modules(portlets):
    • First with CRUD controller.
    • Second with Print controller.

The admin may assign First or Second module (portlet) for each group of users with the portal administrative tools.

2. Option

Not completly implemented in OpenXava, but there are some useful tools in OX that can help:

  • Users.getCurrent() return the current user if application is started in portal. This value may be used in any point of the code.
  • Filters: filters the data displayed in the mode list according to the current user.

A full management of users in OX project implies creation of several modules for storing the info about users, interfaces for change rights and create new users, roles and rights, overwrite standard controllers, to write new actions (typically "save" action, frequently "new" action too), to write specific validator, to write filters for tabs in list mode, and more...

Javier's opinion: I think that part of this stuff can be moved to a new project, instead of be included in OX core. This new project would manage access rights and user profiles, and will be reusable for other projects.

Links


Q.10 Property displayed as Radio button

  • Existing test case: CustomerWithRadioButtons
  • Section 4.7 of reference guide shows how editors are full configurable in OpenXava.
  • /components/SomeComponent.xml file
<entity>
  <property name="gender" >
	<valid-values>
		<valid-value value="Male"/>
		<valid-value value="Female"/>
	</valid-values>
  </property>
</entity>
<view>
  <property-view property="gender" editor="ValidValuesRadioButton"></property-view>
  <members >
    name;
    gender;
  </members >
<view>
  • OpenXava/xava/default-editors.xml contains definition of:
    • ValidValuesRadioButton
<editor name="ValidValuesRadioButton" url="radioButtonEditor.jsp">
	<property name="horizontal" value="true" />
</editor>
    • ValidValuesVerticalRadioButton
<editor name="ValidValuesVerticalRadioButton"
	url="radioButtonEditor.jsp">
	<property name="horizontal" value="true" />
</editor>
    • ValidValuesHorizontalRadioButton
<editor name="ValidValuesHorizontalRadioButton"
	url="radioButtonEditor.jsp">
	<property name="horizontal" value="true" />
</editor>

It looks both last have the same value for horizontal request parameter <property name="horizontal" value="true" />. Probably this is a mistake.


Q.11 OpenXava design

  • All model classes implement org.openxava.model.IModel interface:
/**
 * Interface to be implemented by all model classes. <p>
 * 
 * The model classes may be EntityBeans EJB 2 or POJOs (for JDO, EJB3 or Hibernate).
 * 
 * @author Javier Paniza
 */
public interface IModel {
	
	/**
	 * Returns metadata about object. <p>
	 * 
	 * @return  Not null.
	 * @exception XavaException  Any problem related to OpenXava.
	 * @exception RemoteException  System problem.
	 */
	MetaModel getMetaModel() throws XavaException, RemoteException;

}


Q.12 How to get logger

OpenXava uses Apache Commons Loggin

private static Log log = LogFactory.getLog(Users.class);


Q.13 Using the <transient> tag

Section 4.10 of Reference guide says:

"put <transient/> at the end of the component definition (1), just in the part for the mappings"

Make sure you write the following:


<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE component SYSTEM "dtds/component.dtd">
<component name="YourComponent">
     <entity>
         ...
     </entity>
     ...
     <transient/>   <!--If you put it anywhere else you will see error in the
document-->
</component>


Q.14 Search criteria customization in List mode

Requirement: The user writes his search criteria (Type employee salary for example) and then presses the search button.

Create a module that start in detail mode. Use a view that show just the data for filtering.

Define a controller with your "Search" actions, and in this action change to list mode.

In this way you can achieve your goal.

Read the chapters 7 and 8 of Reference Guide.


Q.15 How to change Action view from link to button?

1. Create a new property called 'buttonsForNoImageActions' (or so), for use in xava.properties.

2. Add the property in the class XavaPreferences.

3. Modify the class ActionTag.

By default, buttonsForNoImageActions must be 'false', in order to not change the current OX behavior (by default).


Temporary solution. Change actionEditor.jsp

- <xava:link action="<%=p.getAction()%>"/> 
+ <xava:button action="<%=p.getAction()%>"/> 


Q.16 How to open/goto custom jsp?

DECLARATIVE jsp navigation, as following:

<action name="goToMyJSP" class="org.openxava.actions.NavigationAction">				
  <set property="customView" value="mypage.jsp"/>
  <set property="nextController" value="MyController"/>
</action>				

In general, action classes can be made reusable, and can be configured in controllers.xml. In this way can do more configuration and less programming.


Q.17 How to make a property as a NOT persistent or view only field in the entity element?

Yes, it's possible.

Two options:

Option 1. Calculated properties (section 3.8.4 of reference guide)

It is possible to use qualified properties!

<component name="Engagement">
	<entity>
...
<property name="cmpContactName" type="String" size="60" >
	<calculator class="org.openxava.calculators.StringCalculator" > 
		<set property="string" from="cmpContact.compName.custCompName"/> 
	</calculator>
</property>
...
</component>

No need to create special Calculator!

<component name="Engagement">
	<entity>
...
<property name="cmpContactName" type="String" size="60" >
	<calculator class="bg.d3soft.openxava.calculators.CompanyContactNameCalculator" >
	</calculator>
</property-->
...
</component>


Option 2. View properties (section 4.5 of reference guide)

View properties are used for the case that you want to have something editable in the view, but you do not want to save it in DB. View properties do not have same functionality as properties. That's why this behavior is normal. For some reason view property do not show the same result:

<component>
...
<view>
	<property name="cmpContactName" type="String" size="60" >
		<calculator class="org.openxava.calculators.StringCalculator" > 
			<set property="string" from="cmpContact.compName.custCompName"/> 
		</calculator>
	</property>
...
</view>
</component>


Q.18 How to implement Wizard form

First consider seriously to use a single view with several sections. This is more flexible in most cases and easy to implement with OpenXava.

Steps: Your action for navigate must implements IChangeControllersAction, this allows you to change the actions to show in each page, and using

getView().setViewName( ... );

inside execute() of your action, you can change the view in each step.

Look at the Reference Guide and OpenXavaTest for IChangeControllersAction, and also for INavigationAction.


Q.19 How to forward to a JSP

Action obtains two values which are important for the JSP.

Create a IForwardAction with a code like:

 
public String getForwardURI() { 
    return "/mypage.jsp?a=" + getA() + "&b=" + getB(); 
}

And put mypage.jsp in the 'web' folder of your project.


Q.20 How to change order of error messages?

Method 'validate' of MapFacadeBean:

private void validate(Messages errors, MetaModel metaModel, Map values, Map
keyValues, Object containerKey, boolean creating)
		throws XavaException, RemoteException {		
		Iterator it = values.entrySet().iterator();		
		while (it.hasNext()) {
			Map.Entry en = (Map.Entry) it.next();
			String name = (String) en.getKey();
			Object value = en.getValue();
			validate(errors, metaModel, name, value, creating);
		}
		if (metaModel.containsValidadors()) {
			validateWithModelValidator(errors, metaModel, values, keyValues,
 containerKey,
creating);
		}
	}

In this case the loop is over entrySet of a Map, hence the order is unknown. You can modify this method in order to work by the correct order, some method of MetaModel returns the member names in order of declaration.

Q.21 How to disable the icon in the corner most column in column arrangement view?

Modify list.jsp.


Q.22 How to open custom JSP view in a pop up window?

Is it possible to open custom JSP view in a pop up window?

No. The custom JSP must be inside the module. Use IForwardAction that has a method (inNewWindow()) for create a pop up windows. You can put your JSP in a public folder, and send the parameters for this jsp using OX session objects.

Q.23 How to hide/show view section depending on user rights?

Some users must be able to see given section from the view while other users must NOT be able to see this section.

At the moment developer can hide (using View.setHidden) members and groups, but not sections.

There are 4 (at least) options:

  • Use OpenXava/src/org.openxava.view.View.setSectionEditable.
  • Put your sensible data in a group, and hide/show it.
  • Create 2 views (one with the critical section, another without it).
  • Modify OpenXava to allow to hide programatically sections.


  • Which class should change view or hide section?
    • SEARCH_ACTION and 'new' Action are good places.
    • Other options as in an on-each-request action, or an on-init action.


  • Guide how to develop option 4?
    • Look at OpenXava/src/org.openxava.view.View.setHidden method.

Q.24 How to display only label in view?

Use a property of the view with stereotype LABEL.

<view>
  <property name="selectLabel" stereotype="LABEL" type="String" >
  </property>
  <members>
     selectLabel;
     a;
     b;
  </members>
</view>

File Application_en.properties must contain translation of property:

selectLabel=Select at least one:


Another option may be to have a property with no content and 'Select at least one:' as label.

File: xava/editors.xml

<?xml version = "1.0" encoding = "ISO-8859-1"?>
<!DOCTYPE editors SYSTEM "dtds/editors.dtd">
<editors>
	<editor url="void.jsp">
		<for-stereotype stereotype="VOID" />
	</editor>
</editors>

Create empty file: web/xava/editors/void.jsp


Difference is only in stereotype:

<view>
  <property name="selectLabel" stereotype="VOID" type="String">
  </property>
  <members>
     selectLabel;
     a;
     b;
  </members>
</view>


Q.25 How to make property required from Action?

Make a property 'X' required depending on the value of other property 'A'. If property 'A' has value 111 than property 'X' must became required.

<property-view property="A">
    <on-change class="bg.d3soft.openxava.actions.OnChangeA"/> 
</property-view>
  • Use a validator for property X (reference guide 3.8.6), and inject in the validator the property A (using <set />).
  • Use a model level validator (section 3.16).

You cannot change the state of a property from 'required' to 'not required' at runtime (well, you can, but you shouldn't), because required is a feature of the model, not of a view. You can access to the MetaModel at runtime and change the value of required, but if you do it in this way the value will be change for all modules, and all users at the same time, because you are modifying the meta data of the model.


Q.26 How to display property of a reference?

View properties are used for the case that you want to have something editable in the view, but you do not want to save it in DB.

  • If property must be read only than use a calculated property.
  • If property must be editable than:

Use a property of the view, populate it in the code in SEARCH_ACTION, and save its content in your own Save action.


Q.27 How to add EMAIL stereotype and validation class

Will be part of OpenXava 2.2.3! sf.net post

1) Add to Application/xava/default-size.xml

<for-stereotype name="EMAIL" size="50"/>


2) Add to Application/xava/editors.xml

<editor url="textEditor.jsp">
  <for-stereotype stereotype="EMAIL"/>
</editor>


3) Add to Application/xava/stereotype-type-default.xml

<for stereotype="EMAIL" type="String"/>


4) Add to Application/i18n/messages_en.properties file

email_validation_error={0} must be a valid email address


5) Validation class

package org.openxava.validators;

import org.openxava.util.*;
import org.openxava.validators.IPropertyValidator;
import java.util.regex.Pattern;
import java.util.regex.Matcher;

public class EmailValidator implements IPropertyValidator {

    Pattern pat=Pattern.compile(".+@.+\\.[a-z]+");

    public void validate(Messages errors, Object value, String propertyName,
String modelName) throws Exception {

        if (value == null || value.toString().length() ==0 ) return;
        Matcher matcher = pat.matcher(value.toString());
        if (! matcher.find()) {
           errors.add("email_validation_error", propertyName);
           return;
        }
    }
}


5.1) Second version of Validator class using Apache Commons validator

import org.apache.commons.validator.GenericValidator;
import org.openxava.util.Messages;
import org.openxava.validators.IPropertyValidator;

/**
 * @author Janesh Kodikara
 */
public class EmailValidator implements IPropertyValidator {

    public void validate(Messages errors, Object value, String propertyName, String modelName) throws Exception {

        if (value == null || value.toString().length() == 0) 
          return;

        if (! GenericValidator.isEmail(value.toString())) {
            errors.add("email_validation_error", propertyName);
            return;
        }
    }
}


Q.28 How to translate OpenXava

For example to Bulgarian (bg).

  • Copy OpenXava/i18n/Labels_en.properties to OpenXava/i18n/Labels_bg.properties.
  • Copy OpenXava/i18n/Messages_en.properties to OpenXava/i18n/Messages_bg.properties.

Translate Labels_bg.properties and Messages_bg.properties!

Thread which can be useful: here


Q.29 How to translate application based on OpenXava

For example to Bulgarian (bg).

  • Copy <ApplictionName>/i18n/Labels_en.properties to <ApplictionName>/i18n/Labels_bg.properties.
  • Copy <ApplictionName>/i18n/Messages_en.properties to <ApplictionName>/i18n/Messages_bg.properties.

Translate Labels_bg.properties and Messages_bg.properties!

Thread which can be useful: here


Q.30 How to add PASSWORD stereotype

1) Create new file in Application/web/xava/editors/passwordEditor.jsp

<%@ page import="org.openxava.model.meta.MetaProperty" %>
<%@ page import="org.openxava.util.Strings" %>
<%@ page import="org.openxava.util.Align" %>

<jsp:useBean id="style" class="org.openxava.web.style.Style" scope="request"/>

<%
String propertyKey = request.getParameter("propertyKey");
MetaProperty p = (MetaProperty) request.getAttribute(propertyKey);
String fvalue = (String) request.getAttribute(propertyKey + ".fvalue");
String align = p.isNumber()?"style='text-align:right'":"";
boolean editable="true".equals(request.getParameter("editable"));
String disabled=editable?"":"disabled";
String script = request.getParameter("script");
boolean label = org.openxava.util.XavaPreferences.getInstance().isReadOnlyAsLabel();
String smaxSize = request.getParameter("maxSize");
int maxSize = 0;
if (!org.openxava.util.Is.emptyString(smaxSize)) {
	maxSize = Integer.parseInt(smaxSize);
}
else {
	maxSize = org.openxava.util.XavaPreferences.getInstance().getMaxSizeForTextEditor();
}
int size = p.getSize() > maxSize ? maxSize : p.getSize(); 

/*
boolean fillWithZeros = "true".equals(request.getParameter("fillWithZeros"));
if (fillWithZeros && fvalue.length() > 0) {	
	fvalue = Strings.fix(fvalue, size, Align.RIGHT, '0');
}
*/

if (editable || !label) {
%>
<input name="<%=propertyKey%>" class=<%=style.getEditor()%>
	type="password" 
	title="<%=p.getDescription(request)%>"
	<%=align%>
	maxlength="<%=p.getSize()%>" 
	size="<%=size%>" 
	value="<%=Strings.change(fvalue, "\"", """)%>"
	<%=disabled%>
	<%=script%>
	/>
<%
} else {
%>
<%=fvalue%> 
<%
}
%>
<% if (!editable) { %>
	<input type="password" name="<%=propertyKey%>" value="<%=fvalue%>">
<% } %>			


2) Add to Application/xava/editors.xml

<editor url="passwordEditor.jsp">
  <for-stereotype stereotype="PASSWORD"/>
</editor>


3) Add to Application/xava/Stereotype-type-default.xml

<for stereotype="PASSWORD" type="String"/>


4) Example usage Application/components/Employee.xml

<component name="Employee">
  <entity>
...
    <property name="empPassword" stereotype="PASSWORD" size="20" required="true"/>
...


Q.31 How to develop import functionality

1) Create new file in Application/web/xava/editors/loadCSVFile.jsp

<%@ include file="../imports.jsp"%>

<jsp:useBean id="style" class="org.openxava.web.style.Style" scope="request"/>

<table>
<th align='left' class="<%=style.getLabel()%>">
<xava:message key="enter_new_csv_file"/>
</th>
<td>
<input name = "newCsvFile" class=<%=style.getEditor()%> type="file" size='60'/>
</td>
</table>


2) Add new class to Application/src/bg/d3soft/openxava/actions/LoadCSVFileAction.java

package bg.d3soft.openxava.actions;

import org.openxava.actions.BaseAction;
import org.openxava.actions.ILoadFileAction;

public class LoadCSVFileAction extends BaseAction implements ILoadFileAction {
	
	private String newCsvFileProperty;	
	
	
	public void execute() throws Exception {
		
	}
	
	public String[] getNextControllers() {
		return new String [] { "ImportCSVFile" };
	}

	public String getCustomView() {
		return "xava/editors/loadCSVFile";
	}

	public boolean isLoadFile() {
		return true;
	}

	public String getNewCsvFileProperty() {
		return newCsvFileProperty;
	}

	public void setewCsvFileProperty(String string) {
		newCsvFileProperty = string;
	}
}


3) Add new class to Application/src/bg/d3soft/openxava/actions/ImportCsvFileAction.java

package bg.d3soft.openxava.actions;

public class ImportCsvFileAction extends BaseAction implements INavigationAction, IProcessLoadedFileAction {
	
	private static Log log = LogFactory.getLog(ImportCsvFileAction.class);
	
	private List fileItems;
	
	private View view;
	
	private String newCsvFileProperty;
	
	public void execute() throws Exception {		
		Iterator i = getFileItems().iterator();
		while (i.hasNext()) {
			FileItem fi = (FileItem)i.next();
			String fileName = fi.getName();
			log.info("fileName = [" + fileName + "]");
			
			if (!Is.emptyString(fileName)) {
				//getView().setValue(getNewCsvFileProperty(), fi.get());
				log.info("getNewCsvFileProperty = [" + getNewCsvFileProperty() + "]");
				log.info("fi.getSize() = [" + fi.getSize() + "]");
				
				ImportUtil impUtil = new ImportUtil();
				impUtil.importCustomerCompanyFromCSV(fi);
			}			
		}		
	}

	public String[] getNextControllers() {		
		return DEFAULT_CONTROLLERS;
	}
	public String getCustomView() {		
		return DEFAULT_VIEW;
	}
	public View getView() {
		return view;
	}
	public void setView(View view) {
		this.view = view;
	}
	public String getNewCsvFileProperty() {
		return newCsvFileProperty;
	}
	public void setNewCsvFileProperty(String string) {
		newCsvFileProperty = string;	
	}
	public List getFileItems() {
		return fileItems;
	}
	public void setFileItems(List fileItems) {
		this.fileItems = fileItems;
	}
}


4) Add to Application/i18n/Application-labels_en.properties

loadCSVFile=Import CSV File
importCSVFile=Import CSV File


5) Add to Application/i18n/Application-messages_en.properties

enter_new_csv_file=Enter CSV File


6) Add new class to Application/src/bg/d3soft/openxava/actions/LoadCSVFileAction.java



7) Add to Application/xava/controllers.xml

<?xml version = "1.0" encoding = "ISO-8859-1"?>
<!DOCTYPE controllers SYSTEM "dtds/controllers.dtd">
<controllers> 
...	
	<object name="xava_newCsvFileProperty" class="java.lang.String"/>
...
	<controller name="LoadCSVFile">
		<action name="loadCSVFile"
			class="bg.d3soft.openxava.actions.LoadCSVFileAction"
			hidden="false"
			mode="detail"
			image="images/db_update.png"
		>
			<!-- set value="" property=""/-->
			<!-- use-object name="xava_newCsvFileProperty"/-->
		</action>
		
	</controller>
	
	<controller name="ImportCSVFile">
		<action name="importCSVFile"
			class="bg.d3soft.openxava.actions.ImportCsvFileAction"
			hidden="false"
			mode="detail"
		>
			<use-object name="xava_view"/>
			<use-object name="xava_newCsvFileProperty"/>
		</action>
		
		<action name="cancel"
			class="org.openxava.actions.CancelAction">			
		</action>
	</controller>
...
</controllers>


8) Add to Application/web/xava/images/db_update.png


9) Example usage Application/xava/application.xml

...
	<module name="CustomerCompanies">
		<model name="CustomerCompany" />
		<controller name="TypicalNotResetOnSave" />
		<controller name="LoadCSVFile" />
	</module>
...


10) Example csv file

"Date Created","Name","Web Address","Corp Location"
"ERROR","CustCompName-5","www.web005.com","Corp. location-5"
"ERROR","CustCompName-6","www.web006.com","Corp. location-6"
"ERROR","CustCompName-7","www.web007.com","Corp. Location-7"


Q.32 How to create formatter for java.util.Date

Option A - Create your own formatter (IFormatter) =

Create your own formatter (IFormatter) and assign it to the java.util.Date type in editors.xml of your project.

OpenXava version 2.2.2 OpenXavaTest/xava/editors

<editor name="DateCalendar" url="dateCalendarEditor.jsp"> 
  <formatter class="org.openxava.formatters.DateFormatter" /> 
  <for-type type="java.util.Date" /> 
</editor>


Option B - Modify DateFormatter (and DateTimeFormatter) of OpenXava

Look at DateFormatter (and DateTimeFormatter) of OpenXava. They are tuned for work better for Spanish and Polish.

Changes in the DateFormatter and in the DateTimeFormatter.

In DateFormater added:

private static DateFormat germanDateFormat = new SimpleDateFormat("dd.MM.yyyy"); // modified
private static DateFormat spanishDateFormat = new SimpleDateFormat("dd/MM/yyyy");
	
private static DateFormat [] spanishDateFormats = {
	spanishDateFormat,
	germanDateFormat, // modified
	new SimpleDateFormat("ddMMyyyy"),
	new SimpleDateFormat("dd.MM.yyyy"),		
};	

In method getDateFormat(HttpServletRequest request)

if ("de".equals(request.getLocale().getLanguage())) return germanDateFormat; // modified

In DateTimeFormatter added:

private static DateFormat germanDateFormat = new  SimpleDateFormat("dd.MM.yyyy"); //modified

In the method getDateFormat(HttpServletRequest request)

if ("de".equals(request.getLocale().getLanguage())) return germanDateFormat; // modified


full source code of Formatter:

import java.text.*;

import javax.servlet.http.*;

import org.openxava.util.*;
import org.openxava.formatters.*;

public class GermanDateFormatter implements IFormatter {
	
	private static DateFormat germanDateFormat = new SimpleDateFormat("dd.MM.yyyy");
	private static DateFormat spanishDateFormat = new SimpleDateFormat("dd/MM/yyyy");
	
	private static DateFormat [] spanishDateFormats = {
		spanishDateFormat,
		germanDateFormat,   
		new SimpleDateFormat("ddMMyyyy"),
		new SimpleDateFormat("dd.MM.yyyy"),		
	};	
	
	public String format(HttpServletRequest request, Object date) {
		if (date == null) return "";
		if (Dates.getYear((java.util.Date)date) < 2) return "";
		return getDateFormat(request).format(date);
	}
		
	public Object parse(HttpServletRequest request, String string) throws ParseException
{
		if (Is.emptyString(string)) return null;
		if (string.indexOf('-') >= 0) { // SimpleDateFormat does not work well with -
			string = Strings.change(string, "-", "/");
		}		
		DateFormat [] dateFormats = getDateFormats(request); 
		for (int i=0; i<dateFormats.length; i++) {
			try {
				return dateFormats[i].parseObject(string);
			}
			catch (ParseException ex) {
			}						
		}
		throw new ParseException(XavaResources.getString("bad_date_format",string),-1);
	}
	
	private DateFormat getDateFormat(HttpServletRequest request) {
		if ("de".equals(request.getLocale().getLanguage())) 
                  return germanDateFormat;
		if ("es".equals(request.getLocale().getLanguage()) ||
		    "pl".equals(request.getLocale().getLanguage())
                ) 
                  return spanishDateFormat;
		return DateFormat.getDateInstance(DateFormat.SHORT, request.getLocale());		
	}
	
	private DateFormat[] getDateFormats(HttpServletRequest request) {
		if ("es".equals(request.getLocale().getLanguage()) ||
                    "de".equals(request.getLocale().getLanguage()) ||
		    "pl".equals(request.getLocale().getLanguage())
                ) 
                  return spanishDateFormats;
		return new DateFormat [] { getDateFormat(request) };
	}
}


Q.33 Possible properties in Application/properties/xava.properties

Java class responsible for loading xava.properties: org.openxava.util.XavaPreferences

Since version > 2.2.2.

User can hide/show the filter part on init in list and collections.

showFilterByDefaultInList=true
showFilterByDefaultInCollections=true


Since version 2.2.1.

Users.getCurrent() returns the user email instead of the user id inside a portal.

emailAsUserNameInPortal=true|false(false)
readOnlyAsLabel=true|false(false)
tabAsEJB=true|false(false)
showCountInList=true|false(true)  - avoid the initial select count(*) in the model list. It takes time when number of rows is big.
formLineSpacing=integer(1)
csvSeparator=character(;)
persistenceProviderClass=String(org.openxava.model.impl.HibernatePersistenceProvider)org.openxava.model.impl.EJBPersistenceProvider
mapFacadeAsEJB=true|false(false)
detailOnBottomInCollections=true|false(false)
jpaCodeInPOJOs=
i18nWarnings=true|false(true)
duplicateComponentWarnings=true|false(true)
failOnAnnotationMisuse=true|false(true)
maxSizeForTextEditorinteger(100)
javaLoggingLevel=String(INFO);FINEST|INFO
hibernateJavaLoggingLevel=String(INFO);FINEST|INFO

How to access Xava Properties from jsp file?

<%
boolean label = org.openxava.util.XavaPreferences.getInstance().isReadOnlyAsLabel();
%>


Q.34 How to add WEBURL stereotype and validation class

Will be part of OpenXava 2.2.3! sf.net post

1) Add to Application/xava/default-size.xml

<for-stereotype name="WEBURL" size="50"/>

2) Add to Application/xava/editors.xml

<editor url="textEditor.jsp">
  <for-stereotype stereotype="WEBURL"/>
</editor>

3) Add to Application/xava/stereotype-type-default.xml

<for stereotype="WEBURL" type="String"/>

4) Add to Application/i18n/messages_en.properties file

url_validation_error={0} must be a valid url

5) Validation class

import org.openxava.util.*;
import org.openxava.validators.IPropertyValidator;
import org.apache.commons.validator.UrlValidator;

/**
 * @author Janesh Kodikara
 */
public class URLValidator implements IPropertyValidator {

    UrlValidator urlValidator = new UrlValidator();

    public void validate(Messages errors, Object value, String propertyName, String modelName) throws Exception {

        if (value == null || value.toString().length() == 0 ) 
          return;

        if ( !urlValidator.isValid(value.toString()) ) {
          errors.add("url_validation_error", propertyName);
        }
    }
}

6) Add following jar files

A) jakarta-oro-2.0.8.jar http://jakarta.apache.org/site/downloads/downloads_oro.cgi?Preferred=http%3A%2F%2Fgovernment-grants.org%2Fmirrors%2Fapache.org

B) commons-validator-1.3.1.jar http://commons.apache.org/downloads/download_validator.cgi


Q.35 How to add TELEPHONE stereotype and validation class

Will be part of OpenXava 2.2.3! sf.net post

1) Add to Application/xava/default-size.xml

<for-stereotype name="TELEPHONE" size="15"/>

2) Add to Application/xava/editors.xml

<editor url="textEditor.jsp">
  <for-stereotype stereotype="TELEPHONE"/>
</editor>

3) Add to Application/xava/stereotype-type-default.xml

<for stereotype="TELEPHONE" type="String"/>

4) Add to Application/i18n/messages_en.properties file

phone_valid_number_error= {0} must be a valid number
phone_minimum_size_error= {0} must be at least  {2} {1} long

5) Validation class

package org.openxava.validators;

import org.openxava.util.*;
import org.openxava.validators.IPropertyValidator;

/**
 * @author Janesh Kodikara
 */
public class PhoneNumberValidator implements IPropertyValidator {
    private long minSize = 8;
    private Long phoneNumber;

    public void validate(Messages errors, Object value, String propertyName, String modelName) throws Exception {

        if (value == null || value.toString().length() ==0 ) 
          return;

        //Check if input is a number
        try {
          phoneNumber = new  Long(value.toString());
        } catch(NumberFormatException ex){
           errors.add("phone_valid_number_error", propertyName);
           return;
        }

        //Check if input length is at least greater than specified minimum length
        if ( phoneNumber.toString().length() < minSize) {
            errors.add("phone_minimum_size_error", propertyName, "digits", new Long(minSize));
            return;
        }
    }
    public long getMinSize() {
        return minSize;
    }
    public void setMinSize(long minSize) {
        this.minSize= minSize;
    }
}


Q.36 How to hide field/property

Section 3.8 of Reference Guide:

A hidden property has a meaning for the developer but not for the user.
The hidden properties are excluded when the automatic user interface is generated. 
However at Java code level they are present and fully functional. 
Even if you put it explicitly into a view the property will be shown in the user interface.

Hidden property is used mainly for hidden keys, but if you put the property in the view, the property will be show.

Example code:

When the user click 'Others' from languages combo box, the Others text field should be displayed. Entity part:

<!-- The Combo box -->
<property name="languages">
  <valid-values>
    ....
    <valid-value value="English"/>
    <valid-value value="Others"/>
  </valid-values> 
</property> 

The Others property:

<property name="otherLanguages" hidden="true" type="String" size="20"/>

View part:

<property-view property="languages"> 
  <on-change class="com.sami.actions.OnLanguagesChange"/> 
</property-view>

'OnLanguagesChange' action:

...
getView().setHidden("otherLanguages", false);
...

The action is perfect, when user choose the Others from the combo box, the Others text field displayed, but the problem is, that Others text field displayed when user request the form always (On the initial view).

Can not hide properties in the initial view, when user click any action the hidden properties disappear?!

The solution in this case is to refine the 'new' action and the 'search' action to hide the 'otherLanguage' property. But, before, try to define your module in this way:

<module name="YourModule"> 
  <env-var name="XAVA_SEARCH_ACTION" value="CRUD.searchExecutingOnChange"/> 
... 
</module> 

Look at section 7.6 of reference guide !


Q.37 How to set rows count in tab


Q.38 How to separate translations for each portlet

Source file which handle this: org.openxava.util.Labels

For properties in tabs, in i18n file (assuming there are ComponentFoo and ComponentBar, both with references to Example Component)

ComponentFoo.tab.properties.example.description=Example foo 
ComponentBar.tab.properties.example.description=Example bar 

For properties in detail mode:

ComnponentFoo.view.level=Level Foo 
ComnponentBar.view.level=Level Bar 

For properties which are part of view:

# CustomerContact tab inside Engagement
CustomerContact.views.CustomerContact.custName=Customer Name
CustomerContact.views.CustomerContact.custName[description]=Customer Name
CustomerContact.views.<View Name Here>.custName[description]=Customer Name

CustomerContact.tab.properties.custName=Customer Name
CustomerContact.tab.properties.custName[description]=Customer Name


Q.39 How to create custom JasperReport which uses JDBC connection to DB

Need returning null in the method getDataSource() of your JasperReport action (derived from JasperReportBaseAction).

public class EngagementReportAction extends JasperReportBaseAction {
...
protected JRDataSource getDataSource() throws Exception {
  return null;
}
...
}


Q.40 Since version 2.2.1 Calendar overlaps with Main Horizontal line of Portal

In order to change this behavior modify file OpenXava/web/script.jsp Old line:

97:   _dynarch_popupCalendar.showAtElement(el.nextSibling, "Br");        // show the calendar

New line

97:   _dynarch_popupCalendar.showAtElement(el.nextSibling, "tr");        // show the calendar

"tr" is need for IE6, for working fine when date fields are at the bottom of the page. Will be available in OX2.2.3 Correct one is:

  <% 
  // Date fields at end of the windows is not shown correctly in IE6,
  // hence, we align at top in IE6, and at botton in other browsers.
  String browser = request.getHeader("user-agent");
  String calendarAlign = browser != null && browser.indexOf("MSIE 6") >= 0 ? "tr" : "Br";  
  %>
  _dynarch_popupCalendar.showAtElement(el.nextSibling, "<%=calendarAlign%>"); // show the calendar


Q.41 How to filter by property of Reference?

All fields by which developer wants to make filtering MUST be described in 'properties' tag!

Example code:

<tab>
	<filter class="bg.d3soft.openxava.filters.UserFilter"/>
	<properties>custCrtdBy, engDealMkr.empLogonID, rptProMng.empLogonID</properties>
	<base-condition>${custCrtdBy} = ? or ${engDealMkr.empLogonID} = ? or ${rptProMng.empLogonID} = ?</base-condition>
	...
</tab>


Q.42 How to display confirmation message?

Confirmation message can be shown using the 'confirm' attribute of <action /> element in controllers.xml. Section 7.3 of reference guide.

This is a generic feature that can be applied to any action that show a JavaScript dialog to confirm the action. Given that it's generic (not only for list mode), it cannot revise if some item is selected (or any other condition). It simply ask before action to be execute.

A solution can be to define your list action using confirm=false, and then create your logic that move to other controller for confirmation before execute your definitive action, in this way you can control exactly your logic, but you will lost the agility of using a JavaScript dialog.


Q.43 Openxava and Cross Site Scripting (XSS)?


Q.44 How to use Identity Column?

Identity must be declared in DB as an auto increment column.

Hibernate will create proper DB script. When updateSchema Ant target is executed( on OpenXava project which uses hibernate), it will generates the correct SQL script. For example, if you are using AS/400 dialect, hibernate will generate a line like:

ID INTEGER GENERATED BY DEFAULT AS IDENTITY(START WITH 0) NOT NULL PRIMARY KEY

If in your OX componentes you write:

<property name="number" type="Integer" key="true" size="5" required="false">
	<default-value-calculator class="org.openxava.calculators.IdentityCalculator"
on-create="true"/>
</property>

OpenXava generates a .hbm.xml with the next content:

<id name="number" column="NUMBER" access="field" type='java.lang.Integer'
 length='5'>
	<generator class='identity'/>
</id>


Q.45 How to add IP stereotype and validation class

Will be part of OpenXava 2.2.4!

sf.net post

1) Add to Application/xava/default-size.xml

<for-stereotype name="IP" size="15"/>

2) Add to Application/xava/editors.xml

<editor url="textEditor.jsp"> 
  <for-stereotype stereotype="IP"/> 
</editor> 

3) Add to Application/xava/stereotype-type-default.xml

<for stereotype="IP" type="String"/> 

4) Add to Application/i18n/messages_en.properties file

ip_validation_error={0} must be a valid IP address

5) Validation class

package org.openxava.validators;

import org.openxava.validators.IPropertyValidator;
import org.openxava.util.Messages;
import org.apache.commons.validator.GenericValidator;

/**
 * @author Janesh Kodikara
 */
public class IPValidator implements IPropertyValidator {

    public void validate(Messages errors, Object value, String propertyName,
String modelName) throws Exception 
{

        String numberRegExp = "(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)";
        String ipRegExp = "\\b" + numberRegExp + "\\." + numberRegExp + "\\." +  numberRegExp +"\\." + numberRegExp + "\\b";

        if (value == null || value.toString().length() == 0) return;

        if (! GenericValidator.matchRegexp(value.toString(), ipRegExp)) {
            errors.add("invalid_ip_error", propertyName);
        }
    }
}


Q.46 How to add Reachable IP stereotype and validation class

Will be part of OpenXava 2.2.4 and 3.0beta5!

sf.net post

1) Add to Application/xava/default-size.xml

<for-stereotype name="IP" size="15"/>

2) Add to Application/xava/editors.xml

<editor url="textEditor.jsp"> 
  <for-stereotype stereotype="IP"/> 
</editor> 

3) Add to Application/xava/stereotype-type-default.xml

<for stereotype="IP" type="String"/> 

4) Add to Application/i18n/messages_en.properties file

ip_not_reachable={0} is Not Reachable

5) Validation class

package org.openxava.validators;

import org.openxava.validators.IPropertyValidator;
import org.openxava.util.Messages;
import org.apache.commons.validator.GenericValidator;

/**
 * @author Janesh Kodikara
 */
public class IPValidator implements IPropertyValidator {

    public void validate(Messages errors, Object value, String propertyName,
String modelName) throws Exception 
{

        if (value == null || value.toString().length() == 0) return;

        /*String address = "192.168.0.60";
        InetAddress addr = InetAddress.getByName( value );
        boolean isValidAddress = addr.isReachable(myTimeout);
        System.out.println(" Reachable " + isValidAddress);*/
        if (! GenericValidator.matchRegexp(value.toString(), ipRegExp)) {
            errors.add("ip_not_reachable", propertyName);
        }
    }
}

Q.47 How to avoid Warnings during Generate Portlet ant task?

Will be included in OX2.2.4!

Go to OpenXava/build.xml, and examine the target "generatePortletXml" ant task. It looks like:

<classpath> 
	<pathelement path="../OpenXava/bin"/>
	<fileset dir="../OpenXava/web/WEB-INF/lib"> 
		<include name="**/*.jar"/> 
	</fileset> 
	<fileset dir="web/WEB-INF/lib"> 
		<include name="**/*.jar"/>		
	</fileset>
...
</classpath>

Because we include ../OpenXava/bin and web/WEB-INF/lib that contains openxava.jar, the default-controllers.xml is duplicated in the path, then you get the warning.

Solution is just to exclude the openxava.jar from the classpath. Modify the build.xml of your OpenXava project.

<classpath> 
	<pathelement path="../OpenXava/bin"/>
	<fileset dir="../OpenXava/web/WEB-INF/lib"> 
		<include name="**/*.jar"/> 
	</fileset> 
	<fileset dir="web/WEB-INF/lib"> 
		<include name="**/*.jar"/>
		<exclude name="openxava.jar"/>
	</fileset>
...
</classpath>


Q.48 How to add ISBN stereotype and validation class

Will be part of OpenXava 2.2.4 and 3.0beta5!

sf.net post

1) Add to Application/xava/default-size.xml

<for-stereotype name="ISBN" size="13"/>

2) Add to Application/xava/editors.xml

<editor url="textEditor.jsp"> 
  <for-stereotype stereotype="ISBN"/> 
</editor> 

3) Add to Application/xava/stereotype-type-default.xml

<for stereotype="ISBN" type="String"/> 

4) Add to Application/i18n/messages_en.properties file

isbn_validation_error={0} must be a valid ISBN address

5) Validation class

package org.openxava.validators; 
 
import org.openxava.validators.IPropertyValidator;
import org.openxava.util.Messages;
/**
 *
 * @author Janesh Kodikara
 */

public class ISBNValidator implements IPropertyValidator {

    private  org.apache.commons.validator.ISBNValidator validator = new org.apache.commons.validator.ISBNValidator();

    public void validate(Messages errors, Object value, String propertyName, String modelName) throws Exception {

        if (value == null || value.toString().length() ==0 ) return;

        if (! validator.isValid(value.toString())) {
           errors.add("isbn_validation_error", propertyName);
        }
    }

}

Q.49 How to add Credit Card stereotype and validation class

Will be part of OpenXava 2.2.4 and 3.0beta5!

sf.net post

1) Add to Application/xava/default-size.xml

<for-stereotype name="CREDIT_CARD" size="19"/>

2) Add to Application/xava/editors.xml

<editor url="textEditor.jsp"> 
  <for-stereotype stereotype="CREDIT_CARD"/> 
</editor> 

3) Add to Application/xava/stereotype-type-default.xml

<for stereotype="CREDIT_CARD" type="String"/> 

4) Add to Application/i18n/messages_en.properties file

creditcard_validation_error={0} must be a valid Credit card number

5) Validation class

package org.openxava.validators;

import org.openxava.validators.IPropertyValidator;
import org.openxava.util.Messages;
import org.apache.commons.validator.GenericValidator;

/**
 * @author Janesh Kodikara
 */
public class CreditCardValidator implements IPropertyValidator {


    public void validate(Messages errors, Object value, String propertyName, String modelName) throws Exception {

        if (value == null || value.toString().length() == 0) return;

        if (! GenericValidator.isCreditCard(value.toString())) {
            errors.add("creditcard_validation_error", propertyName);
        }

    }

}

Q.50 How to add EMAIL_LIST stereotype and validation class?

Will be part of OpenXava 2.2.4 and 3.0beta5!

sf.net post

1) Add to Application/xava/default-size.xml

<for-stereotype name="EMAIL_LIST" size="200"/>

2) Add to Application/xava/editors.xml

<editor url="textEditor.jsp"> 
  <for-stereotype stereotype="EMAIL_LIST"/> 
</editor> 

3) Add to Application/xava/stereotype-type-default.xml

<for stereotype="EMAIL_LIST" type="String"/> 

4) Add to Application/i18n/messages_en.properties file

email_list_validation_error=Email list should contain valid emails separated by commas

5) Validation class

package org.openxava.validators;

import org.openxava.validators.IPropertyValidator;
import org.openxava.util.Messages;

import org.apache.commons.validator.GenericValidator;
import java.util.StringTokenizer;

/**
 * @author Janesh Kodikara
 */

public class EmailListValidator implements IPropertyValidator {

    public void validate(Messages errors, Object value, String propertyName, String modelName) throws Exception {


        if (value == null || value.toString().length() == 0) 
            return;

        StringTokenizer emailAddresses = new StringTokenizer(value.toString(), ",");
        while(emailAddresses.hasMoreTokens()) {
            if (! GenericValidator.isEmail(emailAddresses.nextToken())) {
                errors.add("email_list_validation_error", propertyName);
            }
        }
    }

}

Q.51 How to save model details when a action is called?

Is it possible to save model details when a action is called?

Yes.

An option is to make your action a child of SaveAction, and put the property resetAfter to false. Then you only need to:

public void execute() throws Exception {
  super.execute();
  // Here the code of you action.
}

Or you can save the data from the view directly using MapFacade.

Look at the code of SaveAction in order to learn how to use MapFacade.


Q.52 Converter for TIME stereotype.

Will be part of OpenXava 2.2.5.


  • By default, when you use "TIME" stereotype you want to work with String for manage time data, both at Java level and DB level. This case is:
  <property name="mytime" stereotype="TIME"/>


  • If you want to work with java.sql.Time usually you use the Java type directly, and you don't use TIME stereotype. In this way you use java.sql.Time for Java and DB. Code is:
  <property name=mytime" type="java.sql.Time"/>


  • New converter is only for the case that you want to work with String at Java level and with java.sql.Time at DB level:
  <property name="mytime" stereotype="TIME"/>
  ...
  <property-mapping ... >
    <converter class="org.openxava.converters.StringTimeConverter"/>
  </property-mapping>
  ...
  • New converter:
package org.openxava.converters;

import org.openxava.converters.IConverter;
import org.openxava.converters.ConversionException;

import java.sql.Time;

/**
 * In java a <tt>String</tt> and in database a
 * <tt>java.sql.Time</tt>. <p>
 *
 * @author Janesh Kodikara
 */
public class StringTimeConverter implements IConverter {

    private Time time;
    private String timeStamp;

    public Object toDB(Object o) throws ConversionException {


        if (o == null) return null;
        if (!(o instanceof String)) {
            throw new ConversionException("conversion_db_string_expected");
        }

        timeStamp = o.toString() + ":00";
        time = Time.valueOf(timeStamp);
        return time;
    }

    public Object toJava(Object o) throws ConversionException {
        if (o == null) return null;
        if (!(o instanceof java.sql.Time)) {
            throw new ConversionException("conversion_java_sqltime_expected");
        }

        time = (Time) o;
        timeStamp = time.toString();
        timeStamp = timeStamp.substring(0, 5);

        return timeStamp;
    }
}


Q.53 How to add a string to description list?

Section 4.3.6 of Reference guide.

Is it possible to add text to a description list?

Need to display book title along with Author and separate the variable with a string (e.g ":" or "by")

<reference-view reference="book">
  <descriptions-list description-properties="title, author.firstName, author.secondName"/>
</reference-view>

or

<reference-view reference="subfamily" create="false">

	<!-- In this case description-property can be omited -->
	<descriptions-list  
		description-property="description" 
		depends="family"
		condition="${family.number} = ?"/>

</reference-view>


First suggestion: Use Calculated property

<component name="Book">
  <entity>
    ...
    <property name="authorFullName" type="String" size="25">
	<calculator class="org.openxava.calculators.ConcatCalculator">
		<set property="string1" from="author.firstName"/>				
		<set property="separator" value=" "/>
		<set property="string2" from="author.secondName"/>
	</calculator>
    </property>

    <property name="fullTitle" type="String" size="60">
	<calculator class="org.openxava.calculators.ConcatCalculator">
		<set property="string1" from="title"/>				
		<set property="separator" value=" by "/>
		<set property="string2" from="authorFullName"/>
	</calculator>
    </property>

  </entity>
...
</component>

<component ... >
  <view>
    <reference-view reference="book"> 
      <descriptions-list description-properties="fullTitle"/> 
    </reference-view> 
  </view>
</component>


Second suggestion: Develop new functionality

> Way to distinguish properties from strings.

Your way is good, and I think that natural for an OX developer. Use other attribute, 'description-message-id'.


> Guide how to develop new functionality?

The code for concatenating the description of description list is in the class.

org.openxava.calculators.DescriptionsCalculator

After this works, we can consider using 'description-message-id', this will involve to modify the dtd and parser.

Third suggestion: New functionality with i18n

<descriptions-list description-properties="title, author.firstName, author.secondName" pattern-id="descriptions_list_book_title"
/>


And in YourApplication-messages_en.properties you have:

descriptions_list_book_title={0} by {1} {2} 

Q.54 How to remove image?

Edit imageEditor.jsp, and add a new action to reset the image, inside the below block.

<% if (editable) { %>

Add the action in ImageEditor controller of default-controllers.xml.

Have a look to the code of LoadImageAction.


Q.55 How to modify OpenXava DTD?

Add new XML element or xml attribute to below class. Java class which holds all dtd element and attribute names is:

OpenXava/src/org/openxava/util/xmlparse/XmlElementsNames.java


Q.56 How to add new property to xava.properties file?

Edit file:

OpenXava/src/org/openxava/util/XavaPreferences.java

Added new method which returns value of new property:

public boolean isMapFacadeAutoCommit() 
{
    return "true".equalsIgnoreCase(getProperties().getProperty("mapFacadeAutoCommit", "false").trim());
}


Q.57 How to sort reference list with condition?

Error is thrown if column in condition is not included in the FROM part.

Because OX uses description-properties to determine which tables must be included in FROM part.

A simple workaround is to add your property to description properties, in this way:

<reference-view reference="releasebyQA" frame="false">
  <descriptions-list description-property="name, designation.department.id" 
                     condition="${designation.department.id} ='QA'"/>
</reference-view>


Q.58 How to create Date Validation class?

package org.openxava.validators;

import org.apache.commons.validator.routines.DateValidator;
import org.openxava.util.Messages;
import java.util.Date;


/**
 * @author Janesh Kodikara
 */

public class XavaDateValidator {

    DateValidator validator;

    public XavaDateValidator() {
        validator = new DateValidator();
    }

    public boolean isSameDate(Date startDate, Date endDate) {
        boolean isSame = false;

        if (validator.compareDates(startDate, endDate, null) == 0) {
            isSame = true;
        }
        return isSame;
    }

    public void isSameDate(Messages errors, String startFieldName, Date startDate, String endFieldName, Date endDate) {

        if (startDate == null || endDate == null) return;

        if (validator.compareDates(startDate, endDate, null) == 0) {
            errors.add("same_dates_error", endFieldName, startFieldName);
        }
    }

    public boolean isFutureDate(Date value) {
        boolean isSame = false;
        Date today = new Date();
        if (validator.compareDates(value, today, null) > 0) {
            isSame = true;
        }
        return isSame;
    }

    public void isFutureDate(Messages errors, String fieldName, Date value) {
        Date today = new Date();

        if (value == null) return;

        if (validator.compareDates(value, today, null) > 0) {
            errors.add("date_in_future_error", fieldName);
        }
    }

    public boolean isPastDate(Date value) {
        boolean isSame = false;
        Date today = new Date();
        if (validator.compareDates(value, today, null) < 0) {
            isSame = true;
        }
        return isSame;
    }
    public void isPastDate(Messages errors, String fieldName, Date value) {
        Date today = new Date();

        if (value == null) return;

        if (validator.compareDates(value, today, null) > 0) {
            errors.add("past_date_error", fieldName);
        }
    }


    public void isStartDateAfter(Messages errors, String startFieldName, Date startDate, String endFieldName, Date endDate) {
        if (startDate == null || endDate == null) return;

        if (validator.compareDates(startDate, endDate, null) > 0) {
            errors.add("start_date_greater_error", endFieldName, startFieldName);
        }
    }
}


Q.58 How to use OX and bind to a web service layer rather than to a database?

OpenXava has a pluggable persistence provider. Package org.openxava.model.impl has implementation of EJB CMP2, Hibernate and JPA persistece provider. Own persistence provider can be created to save and store the data by custom way.

The only problem is that Tabbular data retrieval is done via JDBC. That's why additionally own TabProvider have to be written. For example look at:

org.openxava.model.tab.impl

Liquibase

  • Articles

Liquibase Questions and Hints

Hint.1 How to update data?

Is there any way to update a row that already exists in a table (besides using <sql>)?

Currently there is not. I have considered creating an update tag but have not yet. The main reason I did not create it originally is that it seemed to not add a lot of value over the standard <sql> update statement and created a lot of typing.

For example:

<update table="person">
	<column name="username" value="newUsername">
	<where>username = 'oldUsername'</where>
</update>

seems like a lot of work compared to

<sql>UPDATE person SET username='newUsername' WHERE username='oldUsername'</sql>

Now that there is support for standardizing dates, Boolean values, etc. it may be worth creating however.


Web Services


Web Service Providers


WEB Frameworks

  • WebOnSwingMultiple environment application framework that allows you to create web applications in the same way you develope a desktop one. You dont need to use JSP files, special tags, XML files, requests, posts, etc. Everything is Java and pure HTML files that comes directly from the graphic designer.


Ajax


Ajax Frameworks

Mashups


Portlets


GWT - Google Web Toolkit

Portals, JCR, ECM, Groupware


Liferay Portal

I am trying to get user atributes using the JSR-186 specified way.
Here is the extract from portlet.xml:
<user-attribute>
  <name>user.name.given</name>
</user-attribute>
<user-attribute>
  <name>user.name.family</name>
</user-attribute>
<user-attribute>
  <name>user.business-info.postal.street</name>
</user-attribute>
<user-attribute>
  <name>user.business-info.postal.city</name>
</user-attribute>
<user-attribute>
  <name>user.business-info.postal.country</name>
</user-attribute>
<user-attribute>
  <name>user.business-info.postal.organization</name>
</user-attribute>
<user-attribute>
  <name>user.business-info.telecom.telephone.number</name>
</user-attribute>

Here is the code to get user attributes:

HashMap hmUserInfo = (HashMap)request.getAttribute(PortletRequest.USER_INFO);'
log.debug((String)hmUserInfo.get(UserAttributes.USER_NAME_GIVEN));
log.debug(((String)hmUserInfo.get(UserAttributes.USER_NAME_FAMILY));
log.debug((String)hmUserInfo.get(UserAttributes.USER_BUSINESS_INFO_POSTAL_CITY));
log.debug((String)hmUserInfo.get(UserAttributes.USER_BUSINESS_INFO_POSTAL_COUNTRY));
log.debug((String)hmUserInfo.get(UserAttributes.USER_BUSINESS_INFO_POSTAL_ORGANIZATION));
log.debug((String)hmUserInfo.get(UserAttributes.USER_BUSINESS_INFO_POSTAL_STREET));
log.debug((String)hmUserInfo.get(UserAttributes.USER_BUSINESS_INFO_TELECOM_TELEPHONE_NUMBER));

Liferay return first/last names ONLY in spite of the fact that all other information is presented for this user.
I entered it using Organization Admin portlet.


Liferay Web Services


Liferay Hints

Hint.1 Multiple Instances of Portlet

Portlets which allowed multiple instances to be instantieted in portal. Add this tag to the portlet configuration in liferay-portlet-ext.xml

<instanceable>true</instanceable>


Hint.2 How to add new layout

Edit file: portal\webapps\ROOT\WEB-INF\liferay-layout-templates-ext.xml

<?xml version="1.0"?>
<!DOCTYPE layout-templates PUBLIC "-//Liferay//DTD Layout Templates 4.0.0//EN" "http://www.liferay.com/dtd/liferay-layout-templates_4_0_0.dtd">

<layout-templates>
	<custom>
		
		<layout-template id="2_columns_iv" name="2 Columns (20/80)">
			<template-path>/html/layouttpl/custom/2_columns_iv.tpl</template-path>
		</layout-template>
		
	</custom>
</layout-templates>

Add new file: portal\webapps\ROOT\html\layouttpl\custom\2_columns_iv.tpl

<div id="layout-content-outer-decoration">
	<div id="layout-content-inner-decoration">
		<div id="layout-content-container">
			<table border="0" cellpadding="0" cellspacing="0" width="100%">
			<tr>
				<td valign="top" width="19%">
					$processor.processColumn("column-1")
				</td>
				<td class="layout-column-spacer" width="1%">
					<div> </div>
				</td>
				<td valign="top" width="80%">
					$processor.processColumn("column-2")
				</td>
			</tr>
			</table>
		</div>
	</div>
</div>

Enjoy new layout!

XML

  • ServingXMLOpen source, Apache 2.0 licensed, framework for flat/XML data transformations.





XForms

  • [9]Integrate XForms with the Google Web Toolkit, Part 1: Creating an artist and album management form
  • [10] Integrate XForms with the Google Web Toolkit, Part 2: Creating an artist and album management form


XForms Server-side Transformation Engines


XForms Browser extensions

  • Mozilla XForms
  • formsPlayer a full-featured XForms processor that provides a complete implementation of the W3C's XForms specification. Workis with IE only.


XForms Browser-based scripts

  • FormFaces perform the required XForms processing, also without installing extensions on the browser.


XForms for Mobile devices

XSLT


  • Identity Transform
<!-- identity transform -->
<xsl:template match="*|@*|node()">
  <xsl:copy>
    <xsl:apply-templates select="*|@*|node()"/>
  </xsl:copy>
</xsl:template>

XML databases

REST


REST Articles


REST Frameworks

  • Cetia4Java Servlet-based REST Framework


Restlet REST Framewrok


Jersey REST framework


Project Zero REST framework


Mattress REST framework

BPM


BPM Articles

Rule Engines

ESB - Enterprise Service Bus and JBI - Java Business Integration


ESB/JBI Articles

Linux

  • Clam AntiVirusOpen source (GPL) anti-virus toolkit for UNIX, designed especially for e-mail scanning on mail gateways.
  • how to download xampp from command line:
wget http://www.apachefriends.org/download.php?xampp-linux-1.6.4.tar.gz


Virtual Machines


Applications based on VM


VMWare

Live CDs

Linux based

  • Vixta
  • Postgre DB Live CD
    • Description what is on CD
    • netepi Has a shell script in the latest tarball release for NetEpi Collection which takes the Ubuntu LiveCD distribution and strips out unnecessary stuff, installs PostgreSQL and NetEpi and various screencast demo movies and the manuals etc, and then creates an ISO for burning.


Windows based

Ant related


HTML, CSS, RSS


How to add URL to My Yahoo RSS Reader

http://add.my.yahoo.com/rss?url=http://www.someSite.com/rss/press_release_todays_newsfeed.xml


DB Related

  • Schema Spy Good tool which can create graphical representation of DB Schema
    • Schema Spy GUI
    • Install Debian package "gsfonts" in order to solve the issue with 'dot'.
  • DBsql2XMLJava tool (class) for transformation (export, convert) relational database into hierarchical XML.
  • Useful scripts related to Tables/Indexes in Oracle.


Query to look Sessions of users in Postgre:

select pg_class.relname, pg_locks.transaction, pg_locks.mode, 
pg_locks.granted as "g",
       pg_stat_activity.query_start,
   age(now(),pg_stat_activity.query_start) as "age", 
pg_stat_activity.procpid,
   pg_database.datname , pg_stat_activity.client_addr, 
   pg_locks.page, pg_locks.tuple, pg_locks.relation, 
rpad(pg_stat_activity.current_query, 200)
   from pg_stat_activity,pg_database , pg_locks 
   left outer join pg_class on
   (pg_locks.relation = pg_class.oid) 
   where pg_locks.pid=pg_stat_activity.procpid 
     and pg_locks.database = pg_database.oid
     and pg_locks.mode       like '%ExclusiveLock'
   order by query_start;

usie  pg_cancel_backend(pid) function to cancel

Following query lists all open sessions and the relevant PIDs.

SELECT Activity.datname, Activity.procpid, Shadow.usename,
Activity.current_query
FROM pg_stat_activity Activity 
INNER JOIN pg_shadow Shadow 
ON (Activity.usesysid=Shadow.usesysid);


  • Table oriented frameworks


SQL dialects


DB Replication


LDAP

DB Structure and Data comparison

Security, SQL Injection


Oracle to/from Postgre porting/conversion

ER Diagrams


Druid


Changes which i made to Druid

Show class name in modules dialog

Menu "Config" -> "Modules..." now shows class name of loaded module. This allows developer to find responsible class and modify it if necessary.

Loaded modules window


package druid.dialogs.modules;

import java.awt.Color;

import javax.swing.JTextField;

import org.dlib.gui.FlexLayout;
import org.dlib.gui.TLabel;
import org.dlib.gui.TPanel;
import org.dlib.gui.TTextArea;
import org.dlib.gui.TTextField;

import druid.interfaces.BasicModule;

public class GeneralPanel extends TPanel
{
	private JTextField txtId      = new TTextField();
	private JTextField txtVersion = new TTextField();
	private JTextField txtAuthor  = new TTextField();
	private TTextArea  txaDescr   = new TTextArea(6, 40);
	private JTextField txtClass	  = new TTextField();  // @Trifon

	public GeneralPanel()
	{
		super("General");

		FlexLayout flexL = new FlexLayout(2,5,4,4);  // @Trifon
		flexL.setColProp(1, FlexLayout.EXPAND);
		setLayout(flexL);

		//--- setup textfields

		txtId.setEditable(false);
		txtVersion.setEditable(false);
		txtAuthor.setEditable(false);
		txaDescr.setEditable(false);
		txtClass.setEditable(false);  // @Trifon

		txtId.setBackground(Color.white);
		txtVersion.setBackground(Color.white);
		txtAuthor.setBackground(Color.white);
		txtClass.setBackground(Color.white);  // @Trifon

		//--- setup panel

		add("0,0",     new TLabel("Id"));
		add("0,1",     new TLabel("Version"));
		add("0,2",     new TLabel("Author"));
		add("0,3,l,t", new TLabel("Descr"));
		add("0,4",     new TLabel("Class"));  // @Trifon

		add("1,0,x", txtId);
		add("1,1,x", txtVersion);
		add("1,2,x", txtAuthor);
		add("1,3,x", txaDescr);
		add("1,4,x", txtClass);  // @Trifon
	}

	public void setCurrentModule(BasicModule mod)
	{
		txtId.setText(mod.getId());
		txtVersion.setText(mod.getVersion());
		txtAuthor.setText(mod.getAuthor());
		txaDescr.setText(mod.getDescription());
		txtClass.setText(mod.getClass().getCanonicalName());  // @Trifon
	}
}


TODO SQL constant remapping

class: factory.sql.AbstractSqlGenModule

	protected String genFieldAttrib(FieldNode node, AttribSet asAttrib, Object obj)
	{
		StringBuffer sb = new StringBuffer();

		String faSqlName = asAttrib.getString("sqlName");

		if (obj instanceof Boolean)
		{
			boolean b = ((Boolean)obj).booleanValue();

			if (b)
				sb.append(faSqlName);
		}

		else if (obj instanceof String || obj instanceof Integer)
		{
			String value = obj.toString().trim();

			if (!value.equals("")) {
				// TODO - Trifon
				// Here we can make SQL constant remapping!
				// SYSDATE -> NOW()
				BasicDatabaseSettings sett = new BasicDatabaseSettings(node.getDatabase().modsConfig, this);

				AttribList alSqlMapping = sett.getSqlMapping();
				if (alSqlMapping.size() > 0) {
					sb.append(faSqlName + " " + remapSqlType(value, alSqlMapping));
				} else {
					sb.append(faSqlName + " " + value);
				}
			}
				
		}

		else
			throw new DruidException(DruidException.INC_STR, "Unknown type of object", obj);

		return sb.toString();
	}

Druid Hints

Hint.1 Remapping of DB Types

Druid fully supports remapping of database types. This feature allows developer to build his initial DB model against specific DB(Oracle for example) and generate SQL scripts for any DB (Postgre for example). Or developer can define abstract DB types and create appropriate mapping for each DB!

Field "Sql Type" can contain any Regular expression.

Java Pattern class : java.util.regex.Pattern


Example remapping from Oracle to Postgre.

Sql Type:

NUMBER\(10,0\)

Mappend type:

NUMERIC(10)

BI - Business Intelligence

SEO - Search Engine Optimization


Open Source Report Engines/Frameworks

JDOReports


JDOReports Developer Tips

Hint.1 How to open template document which is password protected

Templates to be protected against unauthorised changes to at least some extent.

Opening a password protected template is not supported. If what you want is to protect the output document (rather than the template) then you can post-process the document through JODConverter and OpenOffice.org and specify a password at that stage (optionally also converting the document to PDF or another format).

Could use JODConverter to unprotect the template before processing it through JOOReports. Convert the document from ODT to ODT (!) passing the password as an import option. Need OpenOffice.org installed and running on the server for JODConverter to work though.

DocumentConverter converter = new OpenOfficeDocumentConverter(connection); 

DocumentFormat inFormat = new DocumentFormat("OpenDocument Text", DocumentFamily.TEXT, "application/vnd.oasis.opendocument.text", "odt"); 
inFormat.setImportOption("Password", "testpwd"); 

DocumentFormat outFormat = new DocumentFormat("OpenDocument Text", DocumentFamily.TEXT, "application/vnd.oasis.opendocument.text", "odt");
outFormat.setExportFilter(DocumentFamily.TEXT, "writer8");

File inFile = new File(getDocumentsPath() + "\\" + templateName); 
File outFile = new File(getDocumentsPath() + "\\temp.odt"); 
converter.convert(inFile, inFormat, outFile, outFormat); 

or

Alternatively could use the registry to get the default ODT format:

DocumentFormatRegistry registry = new DefaultDocumentFormatRegistry();
DocumentConverter converter = new OpenOfficeDocumentConverter(connection, registry);

DocumentFormat odt = registry.getFormatByFileExtension("odt");
        
DocumentFormat odtWithPassword = new DocumentFormat(odt.getName(), odt.getFamily(), odt.getMimeType(), odt.getFileExtension());
odtWithPassword.setImportOption("Password", "secret");

converter.convert(inputFile, odtWithPassword, outputFile, odt);

Open Reports

  • Open Reports I like it very much. It has report scheduling, dashboard in professional edition with AJAX interface. Works with multiple report engines like: JasperReports, Eclipse BIRT, JXLS.
  • www.linux.com article


Jasper Reports


Jasper Reports Tips

Hint.1 How to convert field from Boolean to String

Field RptSgnEngLtr is defined as java.lang.Boolean.

( $F{RptSgnEngLtr}.equals(new Boolean (true)) ? "YES" : "NO" )

or shorter

$F{RptSgnEngLtr}.booleanValue() ? "YES" : "NO" 


Hint.2 How to sum two double fields

new Double($F{f1}.doubleValue() + $F{f2}.doubleValue())


Hint.3 How to compare numbers

new Boolean($F{f}.intValue() == 1)


Hint.4 How to compare strings

new Boolean($F{f} != null && $F{f}.equals("test"))


Hint.5 How to Highlight odd or even rows


Hint.6 How to Build Dynamic JasperReports


Hint.7 How to hide message 'No More pages'?

Two ways:

1. With iReport designer, menu Edit -> Report Properties In the dialog there are five tabs. The 'More...' tab is what you're interested in. There at the bottom you see a combo-box called 'when no data'. In it there are all the possible choices that iReport gives you. In my opinion the 'Blank page' is most neutral, if you don't mind having white page in the JRViewer.

2. Modify xml source (JRXML) in a text editor, you have to take a look at the attributes of the master tag: <jasperReport> somewhere around line 15-20 you'll find the attribute: whenNoDataType="NoPages" which have to be changed to something like: whenNoDataType="BlankPage"

JBoss


Open Source Integration Projects


CSV/Ini/Excel Readers/Parsers/Writers

Super CSV


Ini4J

OSGi


Security


OpenID


Projects


Security Flaws

kTable

Move Table Header

Create following Header Listener

public class HeaderListener implements Listener, ControlListener { 
 
KTable table_ = null; 
 
Point initPoint = null; 
 
Tracker tracker = null; 
 
public HeaderListener(KTable table) { 
table_ = table; 
} 
 
public void mouseDoubleClick(MouseEvent e) {  
} 
 
public void mouseUp(int x , int y ) { 
Point p = table_.getCellForCoordinates(x, y); 
 
System.out.println("Up " + p); 
 
if ( 
(p.y < table_.getModel().getFixedHeaderRowCount()) &&  
(p.x >= table_.getModel().getFixedHeaderColumnCount()) && 
(p.x != initPoint.x) && 
(p.y == initPoint.y) 
){ 
 
//if (p.y == initPoint.y) { 
System.out.println("Move " + initPoint + " to " + p); 
((SpanModel)table_.getModel()).switchColumn(p.x, initPoint.x); 
} 
initPoint = null; 
//tracker.close(); 
} 
 
public void mouseDown(Event e) { 
 
Point p = table_.getCellForCoordinates(e.x, e.y); 
if ( 
(p.y < table_.getModel().getFixedHeaderRowCount()) &&  
(p.x >= table_.getModel().getFixedHeaderColumnCount()) 
) 
initPoint = p; 
 
System.out.println("Down " + p); 

} 
 
public void mouseMove(Event event) {  
int JITTER = 8; 
Display display = event.display; 
Shell shell = display.getActiveShell(); 
 
Rectangle tableLocation = display.map(table_, null, shell.getClientArea ()); 
System.out.println("table location " + tableLocation);  
 
Point p = table_.getCellForCoordinates(event.x, event.y);  
Rectangle rect = table_.getCellRect(p.x, p.y); 
 
 
int deltaX = initPoint.x - event.x, deltaY = initPoint.y - event.y; 
if (Math.abs (deltaX) < JITTER && Math.abs (deltaY) < JITTER) { 
return; 
} 
 
tracker = new Tracker (table_, SWT.LEFT | SWT.RIGHT); 
 
tracker.setRectangles (new Rectangle [] {rect}); 
tracker.open (); 
//FALL THROUGH 
 
Rectangle finalPosition = tracker.getRectangles()[0];  
System.out.println(finalPosition); 
 
int posX = finalPosition.x + finalPosition.width / 2 ;//- tableLocation.x; 
int posY = finalPosition.y + finalPosition.height / 2 ;//- tableLocation.y; 
mouseUp (posX,posY); 
 
} 
 
public void handleEvent(Event event) { 
switch (event.type) { 
case SWT.MouseDown: 
mouseDown((event)); 
break; 
case SWT.MouseMove: 
if (initPoint == null) return; 
mouseMove(event); 
 
case SWT.MouseUp: 
break; 
}  
} 
 
public void controlMoved(ControlEvent e) { 
} 
 
public void controlResized(ControlEvent e) { 
// TODO Auto-generated method stub  
} 

Security Frameworks and Articles

VoIP, IPTV

  • ActivaActiva brings the Asterisk IP PBX to the call center. Its components aim to enable call center implementations with functionality such as computer telephony, screenpop&click2dial, agent control, automatic dialing...
  • SIP-Communicator SIP phone and instant messenger that supports some of the most popular instant messaging and telephony protocols such as SIP, Jabber, AIM/ICQ, MSN, Yahoo! Messenger, Bonjour, IRC, RSS.
  • SippySkype Java software that allows you to make and receive Skype calls from your SIP/VOIP adapter.

Fun


Travian

Fork developers work in their free time! Excuse Me???

What Compiere defenders think.

Can you belive? I work for free? Please do not tell it to my wife... This is top secret.


  • sf.net post It looks that this post was deleted from Compiere forums. Compiere Inc. do not like what friends of Compiere think??? Just to prove that such post exist i posted whole post here

Having been in the ERP game for a very long time, I just find the bazaar a bit too risky for real life scenario and most of the clever developers involved are doing out of free time. I honestly dont even have free time to write this email, but I guess some people have more free time than others. So what people do in their free times is entirely up to them? The product is becoming massive yes, and to expect the couple of clever developers to maintain it within their "free" time would be EXTREMELY risky for any enterprise to put reliance on. Yes it may be more clever and even more transparrent and yes many more extremely clever things will be released out of it. Question though is who is going to maintain it in their free time over the next couple of years and who actually needs to get paid to support it.

Site Meter