cancel
Showing results for 
Search instead for 
Did you mean: 

Positioning pop up window

Former Member
0 Kudos

Hi Experts

I have a table with some columns containing input fields. All input fields are mandataory.

I am displaying an error pop up window incase any of the input field is blank. This pop window/view contains few details such as user name, employee code, line number at which input field is blank etc.

We are handling one row at a time. It means even if there are multiple rows that are erroneous we are handling them one by one only.

Now I am required to show this pop up window just below the row which is having blank input field.

Any idea how to achieve this?

Kindly note that users screens are of different sizes.

We are using NW 7.

Regards

Vineet

Accepted Solutions (0)

Answers (2)

Answers (2)

p330068
Active Contributor
0 Kudos

Hi Vineet,

If you use popup windows for showing the error message for the rows and according to your requirement then you need to set hight size for popup windows dynmically after identifying row in the table and test it for successfully displaying for all rows in the table.

Hope it will helps

Regards

Arun Jaiswal

Former Member
0 Kudos

Hi

I have already tried what you are suggesting.

Here is what I have tried till now.

I have taken height of table header as reference and change height of my popup window based on row selected.

An increment of 20 is sufficing my requirement.

I am able to successfully adjust height of my popup window.

This approach works fine till the FirstVisibleRow is 0.

Problem starts when when first visible row is not 0. I am not able to determine value of first visible row outside wdDoModifyView.

Use of wdDoModifyView provides result only if I execute my action twice which is not acceptable.

Could you please help me here?

Regards

Vineet

p330068
Active Contributor
0 Kudos

Hi Vineet,

You can try to adjust popup window for first visible row in the table manually and see the results then increment hights for subsequest rows in the table.

Regards

Arun Jaiswal

Former Member
0 Kudos

Hi

Is there any way we can determine value of first visible row outside wdDoModifyView?

For adjusting height I am using below code

ShowMessageView(300,(160+20*i));

There are 10 rows visible at a time in table.

So this code works only till the rows displayed are 0 to 9.

The moment it changes from 1 to 10 or 6 to 15, position of popup window goes for a toss.

So, the correct code should be

ShowMessageView(300,(160+20*( i - FirstVisibleRow)));

It will be really helpful if you can let me know how we can determine value of first visible row outside wdDoModifyView?

Regards

Vineet

Former Member
0 Kudos

Hi Vineet,

Web Dynpro does not support pixel perfect alignment. So , I am not sure if the code will work on different devices & browsers.

Regarding FirstVisibleRow , you can bind 'FirstVisibleRow' property of the table to context attribute of type int . Then, it can be accessed from outside wdDoModifyView method. However , server event is required for this property to get updated.

Regards,

Apurva

Former Member
0 Kudos

Hi Apurva

Now that was some useful answer. I have awarded points for Help.

I have alreay done the binding part of property FisrtVisibleRow with a context attribute.

I am changing lead selection to the error line.

Is it possible to call wdmodify view at the same time?

Regards

Vineet

Former Member
0 Kudos

Hi Vineet,

Hook method 'wdDoModifyView' will be called by Web Dynpro framework in case of server event.

Only option to force execution of wdDoModifyView is having dummy server event (so as to force execution of all steps of phase model) but it will impact the performance of the application.

Regards,

Apurva

Former Member
0 Kudos

Hi

Thanks.

I am lil confused on how to achieve forced server event in my code. Lemme check.

Thanks again

Former Member
0 Kudos

Hi Vineet,

I dont think you can force server event from code.. It has to be some kind of user event like onSelect event of table.

Let us know if you find any workaround for forcefully triggering execution of phase model from the code.

Regards,

Apurva

Former Member
0 Kudos

Hi Vineet,

Why don't you try

wdComponentAPI.getMessageManager().reportContextAttributeException(<parameters such as the context attribute infor and the message>);

Here you can pass the attributeInfo for the exact atrribute from the element of the node bound to the inputField and also pass a message to be displayed which includes the Employee Number, Line Number and whatever details you want to add to the message. reportContextAttributeException will highlight the inputFiled in red and if click the message or the inputField it will also display the error just below the inputField.

Regards,

Ajay

Former Member
0 Kudos

Hi

Thanks for your reply.

reportContextAttributeException is undefined for IWDMessageManager.

My requirement is to display message in a popup window only.

Regards

Vineet