Hello, in this video I will show you how you can control the output of the wrist with surface. So this is a web surface which we created last video, I will go here and I will add the version number and the resource number okay. The version number you will find find here is the top and this is a resource name, version number and resource name. So you want to add this by default it will return five row only you will find here the bottom in 510 2030 and 40 only five department and as you can see as well it return the all attribute exists in the view object department view object has department ID, name, manager and location. The view object itself so it returned all attribute. So in this video, I will show you how you can control that splayed attribute and how you can control the return role.
Because as you know, most of the mobile application will use the rest for web surface. So, of course, if the rest of is a very surface return to all data, it can't be handed to so it it should send the data batch by batch. So I will show you how you can control the output number of row four as I will RESTful web surface and how you can send batch by batch. First, let's try to see I'll show you how you can control the attribute if it displayed attribute or not. You can find it here is attribute in the view object. You will find here for example, if I don't want to display the manager, so I would sit next to the manager and I will go here and I see here Hidden attribute you will find here or at least I will see it is hidden in the wrist surface okay.
So, this is a way one way you can do it there are other way you can define the here like shaping and you in the is attribute here you can select the shape and control this but I saw this is sometimes it's not working so, I like to work with this way that you select what any attribute you want. And you just uncheck this it means his attribute will never displayed in the rest of subsurface. So, if you back again here in the attribute, you will find the hidden one is manager ID and this is only will be displayed. So let us now stop this and rerun it again and check the output of this web surface after we hide the manager ID. So you will select service To surface project, right click and see here. If I refresh Here you will find this exceptions is one of the stupid things you have to stop the whole server and rerun it again.
So you have to stop the Manage server because I make some changes XML file. So we want to read restart the whole server to take this change. So once this is stopped, finish, I will re run the application again. His service is restarted so it is now to run it again. So as you can see here, the department ID department name and location and there is no more manager ID displayed. So, from here from the view object attributes you can control which attribute you want there is to display or you want to hide it or to want to display it.
The second thing I need to tell you about it is the number of rows as a batches which you want the RESTful web service to be returned by default as I said it is only five row, but you have two parameters you can use to control this first one is limit limit if you write limit 10 enter so it will return 10 departments. Okay, now within 510 2030 4050 6070 80, all the 10 divorcement so the second parameter is Off offset offset is a batch. So, it means if you write offset zero it means it will get sorry and have to write here and have to equal zero. So, offset equals zero it means I will need unlimited it means I need to get the first 10 rows. So, it will return from 510 till 90 if I if you want to get the second 10 like a batch second 10 row you should set the offset to be 10 it means give me 10 row is starting from row number 10 when you press this, you will find here to start from 100 110 then 190 after that I need to get 10 but starting from 20 so it will get 200 and so on.
So, you have two parameters here, one called limit one called offset limited means I need to return 10 robots in row or 20 or whatever and offset is starting from which rule. So for example, if you have them wide application will use this rest URL and you want the homepage will return only the first 10 once the user scroll more it will take get the second 10 and so on. So, this you can control the return of this to using limit and so, in this video I'll show you how you can hide or display a specific attribute from the view object interest and I show you how you can use limit and offset to control the return result you negativity