WebObject questions

Q: How I can change the templates of Java files, which Eclipse creates for a new WebObject Application?
A: I found the template files within the Eclipse plugin folder:
/home/arothe/WODevelopment/Tools/eclipse-java-neon-3/plugins/org.objectstyle.wolips.templateengine_4.6.20170831.10/ProjectTemplates/<project type>/Sources/__basePackage_folder__
There it is possible to add the changed _isSupportedDevelopmentPlatform() method for Linux.

Q: How I can add actions or keys to a component?
A: Hold down the STRG key and click with the left mouse button on the name of the action/key within the WOD file view. This will add Java code to the associated Java file if the implementation doesn’t exist, or it will navigate you to the method in the Java file.

Q: Which bindings are possible for a component?
A: Open the WOD-file and click on a component entry. Press CTRL+Space to open a list of valid properties. Another method is to open the view “Bindings” of WOLips.

Q: How I can set the WebObjects and WOnder API Docs to get a mouse over help in Eclipse?
A: The JavaDocs are linked on WOCommunity.org. All libraries, which you can add to the project build path, have a property called javadoc, which is set by WOLips to the content of wo.api.root (defined within wolips.properties). So the best way would be to mirror the necessary JavaDoc files into that directory. Try to use:

# cd /home/arothe/WODevelopment/Libraries/WOnder/Developer/Documentation
# wget -nH --cut-dirs=2 --no-parent --recursive --level=inf --page-requisites --wait=1 --reject-regex='index.html\?(.*)' http://wocommunity.org/documents/javadoc/WebObjects/5.4.2/

It is not possible to use the URL direct as JavaDoc location on the build path, it will be overwritten by WOLips with the configured wo.api.root entry. The property must be a valid filesystem folder, an URL is not allowed. So the simplest solution is to copy all files into a local folder.

Q: How I can display the content of a database table within a web page?
A: It is possible to display multiple records with WORepetition. There you can set a list of records (as NSArray or List, which comes back from a Database query). The attribute “item”is the current record within the table. So you can refer to it on a click or something. For every attribute of the EnterpriseObject you have to use e.g. a WOString, the “value”is mapped to item.attribute. You can also use a method within the page component class, which translates the DB attribute into a huma-readable value.

Leave a Reply