Friday, 2 December 2016

APEX 5 - Select2 Plugin

Show maximize button

Issue with default CSS

Select 2 Plugin is most used and most downloadable plugin out of most APEX plugins available. That is not surprising considering how well it adds value to LOVs coming out of the box in APEX.
Working recently on a project we encountered an issue that I wanted to write a post about.

Scenario for this case is:
1. you create a region 
2. you enable Show Maximize Button under Region Template Option
3. Add a field and make it a Select2 LOV
4. You now run the app and try your LOV; everything works as expected
5. Then you click on expand button
6. What happens now is your LOV does not work any more or better said it works but it is not shown to you anymore
How do we fix this?

Luckily there is a simple solution. Apply this small CSS and things are working back again.
.select2-dropdown
{
   visibility: visible;
}
Hope this will help.

Demo link: here

Cheers, 
SLino

Sunday, 13 November 2016

APEX 5 - CSS export

Theme roller changes export

Exporting your CSS customization

Something I wanted to write down since I returned from KScope in Chicago and presenting at AUSOUG Connect 2016 just made me realized this will be useful to other as well.

Apex 5 came with this greatly looking Universal theme and Theme roller functionality. 

But did you ever want to export theme customization you made on your application to any other app?

These are steps you need to take
  1. In your customized application open Theme Roller
  2. Make customization (if not already there)
  3. Open browser developer Console
  4. Execute apex.utr.config()
  5. On left hand side a result similar to apex.utr.config({"customCSS":"","vars":{"@g_Accent-BG":"#25cf7d"}}); will be shown.
  6. Copy code shown on the left starting with apex.utr.config
  7. Open and run your application (where you want to copy the theme)
  8. Open Theme Roller; This is important otherwise you get apex.utr.config is not a function error in your console
  9. Open browser developer console
  10. Paste copied text and Run
  11. You will notice changes on you application
That is all. All needed now is for you to save it using Save As button.

As far as I am aware this is currently only way to do this. There is no out of the box functionality/supported way of doing the same. 

Hope this will help. Again thanks Roel for sharing. 
Cheers, 
SLino