How can you set the region and item layout in APEX?

Region and item layout so the first thing that I want to talk about is anybody currently using or has used user interface defaults okay great um so for those who are not just very quickly and user interface defaults are a way in which you can increase consistency between forms and reports that use the same base table so what does that mean well basically what it means is that um you can make metadata in apex that says hey when I use the employee table um thee name column I don’t want that too actually and I don’t want the label or the column heading to say e name I want it just to say the name and that MGR column I don’t want that to say MGR I want that to actually say, manager.

So what happens is that when you decoratively create a forum on that on the employee table if and assuming you made the user interface defaults on the employee table and it’ll use whatever defaults you set so it helps reduce a lot of redundant work overtime so as you create more tables or create more reports and forms on the amp table apex is going to do its best to resolve any user interface defaults for you so if you’re always having to real able the name column to name or relatable the depth no column to just a number sign or something the user interface defaults are going to try to solve that for you and the way that you do this is through sequel workshop utilities.

So just to show you very quickly I’m going to head into the sequel workshop and I’m going to go into the utilities and you see there’s an option here called user interface defaults and the important part here is that there’s a table dictionary and if you click on that it’s going to show you all tables which have a user interface defaults so the only table that has user interface defaults is the amp table, so your questions should become well how do I add better if you click this synchronize button this is a pretty good explanation right here it says this will add new columns added two tables since the last synchronization and remove columns that no longer exist so, in other words, it’s going to try to up it’s going to try to add all of the this is a nice way to do a user interface defaults kind of in bulk if you don’t want to do things in bulk you just want to do a few specific tables then just remove this filter here where it says defaults exist will say get rid of this filter, please.

We do not want that and here are all your tables and so I’ll just pick the depth table because it’s one that I’ll use very fairly often and I’ll say yes please go ahead and create defaults but what does this do for me it’s going to read the department table it’s going to get all the columns now that’s great and if and if I change defaults exist to yes I see there I have department but what does this do for me well if I click on department here you can see for the department number column the label that I want to use is step no for the D name column the label that I want to use is d name you know by default I want this displayed in reports I want this displayed in forms this particular one should have required and all of the help text that I want to provide for these fields are going to be here okay so let’s just take locate the lock, for example, I’m going to edit this and I’m going to say the label that I don’t want to use a lock.

I want to use location the help text assignment is I’m going to say this is where the department and is located I can have this display as a text field I can change how I want it to display I can make it a rich text editor if I want I can look at and these are all the format mask for this type of thing I can add that if I want the default value apex is basically going to do its best to help create this item starting off kind of as configured as much as you want so I’m going to say apply changes and want to change d name and we don’t want a name we’re just going to use name how to identify a department something like that apply changes so now whenever I go to create a form or report on the depth table at the label for the D name column is going to read the name and the label for the lock column is going to read location instead of D name and lock respectively are there any questions on user interface defaults.

Absolutely right say a default value and I’ve got it defined here that is correct unfortunately there’s no there’s because the reason why they don’t do that it not that you couldn’t do it and I mean logically it’s that’s possible is they don’t want to they’re meaning the apex team doesn’t want to accidentally stamp out any customizations that maybe you made right there’s no real way of identifying there’s no good solution for identifying which ones you should or shouldn’t update if that makes sense absolutely okay so the user interface default so before you start creating lots of regions and components and this is something you probably want to do first and after you’ve done this and you want to start creating your regions and your components and this is the region layout basics we’ve kind of um I touched on this in the intro class.

We are going to kind of expand upon it now kind of in this one MMM for those of you who are not familiar with this raise your hand if you feel comfortable with region positions ok so a just quick reminder a region position is just where on the page a component is going to be displayed so, for instance, let me edit this page if I have a here’s my tree and if we look on my page it kind of renders here in the content body and if we go back to the editor we can see well that makes sense because it’s under its nested underneath the content body well what if I want it to display somewhere else in my application well to do that there’s a couple of different ways I can do that and there’s actually a position property over here I can change that I can say I don’t want the content body in fact and I want this to go before the footer or maybe in the footer or maybe I wanted to go way up at the top of the page in my page navigation right.

So I can kind of modify like without changing by the region itself I can say or having to modify the page in any way I can say this particular component I want this to go all the way up in the page header save this is probably going to look really bizarre it’s probably going to blow up my page and it did right but you can see that my tree was rendered up in the page header right now this is a very poor spot for this particular region but it could be a perfect spot for maybe maybe you have a borderless region and that maybe you have a borderless region that maybe has a couple little pieces of information that you want to display up at the top like maybe the environment that they’re in maybe if you’re in dev test or prod maybe and you and have some sort of custom message or something you’re trying to build out a theater do you have a question or as your hand you still up from earlier ok ok I just wanted to make sure ok so we obviously don’t like this position or at least I don’t have this doesn’t make sense.

Let’s go move it and the other way that we can move the position of components if you right-click you can say move to and so now I’m going to say move to the content body and I want you to go after this list region that I created earlier ok save my page and I really like this right-click menu, by the way, this is like my favorite thing if you want to move to delete and/or if you want to copy it, in other words, making a make another version of this so you have to you can do that just by right-clicking and copy and if you get the same options as they move to ok run my page and now what should happen is now my tree should be displayed here.

So that’s region those are positions well how do we control our layout here so um we talked about before in the intro class we kind of talked about grid but one thing that we don’t really talk about in the intro class is kind of nesting regions and how this is actually very helpful okay so you can use grid layout and who is who feels like they raise your hand if you feel comfortable with the apex grid system or you’re familiar with it okay.

Leave a Comment