Tuesday, November 27, 2007

The new media type attribute feature of Apex

Today I've spent some time setting up a simple showcase for the newly added Media type attribute that you'll find at the application or page level in the upcoming release of Apex 3.1.

Thanks to this new media type attribute an Apex application can deliver not just HTML pages but also true XHTML, SVG, WML, MathML or any other XML based page format of your own liking.

The problem until the current version of Apex was in that the content-type http header attribute was always set to text/html whenever an apex page was requested, but now it's possible to return the correct value either for the whole application or at the single page level.

This opens up a lot more of possibilities for the developers, although when one uses a non-HTML media type it's very likely that many of the standard constructs provided by Apex (like page items for instance) cannot be used.

It's also necessary to set up special templates containing the correct directives because the built-in ones are tailored for HTML pages.

If you want to try out what this new page formats look like, you can open the following link with Mozilla Firefox and have a taste of a true XHTML page containing some mathematical formulas written in MathML (please note that this link will become unavailable some time in the future).

I hope you can see the potential for this upcoming feature of Apex.

2 comments:

Patrick Wolf said...

Nice feature!

Patrick

Byte64 said...

Indeed!

The only problem now is to find out the time to do all the things that came up to my mind...

Cheers,
Flavio

yes you can!

Two great ways to help us out with a minimal effort. Click on the Google Plus +1 button above or...
We appreciate your support!

latest articles