cancel
Showing results for 
Search instead for 
Did you mean: 

how to obtain IProxy argument for LayoutControllerFactory.getLayoutControll

Former Member
0 Kudos

I am trying to create LayoutController from LayoutControllerFactory.getLayoutController(IProxy proxy, IResource resource)

I don't know where and how to obtain or create Proxy object for first argument

Thanx for any help

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Hi,

Depending on the context in which you are, you can get IProxy object in this way:

https://help.sap.com/javadocs/NW04/current/km/com/sapportals/wcm/rendering/base/class-use/IProxy.htm...

IProxy WdfStatusRemoveEvent.getProxy()

IProxy LayoutObject.getProxy()

IProxy IProxy.getTargetControl()

returns the event handler control.

abstract IProxy AbstractProxyControl.getTargetControl()

returns the event handler control.

protected IProxy LightCollectionRenderer.getProxy()

IProxy IComponent.getProxy()

IProxy AbstractComponent.getProxy()

protected IProxy AbstractCollectionRenderer.getProxy()

IProxy IProxyDetailsProperty.getProxy()

IProxy AbstractLayoutController.getProxy()

returns the proxy that has been set when instantiating the class.

protected IProxy AbstractLayoutComposer.getProxy()

IProxy AbstractMassCommand.getProxy()

Gets the proxy attribute of the AbstractUICommand object

Greetings,

Praveen Gudapati

[Points are always welcome for helpful answers]

Former Member
0 Kudos

thanx for advice but ...

// IProxy WdfStatusRemoveEvent.getProxy()

you must have IProxy, if you want to create WdfStatusRemoveEvent (to call its constructor)

// IProxy LayoutObject.getProxy()

i have created LayoutObject by calling his constructor, but method getProxy() returns null

// IProxy IProxy.getTargetControl()

it's not static method and if i had an instance of IProxy, i wouldn't ask how to create it

// protected IProxy LightCollectionRenderer.getProxy()

also returns null

// IProxy IComponent.getProxy()

ComponentFactory requires IProxy to create IComponent ... if i had one, i wouldn't ask how to create it

// IProxy IProxyDetailsProperty.getProxy()

i don't know how to create it

I also tried to implement AbstractLayoutControler, but it also returned null by calling this.getProxy() method

I tried following example https://www.sdn.sap.com/irj/sdn/thread?threadID=7602

it has failed on null pointer exception on this line

IComponent component = ComponentFactory.getInstance().getComponent("ResourcePath", getProxy());

becouse getProxy() returns null

They say IProxy is base interface to use Flexible UI. Perhaps they could spend a word about how to create it

All i wanna do is to display content of ICollection object on iview using Flexible UI by simplest possible way

I don't wanna implement anything till it's not necessary

I just wanna use predefined layouts and components to display it

i'm trying to write something like this, but may be i'm completly wrong:

public void doProcessBeforeOutput() throws PageException {

Form myForm = this.getForm();

IResourceContext resourceContext = new ResourceContext(null);

URI uri = new URI("/");

IResource res = ResourceFactory.getInstance().getResource(uri,resourceContext);

ICollection col = (ICollection)res;

ICollectionRenderer cr = CollectionRendererFactory.getInstance().getCollectionRenderer(<missing IProxy>, col, IFlavorConst.FLAVOR_LIST);

myForm.addComponent(cr.renderAll());

}

but i still don't know what to use instead of <missing IProxy>

Answers (0)