Friday, 24 May 2013

30.CREATING FORM VIEW



Once we fetch the result, user may wish to have detailed look at the service contract. As we know that we are not displaying all the information in the result list. 

So it’s standard functionality to make any column as a hyperlink in the result list. User uses this link to go to the detailed page. It is also referred as Overview page. 

Overview page is special type of view set, which will give us detailed information about any business object. One business object requires a lot of information to be shown. 


Ex: service contract has header information, dates information, status information, partner information, line item information, actions information, and transaction history information….etc. 

Let us create one form view to show important header information. Later we will add this view to the overview page and provide navigation as soon as user clicks on particular column in the result list.

Go to the UI component –component structure browser and create new view. Give the name as HEADER. In the next step, give the context node name and choose the entity BTAdminH (This entity is used to represent the contract header information ). 



Just keep continue until the step select view type. Here choose the FORM view and check the configurable check box and CHANGE/DISPLAY mode box.





Complete the wizard and save it. we have created one form view.
Let us configure the view first.
Go to the configuration tab of the view HEADER. It will look like as shown below. 



Configuration of form view is little bit different when compared to table view. Click on edit button and choose ‘SHOW AVAILABLE FIELDS’.  It will display the context node that we created above. If you expand the context node, it will bring the list of fields. 





In order to bring the filed from list to displayed section, we need to select the field and click on + button to bring the field into display section. – Button is used to remove the field from displayed section.
There are different types of display sections available. 

1.       16 columns/1 panel: click on Make 16 columns/1 panel. All fields are displayed in 16 column space .Try to add two fields. Two fields will be arranged row by row in one single section. fields will be left aligned. 








Remove two fields by selecting each field and press – button.

1.       16 columns/2 panel: click on Make 16 columns/2 panel. All fields are displayed in 16 column space in two panels(sections). Try to add two fields. Two fields will be arranged by row by row in one single column. We can also bring the second field by clicking on right arrow mark. 



 Select the 2 field and click on the right arrow button. It will be moved to the second panel as shown in the below.
 



We can also adjust the field width by selecting it and pressing ALT+CLICK. This will show field properties. In above screen, field logical system, label spans from column A to column C. field content spans from D to H.

Select any field and press Alt + (mouse left click). It will display the field properties. 




Here we can change the width of the label and width of the field content. We can also control certain properties of fields.

We can also change the label of the field.

Display: if we check this check box, then field will be used to just display the value. User cannot enter any value into this field.

Mandatory: when this property is checked, framework displays an error message to the user, if he/she does not enter any value into this field.

We will test these properties when we complete the entire process.

1.       8 columns/1panel:   There will be only 8 columns and single panel. Fields will be right aligned.

We can make any kind of configuration here. For example we have created 16 columns/2 panels and added two fields.



We have created just header view. In next chapter we will create one overview page and assign this view to that overview page.


2 comments:

  1. Hi Praveen

    Thanks for all your help.

    While creating the form view if we choose change/display mode, we get an error. However if we don't choose it , it works fine.

    In your screen shot I can see that you have used a pen to show the tick mark and not actually checked the change/display mode.

    Please throw some light on this.

    Thanks.

    ReplyDelete
  2. hi Ketan,

    generally when ever you choose this option, you can see separate code in .html page. this code uses view group context. WEB UI framework generally uses this view group context to bring a view in to either display mode or edit mode. this variable should be initialized with the help of a method. if don't initialize it, that variable points to nothing or it is not bound. so you will get null pointer exception. if you don't choose this tick mark, framework wont place any code in the .html page and there is no problem.

    ReplyDelete