cancel
Showing results for 
Search instead for 
Did you mean: 

master-detail error

Former Member
0 Kudos

I have a master view (Om_webfomView).In this masterview I have 2 viewcontainers which contains 2 other views. all the views have plugs. On an event i want the one viewcontainer to be invisible. The methode and the coding for that are in the custom controler.

I binded the value attribute to the visible property.

Code in viewcontroler of one of the viewcontainers

Event

wdThis.wdFirePlugToOmwebformsview();

wdThis.wdGetOm_Webforms_CustController().InvisibleMenu();

wdThis.wdFirePlugToOrgUnitView();

wdThis.wdGetOm_Webforms_CustController(). VisibleOrgUnitView();

In costum controler

//@@begin InvisibleMenu()

wdContext.currentContextElement().setWDVisibiltyMenuView(WDVisibility.NONE);

//@@end

//@@begin visibleOrgUnitView()

wdContext.currentContextElement().setWDVisibiltyOrgUnitView(WDVisibility.VISIBLE);

//@@end

It is not working, what is wrong.

Message was edited by: S. Dresen

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Create an action and call the Fireplugs according to your condition. Kindly State your exact need

Regards

Saravanan K

Former Member
0 Kudos

the action is created in the view controler.

What i want is that when the customer presses a button it wil go to the other view and in the masterview (inthis case Omwebforms) should one of the view containers become invisible and the other visible.

The code you see is the event.

So the event needs to do two things:

make a viewcontainer (in)visible in the masterview and navigate to an other view

Former Member
0 Kudos

Hi,

Bind that action to the Button and make changes in the visibility of the ViewContrainers. I think no need for Plug

Regards,

Saravanan K

Former Member
0 Kudos

I did bind the properties and dfine the action.

Details

Masterview

-


viewcontainer A

View 1

Button (event)

-


viewcontainer B

View 2

so on push button it needs to go to view 2 and make viewcontainer A invisible

Former Member
0 Kudos

Hi,

Create two attributes of type Visibility say convis1, convis2 and bind to two viewcontainers.In the Action of Button, Set the convis1 to none and set second(convis2)to visibile

Regards

Saravanan K

Former Member
0 Kudos

Hi dresen,

here you need two visible properties. one should be assigned to viewContainerA and another to ViecontainerB. when you click the button, the action triggered and set the visibility property by

wdcontext.currentContextElement().set<visibleofcontainerB>(WDVisibilty.VISIBLE);

wdcontext.currentContextElement().set<visibleofcontainerA>(WDVisibilty.NONE);

Former Member
0 Kudos

the action is in view 1 and not in the masterview.

Code in viewcontroler of one of the viewcontainers

Event you see in my first post

Message was edited by: S. Dresen

Former Member
0 Kudos

Hi,

Kindly put the Actioncode where the Button is located

Regards

Saravanan K

Former Member
0 Kudos

what do you mean Saravanan

Former Member
0 Kudos

Hi,

In which view the button is placed. Create an action on that view and bind the action to the button. Kindly comment all the plug codes

Regards

Saravanan K

Former Member
0 Kudos

Masterview (INBOUNDPLUG VIEW A AND B)

-


viewcontainer A

_________________View 1 (outboundplug to masterview and view2)

_____________________Button (event)

-


viewcontainer B (outboundplug to masterview)

_________________View 2

Code of the button:

wdThis.wdFirePlugToOmwebformsview();

wdThis.wdGetOm_Webforms_CustController().InvisibleMenu();

wdThis.wdFirePlugToOrgUnitView();

wdThis.wdGetOm_Webforms_CustController().VisibleOrgUnitView();

the plugs don't have code

Message was edited by: S. Dresen

Former Member
0 Kudos

Hi Dresen,

change your code like this,

//wdThis.wdFirePlugToOmwebformsview();

wdThis.wdGetOm_Webforms_CustController().InvisibleMenu();

//wdThis.wdFirePlugToOrgUnitView();

wdThis.wdGetOm_Webforms_CustController().VisibleOrgUnitView();

Former Member
0 Kudos

still doesn't work.

Former Member
0 Kudos

Hi dresen,

you have created the method in controller to visible viewcontainer 2 is,

/@@begin visiblePosView()

wdContext.currentContextElement().setWDVisibiltyPosView(WDVisibility.VISIBLE);

//@@end

but you are calling the method

wdThis.wdGetOm_Webforms_CustController().VisibleOrgUnitView();

is it correct?

Former Member
0 Kudos

sorry, i misscopied it

I just don't see why it is not working.

The value attibutes have the following properties

calculated false

name WDVisibiltyOrgView

read only false

structureElement

type:com.sap.ide.webdynpro.uielementdefinitions.Visibility

Former Member
0 Kudos

Hi Dresen,

actually, what was the result you got when deployed the application?

Former Member
0 Kudos

well everything is deploying, but when i push the button nothing is happening.

Former Member
0 Kudos

Hi Dresen,

have you done the following mapping steps?.

bind the WDVisibiltyMenuView attribute to the visible property of viewcontainer1 and

bind the WDVisibiltyOrgUnitView attribute to the visible property of viewcontainer2

Former Member
0 Kudos

yes i have

Former Member
0 Kudos

Hi dresen,

please try the following steps,

in the diagram view, create an outbound plug for the view1 which has the button and create an inbound plug to the another one view2 link these two. also create an empty view in viewcontainer1 then link this empty view with outbound plug of view1.

in your button action write,

wdThis.wdFirePlugTo<OutboundtoView2>();

hope this will work

Answers (0)