Tuesday, January 09, 2007

Apex ghost buttons after deleting region

Just a quick repost of the forum entry, plus some fancy screenshots.

A region containing some buttons defined as button items, not normal region buttons.
Here is a screen dump where item buttons are highlighted.

And here is how they look in the real page.

If you delete the region without checking the delete corresponding buttons and delete corresponding items, you'll get ghost buttons.

The two buttons highlighted in yellow above, are normal buttons and they do show up, although they are classified as buttons with no regions. If you go to the button grid editor page, you'll see that instead of the region name, there is the old region id, an internal counter i presume.

What it's not showing up there are those two Raggruppa and Assegna buttons.

You don't see them in the buttons list grid page or in the items list grid page, nevertheless they are lingering in the upper side of your application's page.

I thought i could easily recreate the region and reassign old items and buttons to it without having to recreate them, however while normal region items become so called page items after deleting the region and they can be easily reassigned, item buttons do not show up in any definition list, so you can't re-link them.

In order to fix the page i had to tamper with the page export.
First i exported the page, then i manually deleted the offending entries in the .sql file and reimported it. Finally i recreated the buttons from scratch.

Note that if you had page processes triggered by the old buttons, they will need to be fixed as well. That is why normally i prefer to define conditions based on the REQUEST system variable than basing on the button's name.

But i really would like to figure out how to manually link an item to a certain region in case i need it again in the future.


Edited on january 10:

I need to amend my previous statement as Scott pointed out in the Apex forum that actually those two "missing" items are still there in the page items section and for some reason i could not spot them in the plethora of items clogging my page.

So, what started as a bug initially, needs to be correctly downgraded to a quirk, because i am still convinced that if they are buttons, they should show up in the buttons list, not just as items in the page level items section.

So, if you can't find your buttons, triple check the page items sections, they ended up over there for sure.


Dimitri Gielis said...


Congratulations with your site, I really like it!


Byte64 said...

Thanks Dimitri, i certainly appreciate positive comments!


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