cancel
Showing results for 
Search instead for 
Did you mean: 

setResizable() method into IWDConfirmationDialog object

Former Member
0 Kudos

Hello,

I'm working on SAP Portal 7.3 and I'm testing popup tutorial app from SAP: tc/wd/tut/win/popup

I need to avoid resize (Is Resizable) option for all popup windows into my Webdynpro apps (I'm migrating from Portal 7.0 to Portal 7.3).

We're using wdComponentAPI.getWindowManager().createConfirmationWindow() method instead of wdComponentAPI.getWindowManager().createModalWindow() method.

As I'm seeing in tutorial app, createConfirmationWindow() doesn't allow me to use setResizable() method. Is there no way to do that? I need to set setResizable(false) into my confirmation popups.

Thanks!

Miguel Angel.

Accepted Solutions (1)

Accepted Solutions (1)

junwu
Active Contributor
0 Kudos
it is done in window controller, not at the code where the window is created

public void wdDoModifyView(com.sap.tc.webdynpro.progmodel.api.IWDView view, boolean firstTime)

  {

    //@@begin wdDoModifyView

      if (firstTime) {

            // IWDWindowViewElement is the root UIElement of the View

            IWDWindowViewElement window = (IWDWindowViewElement) view

                    .getRootElement();

            window.setResizable(false);

Former Member
0 Kudos

Hi John,

Yes, but this is done for popups called through wdComponentAPI.getWindowManager().createModalWindow(), right? But our apps are using wdComponentAPI.getWindowManager().createConfirmationWindow() method.

Into SAP tutorial I'm seeing this:

public void onActionOpenConfirmationPopUp(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )

  {

    //@@begin onActionOpenConfirmationPopUp(ServerEvent)

    IWDTextAccessor ta = wdComponentAPI.getTextAccessor();

    IWDConfirmationDialog confirmation = wdComponentAPI.getWindowManager().createConfirmationWindow

    (

      ta.getText(IMessageTutorial.CONFIRMATION_TEXT),

      wdThis.wdGetCloseConfirmationPopUpAction(),

      ta.getText(IMessageTutorial.POPUP_CLOSE_ACTION_TEXT)

    );

    confirmation.addChoice

    (

      wdThis.wdGetRemindAgainAction(),

      ta.getText(IMessageTutorial.CONFIRMATION_BTN_REMIND_AGAIN_TEXT)

    );

    confirmation.setOnClose(wdThis.wdGetCloseConfirmationPopUpAction());

    confirmation.setTitle(ta.getText(IMessageTutorial.CONFIRMATION_TITLE));

    confirmation.setIcon(WDResourceFactory.getSystemResource(WDIconLarge.Reminder).toString());

    confirmation.setWindowPosition(100, 100);

    confirmation.setWindowSize(200, 150);

    confirmation.show();

    //@@end

  }

And here I can't use the setResizable(false) method. Is there no way to do it through this object?

Thanks!

Miguel.

Former Member
0 Kudos

Hi all,

Any comments? Is it not possible to avoid window resize if we're using wdComponentAPI.getWindowManager().createConfirmationWindow() method?

Thanks!

Miguel Angel.

Former Member
0 Kudos

Hi Miguel,

To avoid window resize, you have to do it on the window controller with the IWDWindowViewElement element.

In you're case, you write your code in the view or in the controller and you can't use the IWDWindowViewElement.

If you want to avoid the window resize, you can create a new window in your WD project that look like the confirmation window.

Regards,

Nicolas

Former Member
0 Kudos

Hi Nicolas,

Yes, I think you're right, this is as I read in SAP popup demo app... but then I need to modify all the WD projects (we have a lot of them), add a new window, add a new view, add code...

We used createConfirmationWindow() because in Portal 7.0 the resize it was not allowed to end-users... and right now (Portal 7.3) I understand we need to replace all the createConfirmationWindow() calls to createModalWindow(), right?

Well, please, tell me if I'm wrong or not... I think I should explain to my boss the new situation...

Thanks!

Miguel Angel.

Former Member
0 Kudos

Hi Miguel,

I think I am sorry to tell you that yes, if you want your pop-up are not resizable, you must do this.

I can see in the /irj/nwa portal 7.3 that the pop-up confirmation contain all the resize option.

Good luck if you have a lot to change.

Regards,

Nicolas

Answers (0)