cancel
Showing results for 
Search instead for 
Did you mean: 

How to modify the layoutController!

Former Member
0 Kudos

I konw how to copy and set layoutSet,

but That's not enough to me!

I must change the layoutController!

But It's seems that the layoutController is

Java Class, If i must change it who can tell

me how to do it!!

Best Regards

Han

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Han,

In this link you can find a good explanation:

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/6b30b090-0201-0010-829d-e98...

Layout Controller

Choose one of the following options:

Implement the ILayoutController interface

com.sapportals.wcm.rendering.layout.ILayoutController

Extend the abstract class (recommended)

com.sapportals.wcm.rendering.layout.AbstractLayoutController

Overwrite at least the following methods of AbstractLayoutController:

getNewInstance(): Returns a new instance of this layout controller

render(): This method is called by the framework when the rendering action is executed

getControls(): Returns a list of controls that are rendered. The control array should contain all area elements with their flavors.

Coding in detail:

public class MyLayoutController extends AbstractLayoutController { public ILayoutController getNewInstance() { return new MyLayoutController(); } public Control[] getControls() { if (this.controls == null) this.createControls(); return this.controls; } public Component render() throws WdfException { GridLayout result = new GridLayout(); result.setHeightPercentage(100); result.addComponent(1, 1, this.controls[0].render()); result.setWidth("100%"); return result; } private void createControls() { this.controls = new Control[1]; //NeutralControl control = new NeutralControl(this.getProxy(), /* IFlavorConst.FLAVOR_LIST.toString()); MyControl control = new MyControl(this.getProxy(), IFlavorConst.FLAVOR_LIST.toString()); this.controls[0] = control; }}

NeutralControl is not available for applications other

than KM core applications.

Patricio.

Patricio.

Former Member
0 Kudos

Thanks Patricio.

I am not good in develop.

So i don't want to develop.

You said I have options .

May be you could say some thing more about

'Implement the ILayoutController interface

com.sapportals.wcm.rendering.layout.ILayoutController

'

Thank you very much!!!

Best Regards!

Han

Former Member
0 Kudos

Hi Han,

Perhaps if you give me more information I can help you.

Patricio.

Former Member
0 Kudos

Hi Patricio

May be you know the layoutcontroller

"SelectionModeLayoutController"

It has two button in bottom,'Ok' and 'Cancel'

I really don't want it to display .

Could you tell me how to do without delvop ?

Thank you!!

Former Member
0 Kudos

Yes you can Han,

1. Duplicate your layout set: SelectionModeLayoutSet

2. Edit this new layout.

3. In layout controller set: SimpleLayoutController.

4. Save.

5. Preview.

Patricio.

Former Member
0 Kudos

hi

every layout controller has a collection renderer and resource renderrer. this is a generic step you have to get into system configuration >content management>user interface -->settings -->layoutset and you will find the controller by using filter (SelectionModeLayout*) you have two renderers called SelectionModeRendererSettings as collection renderer and SelectionModeResourceRenderer as resource renderers ok now you have to create duplicate of this so you navigate Configuration

Content Management

User Interface

Settings

Collection Renderer Settings as well same for resource renderer settings duplicate them while duplicating them you will find commands group which defines the command being displayed so you have to navigate to command group (Configuration

Content Management

User Interface

Settings -uicommand groups)

duplicate the group and attach it to the renderer being duplicated by you after removing those commands and then attach those renderrer to duplicated layoutset.it will work and apply that duplicated layoutset to the iview property layout set.hope this will help.please don,t forget to give points if it helps you.

with regards

subratom kundu

Former Member
0 Kudos

Thank you subrato!!

Its middlenight now

Thanks for you help answer,

Points given.

Best Regards

Han