How and When to Use Save() method in TBO ?

The save method can be used in TBO class to extend the default behavior and provide own custom implementation for validations and so on.

Generally , Creating a document in WebTop involves 3 steps: filling the ‘Create’ tab, ‘info’ tab, and ‘Permissions’ tab. User has to click on Next and Finish buttons to complete the activity of creating document. Also user has the option to select a document template in the ‘Create’ tab. This selection of template and clicking of buttons Next and Finish needs to be captured.

Consider a case in which a new document is created in WebTop and based on attributes entered in the document metadata (fields in ‘Info’ tab) a folder structure needs to be created.

save() method can be overridden in the TBO class for different scenarios: When document is created in WebTop using a template and when not using a template.

CASE 1 : When a template is used for creating document in WebTop, before the Finish button is
clicked,

1) The version label attribute (r_version_lablel) of the document object is always updated as ‘1.0, Current, _NEW_’.

2) Also, save() method in the TBO class is called twice, once when NEXT button is clicked on ‘Create’ tab and second time when Finish button is clicked.

CASE 2 : When no template is used for creating document (for example: creating documents without
any content)

1) The version label is always 1.0, Current.

2) The save() method is called only once, when NEXT button is clicked in ‘Create’ tab. When Finish button is clicked, the method called is saveLock().

While using TBO for custom object type, we can use a dummy attribute and r_version_label attributes to keep track of which button is clicked in the above two scenarios. The reason for this kind of check is the folder structures should get created only when Finish button is clicked. Otherwise the folder structure created needs to be deleted if the user clicks on Cancel button while creating document.

ARBITRARY

In addition to reliability, here are 5 reasons why WordPress is the best platform for any
online business:

1. Free. If you have never heard about open source software, you might be wondering why something as great as WordPress is free. WordPress is free because it has been developed by a worldwide community of developers, who do it as a hobby and because they love the open source spirit. Not only WordPress itself is free but also most of its themes and plugins are free, which means that you can create a really rocking site for free.
2. Easy to use. Ease of use is another reason why WordPress is a great choice for an online platform. This means that someone with little experience will be able to deal with WordPress with no or just a little help from the pros.
3. Secure. As far as online business is concerned, security is of the greatest importance. If your platform is insecure, this is a threat to everything you do and you just can’t afford to go for an insecure platform. Fortunately, in regards to security, WordPress tops the list. It is true that there is no unhackable software and nobody can guarantee you that even with the most stringent security measures your WordPress site will never be hacked but it does make a difference whether you install a security fortress or an easy target for a beginner hacker.
4. Highly customizable. You will certainly want your online platform to have a unique look. With WordPress this is easy to achieve. There are thousands of themes you can choose from and thousands of plugins to add in order to get exactly the functionality you need. If you are a web designer and/or web developer, you can also use existing themes and plugins and modify them exactly to your liking. Not many other CMS offer such customization freedom!
5. Great community. Last, but not least, another reason why WordPress is such a great online platform is its community. The forums at WordPress.org and the other WordPress-related sites contain tons of threads about everything WordPress-related. Additionally, almost always when you are stuck with a problem and ask for help, knowledgeable and skillful WordPress gurus rush to your help. The WordPress community is simply great and you should experience it yourself.

WordPress is a top CMS. It is easy to start using, yet it is powerful and you can build your site exactly the way you dreamed it. If you have never tried WordPress, get it today and try it out. Just don’t forget to browse through wordpress hosting guides to see which WordPress hosts that are worth dealing with and which aren’t. WordPress is reliable and secure but a poor web host is more than it can stand, so don’t take any chances.

EMAIL SUBSCRIPTION

Enter your email address to subscribe to this blog and receive notifications of new posts by email.