APEX 4.0 EA2 – Websheets

Dimitri Gielis | Mar 4, 2010 05:27 +0000
In APEX 4.0 EA2 the Websheet functionality is enabled. Websheets allow you to share information with others in a very quick, user friendly and secure way.

Let's have a look at an example. If you go to Application Builder in APEX 4.0 there is a new type there called "Websheet Applications".


We create a new Websheet Application and give it a name and possibly some content that will appear on the home page. You can type the content with the WYSIWYG editor (CK Editor) by clicking on the arrow button.


Before it creates the Websheets, the wizard gives a summary page and that is it.
Websheets are even simpler to create than a normal APEX (database) application.

You can compare Websheets with a preconfigured APEX application. A whole Framework is build for you with a lot of features out-of-the-box. You can just use all that.

When you run the Websheet from the App Builder you come into "Websheet-land". As a default Authentication mechanism it uses the Application Express Account. But you can change that by going into the Websheet Properties to Public Access, Single Sign On, LDAP or Custom.


When logged in, you come into the Websheet Framework. As we have Websheet Development Access, we can change the Websheet. In the top menu and on the right hand side you see what you can do. E.g. you can add pages, sections, data grids etc. There's a lot to explore there!


In the different sections of the page you also have Edit links, which allow you to easily change the text, all with a (WYSIWYG) html editor.


I see two big parts of Websheets; sharing information and data. The information is done through using Pages, sections, tags, files etc. just like you do in a Wiki/CMS. But where it outperforms all the typical wiki or content management systems, is with the data part!

One of the killer features of Websheets are the Data Grids. If you go to Data > Data Grids and create a new Data Grid, you have the choice to start from scratch or from Excel/Text with copy/paste. That allows you to create "a table" on the fly which holds your data (actually it's a record in the Websheet repository). This Data Grid look very similar to an Interactive Report (see Actions button), but it allows to do inline editing and a lot more (see Manage button)!

Websheets are too big to discuss in one blog post. There are so many areas which could be covered. There's the wiki part, the data part, the administration (security, dashboards), ...

Maybe one last thing... look at the url of a Websheet (login with end/end)... it doesn't start with f?p... it starts with ws?p ;-)

Oracle Application Express 4.0 EA2 live

Dimitri Gielis | Feb 27, 2010 06:08 +0000
A few hours after my previous post, APEX 4.0 EA2 hit the air.

The url to this new version of APEX 4.0 is still the same: http://tryapexnow.com/apex/


I'll start some proper testing next week, but if you already want to read what is changed, you find more information on Joel Kallman's post.

APEX 4.0 EA2 (with Websheets) very very close…

Dimitri Gielis | Feb 26, 2010 13:37 +0000
The APEX Development likes to hint and build up our expectations ;-)


It looks like APEX 4.0 Early Adopter 2 is almost there... a couple of hours? a couple of days?
Fact is that Joel is doing some tests on the EA2 build and reading Patrick's tweets says enough!


I really look forward to that release as it should have Websheets (and the DataGrids?) in and a ton of other new features! Keep watching the blogs...

APEX Listener EA2 with native Excel Upload

Dimitri Gielis | Feb 26, 2010 07:34 +0000
Kris Rice blogged about the new version of the APEX Listener here and here. The APEX Listener will become the preferred way of connecting to APEX (before Apache and the Embedded PL/SQL Gateway). If you are not familiar with the APEX Listener, you find more information here.

To install the APEX Listener EA2 (0.10.56.22.08) on my Oracle Linux VM I followed these steps:
  • Download Java SE JDK (before I used the JRE, but Kris told me the debugger doesn't work with that as you need the JDK for that part of the code)
    As a side note; now that Oracle and Sun are together, that website already has the "Oracle look". I wasn't expecting that so fast, but it's nice. The theme looks very similar to the APEX 4.0 Theme 1.
  • Become root: su
  • Go to the path you want java to install: cd /usr/java
  • Copy the file you downloaded in that directory
  • Change the permission of the file you downloaded to be executable: chmod a+x jdk-6u18-linux-i586-rpm.bin
  • Start the installation process: ./jdk-6u18-linux-i586-rpm.bin
    If that is done you should see a screen like this and a directory jdk1.6.0_18 should exist:

  • You find a complete guide of installing Java here.
  • Next you need to download and install the APEX Listener
  • The APEX Listener needs a webserver, depending the webserver you need to follow different steps. You find a complete guide how to install the webserver and the APEX Listener here.
  • I already had Apache Tomcat installed on my VM, so I went with that and just followed the installation notes.
  • Basically copy a war file to the webserver and change the config file
  • I was interested to test the new Excel upload feature, to get to work I added following line to the config file (apache-tomcat/temp/apex/apex-config.xml)
    true
  • Finally run APEX via the port of the Listener and create a new page with a File Browse item, a button and a report that queries the collection.
  • That's it!

With the latest release of the APEX Listener you query the collection like this:
select *
from apex_collections
where collection_name = 'P1_EXCEL_FILE'
P1_EXCEL_FILE is the item name of the File Browse Item. The other thing to remember is to call your button XLS2COLLECTION or have that as the request value.

Get me a Suite at ODTUG!

Dimitri Gielis | Feb 26, 2010 03:46 +0000
If you are going to ODTUG this year and you want me to do a favor... Put in my name "Dimitri Gielis" in "How did you hear about the conference?" when you register.

The person who has the most "referrals" gets a Suite at the Marriott Wardman Park!



I'm not sure about the size of that Suite, but if it's big enough and I win, I'll give a party in the suite and everybody is invited to come! We could even start the "APEX Meetup" in the Suite and have already a couple of drinks before we go further!
Hopefully the mini bar is big enough and has enough drinks, if not there are other ways to get drinks in that room I guess :-)

LOL

Anyway APEX will be big at ODTUG again... in fact it will be the biggest APEX event this year! Not to miss especially with the upcoming 4.0 release. See you there...

Branches with Conditions When Button Pressed – be careful

Dimitri Gielis | Feb 25, 2010 03:30 +0000
Consider this example; we have a typical APEX Report with Form.


When we click on the Create button we come into the Form and normally you would see just one Create button. If you hit that button you get back into the Report.
In some projects I use a "Create and Create Another" button as people need to enter more records at a time and this way they stay in the Form when they hit that button.


So how do you create such a button? I typically do:
- copy the Create button
- add a Branch that has as Target Page the same page and add a condition to fire on that "Create and Create Another" button. Be sure to put that Branch (sequence) before the unconditional branch.


If you test that Form and you hit on the "Create and Create Another button" you stay on that page. Works great... so you think you are done, however if you hit the Create button you want to go back to the report (like it was before). But this doesn't work anymore, it stays on the same page too. So for some reason, although the Branch has a condition to fire on the "Create and Create Another" button, it ALSO fires on the normal Create button.

After having a closer look at what APEX is doing, it turns out that APEX is using the Request value or incase of a button, the button name. As the buttons have the same name (the condition of) the Branch fires for both buttons.


If you use the standard "Automatic Row Processing (DML)" to handle the insert/update/delete it requires the Request value to be a specific one. In case of Insert you have following options: INSERT, CREATE, CREATE_AGAIN, CREATEAGAIN

So the solution to the above problem is to rename your "Create and Create Another" button to e.g. CREATE_AGAIN


I found it confusing as the select box let you think it's a condition on a button. The behaviour is the same in APEX 3.x and 4.0.


I would suggest to the APEX team to only show the request values or make it so the branch really knows which button got clicked.