Showing posts with label dhtml. Show all posts
Showing posts with label dhtml. Show all posts

This is a small feature but fixes something that has always bugged me.

In Application Express there is the Start Stop Table item. Which is very useful for form layout especially when building forms with large textarea's.

The problem was there was no way easy way access the Start Stop Table itself with javascript or CSS since it didn't have any discerning attributes. Well that has all changed in APEX 3.1 as the Start Stop Table gets some of the same attributes as a regular item does.

Start Stop Table's will get the id attribute set to the Item Name just like regular items , Start Stop Tables will also insert attributes from HTML Form Element Attributes property , agian just like a regular APEX item.

You can see a very simple usage example here http://apex.oracle.com/pls/otn/f?p=11933:137.

I can definitely see this being used for some more dynamic and just plain prettier forms and layouts, there are a few spots in the APEX builder slated to get some treatment from this.

As with my last few posts , and my next couple, this isn't the most WizBang feature but the impact if properly used can be huge.




Well something somewhere froze over because I found enough time to get an updated version of my sample application zipped up and upload.

There are some of the new examples in this export.
  • Minimal tagging functionality , along with an xml file to populate the tags table.
  • Examples on how to use $x_Toggle $x_Hide $x_Show on Regions.
  • Javascript code to enable/disable a shuttle item.
  • Example of a function to quickly check a series of values html_CheckSome(pThis,pValues,pArray)
Plus much much more!

You can download it here http://apex.oracle.com/pls/otn/f?p=11933:22.

If you like the theme , and with my visual design skills who doesn't, make sure to grab it because this will be the last export that has that particular one.

As usual make sure to read the disclaimer because I 100% stand by it.

Mini Check All HowTo

I should just mail CC blogger on some of my emails so they automatically get posted.


Hello,

If you have a tabular form or some sort of report where the first column is a checkbox I've created a js shortcut that will check all the checkbox items in the first column (one of the requests from 3.0 instance) just add the following as the header of the first column .

<input type="checkbox" onclick="$f_CheckFirstColumn(this)" />

If you have other places where a check all option seems appropriate, but is different than this tabular form solution please contact me and I can help set it up.

Regards,
Carl

As John Scott and Dimitri Gielis mentioned on their blogs I did a video for them for the Apex Evangelists European Training days. At one point I was planning on going there and helping out but that just didn't work out, so I did this video for them instead.

And then one of the boss's asked to see it after reading about it, and thought it was pretty nice and said I should post it. I'm a little rough around the edges with the whole vidcasting/vblogging thing , nothing a little practice won't fix, but I had alot of fun doing it and am planning on more of them in the future.

So here it is in all it's grainy Google video goodness.




If you want to watch the higher definition version you can download from here but on Windows I can only get it to run using vlc , my favorite cross platform video player.


I did the whole thing on Linux and the programs I used, while lacking a little polish, were very easy to use.

recordmydesktop
ffmpeg
pitivi



And finally as an OOW note , John and Dimitri , I like my beers tall , cold and plentiful :)

Extra polish

Well if there is one thing I know in a web application many times it's the details that count.

So here are two quick links to help out with some of the smaller graphic details that sometimes make a difference, especially when your like me and are graphically challenged.

1. Create your AJAX loading graphic http://www.ajaxload.info/

A nice loading graphic for your AJAX requests customized for you applications look and feel is always nice.


2. Create Striped Backgrounds
http://www.stripegenerator.com/

Striped backgrounds (for page or region headers usually) are nice because they are fairly small graphics which equals fast downloads. While you can end up with some pretty garish designs used properly you can get a nice look for minimal page weight.

So I had a couple comments on my Accordion Implementation I whipped up the other day.

http://carlback.blogspot.com/2007/06/is-for-apex-and-accordion.html

Plus someone wanted to be able to initialize with a certain pane open and also to create the Accordion based off of regions not a report. So I took all that to heart and rewrote my implementation a bit plus some extras I wanted and you get.

Report Based Accordion
http://apex.oracle.com/pls/otn/f?p=11933:130

and Region Based Accordion
http://apex.oracle.com/pls/otn/f?p=11933:131

The onmouseover interaction now has a 1/2 second delay.

The object initialization is now a bit more robust with more options. Most of them have pretty normal defaults. The one I recommend setting everytime is OpenMaxHeight as it gives a more consistent user experience.


function pg_Init(){
pAccordian = new Accordion('accordion');
/* optional */
pAccordian.OpenType = 'onmouseover'; //onclick or onmouseover default = onclick
pAccordian.OpenMaxHeight = 150; // optional but recommended max height of opened pane
pAccordian.OpenPane = 1; // open Accordian pane on init 1 based array
pAccordian.class_Item = 'item'; // set the class to collect item item nodes
pAccordian.class_Title = 'title'; // set the class that collects title nodes
pAccordian.class_Title_Current = 'title_current'; // set the class to set current title
pAccordian.class_Content = 'content': // set the class that collects content nodes
/*init object*/
pAccordian._Init(pAccordian);

}


I'll probably be playing with this some more but I wouldn't be surprised if you saw a slightly altered version end up in product, declarative of course ;) , it seems like a good fit.

Now all I have to do is figure out how to type as fast as this guy plays a real Accordion and I could get some real work done.

A is for APEX and Accordion

I had someone internal at Oracle ask for an Accordion widget in APEX. I figured everybody else code use something like this so I figured I'd build out an example in the standard place.

I think the best and easiest way to do this is to base it on a Report Row Template.

There are some caveats to this example.

The first being that #REGION_STATIC_ID# isn't properly substituted in a Report Row Template, I put it in anyway since at some point it will be. All you have to do is surround the report with element with an id or give the report itself an id , this actually isn't a bad idea as I figure most people will only want one of these per page.

The second is if you put multiple accordions on a page the row id has to be unique which is pretty easy to do in the SQL statement.


The accordian can be instatied on page load like this
pAccordian = new Accordion('accordion',true);

The first parameter is the id for the surrounding element.
The second parameter chooses between firing onmouse over (true) or onclick (false).

So here you go,

http://apex.oracle.com/pls/otn/f?p=11933:130

Enjoy

Everybody has an opinon.

I've added two new features/examples to my Example Application and they can be found on right side of every page.

One is a Ajax based Commenting system and another is an Ajax based Rating system. They are both very simple to implement. Even though the ones I built are tied to Application and Page ID's the table structure can easily be adjusted to apply them to any situation.

A nice additions to these features would be to only allow for one rating per user per page and to automatically populate the comment authors name. This would require me to create a login which is just overkill for my example application but for anyone implementing these solutions it is defiantly features worth adding.

The code can be found on these two pages.

Rating System : http://apex.oracle.com/pls/otn/f?p=11933:5


Comment System : http://apex.oracle.com/pls/otn/f?p=11933:124


The commenting system is open so please use a little restraint in using it, I don't want to have to be spending to much time administrating comments at the same time commenting on my samples would help me and everybody else.

EDIT:
Talk about a timely article :) Study: 38 Percent Of People Not Actually Entitled To Their Opinion

Keeping it clean with AJAX.

Steven Karam has provided a PDF of his Oracle World presentation Putting the Express Back Into Oracle Application Express with AJAX. It's a very well written and easy to understand introduction into using some of the built in AJAX functionality in APEX. Plus I gotta love the shout out I get at the end ;).
Take some time to dig around his blog a bit more as well he has quite a few tips and tricks in there. The generating XML post is very nice and something I've been working with lately.

Code Example Preview

Here is a preview of long promised Sticky Hide Show Region code example. The installable code example will be found on the Oracle Application Express Sample Code page in the next day or two.