cancel
Showing results for 
Search instead for 
Did you mean: 

Personalize Option in iView

Former Member
0 Kudos

Hi,

I have scenario where i need to provide personalize options for an iView. The personalize popup should contain two tabstrips,inputfields and checkboxes through which the user can personalize his iview.

I know how to add dropdownlist box and input fields through portalapp.xml file but how can we add checkboxes and Tabstrips.

Thanks and Regards

Padmaja

Accepted Solutions (1)

Accepted Solutions (1)

detlev_beutner
Active Contributor
0 Kudos

Hi Padmaja,

for this you will have to develop your own personalization dialogue, see for details including the links provided there.

Hope it helps

Detlev

Former Member
0 Kudos

Hi Detlev,

Thanks for a quick reply.I worked with the example you gave in one of the forums, i am getting the personalize page but when i click on save it gives me a javascript error at "window.parent.setRefresh()"

Could you please resolve this problem.

The link for the .par file you gave in one of the forums was:

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sapportals.km.docs/business_packages/a1-8...

Thanks

Padmaja.P

detlev_beutner
Active Contributor
0 Kudos

Hi Padjama,

please be aware that the PAR you referred to is EP5 stuff. The JS call comes from selectionScreen.java, maybe in the EP5 frameworkpage such a method did exist when it now does not any longer. Try for example a simple refresh()...

Hope it helps

Detlev

Former Member
0 Kudos

Hi Padmaja,

Add the following lines of code for your iView to be refresh. Add this if block where it is only printed out when the user clicks on 'Save'.

response.write("<script>n");
response.write(		"window.opener.pageSupport.ivuRefresh('" + request.getComponentContext().getContextName().toString() + "');n");				response.write("window.close();n");
response.write("</script>");

Former Member
0 Kudos

Hi,

Actually the problem is the doHandleEditData() method is not being called in portal. But the same code is perfectly working in PDK.

I think the problem is with this line of code

myForm.setAction(request.createComponentURL(request.getNode(), event));

If i am wrong please correct me.

Please help me out in solving this problem.

Thanks and Regards

Padmaja.P

Answers (1)

Answers (1)

Former Member
0 Kudos

Did u find any solution?

Cud u plz share ..if u have done it successfully.

Thanks.

Former Member
0 Kudos

Hi,

Sorry i could not find any solution. As i said the code works with PDK but not in the portal.

Thanks and Regards

Padmaja

Former Member
0 Kudos

Hi Padmaja,

Thanks for responding.

Can you plz post portalapp.xml and the code from the doEdit() of your abstractportalcomponent?

For some reasons iam unable to display any elements like buttons other than simple texts..

Iam able to bring up my custom dialog box but can't see anything in it(I can see some text statements if i do response.write("some text statements");)

If u free for some time, can u look into my thread and find out whatz wrong:

Thanks.

Former Member
0 Kudos

Hi Peter,

I saw your post and i think there is a problem with your PortalApp.xml file. According to the portalaap.xml file which you posted, you have given your

following line of code in component-config

<property name="PersonalizationClass" value="com.sap.pdk.tech.custompersonalization.selectionScreen" />

but it should be in component-profile.

I checked out the output placing the above line of code in component-config and it gives me a message bar saying "there are no objects for personalization".

So please change your portalapp.xml accordingly.

regards

Padmaja.

Former Member
0 Kudos

Thanks alot for replying!

Hope you wud solve my problem:

<?xml version="1.0" encoding="utf-8"?>

<application>

<application-config>

<property name="PrivateSharingReference" value="com.sap.portal.htmlb"/>

</application-config>

<components>

<component name="LinksD">

<component-config>

<property name="ClassName" value="com.sap.LinksD"/>

<property name="mode" value="edit">

<property name="delegate" value="com.sap.personalizationDialog.selectionScreen"/>

</property>

</component-config>

<component-profile>

<property name="tagLib" value="/SERVICE/htmlb/taglib/htmlb.tld"/>

<property name="PersonalizationClass" value="com.sap.personalizationDialog.selectionScreen"/>

</component-profile>

</component>

<component name="selectionScreen">

<component-config>

<property name="ClassName" value="com.sap.selectionScreen"/>

</component-config>

<component-profile />

</component>

</components>

<services/>

</application>

Do u think there is an error inside this?

In the custom dialog iam just placing some elements like button and input field..Y can't it display elements like these but can text messages?

public void doEdit(IPortalComponentRequest request, IPortalComponentResponse response) {

IPageContext myContext=PageContextFactory.createPageContext(request,response);

Form myForm = myContext.createFormDocument("example");

InputField myinput=new InputField("input");

myinput.setDesign(InputFieldDesign.STANDARD);

Button mybutton=new Button("mybutton");

mybutton.setText("Personalize");

mybutton.setOnClick("Personalize");

myForm.addComponent(myinput);

myForm.addComponent(mybutton);

myContext.render();

}

There is something else that is missing as iam able to see text but not any elements...

Thanks padmaja.

Former Member
0 Kudos

Hi,

I compared your code and mine i could find these differences in the doEdit() method

Firstly create a document and a form and then add the form to the document.

Document mydoc = myContext.createDocument("custom");

Form myForm = myContext.createFormDocument("example");

mydoc.addComponent(myForm);

Now create your components like inputfield etc and add them to the form.

After this add this statement

mydoc.render(myContext);

If this does not solve your problem i will send you my code tomorrow.

Hope it solves your problem.

Regards

Padmaja

Former Member
0 Kudos

Gr8..I did add document earlier..it still the same..

public void doEdit(IPortalComponentRequest request, IPortalComponentResponse response) {
	
		 IPageContext myContext=PageContextFactory.createPageContext(request,response);
		 Document mydoc = myContext.createDocument("custom");
		Form myForm = myContext.createFormDocument("example");
		mydoc.addComponent(myForm);

	
		 InputField myinput=new InputField("input");
		 myinput.setDesign(InputFieldDesign.STANDARD);
	
		 Button mybutton=new Button("mybutton");
		 mybutton.setText("Personalize");
		 mybutton.setOnClick("Personalize");
	
		 myForm.addComponent(myinput);
		 myForm.addComponent(mybutton);
		mydoc.render(myContext);

	   }

Do we need to change anything on the SystemAdmin tab to allow custom dialog Box?

I wud wait for ur code..Thanks a lot.

If u trying to send par file..do send it to sapmails@gmail.com

Regards.

Former Member
0 Kudos

Hi padmaja,

Could you please send ur code? sapmails@gmail.com

Regards.

detlev_beutner
Active Contributor
0 Kudos

Hi Peter,

see your own thread for the solution - SharingReference was missing in portalapp.xml of the personalization component.

Best regards

Detlev

Former Member
0 Kudos

hi Padmaja,

I want to know how to personalise iview in EP?

I am new to this,can u plz explain how to work on this?

just i created iview and placed it in portal and now i want to personalise it.

i saw ur data but i am not clear.....

thank u

Former Member
0 Kudos

Hi,

You can follow this link for more details on personalization

Regards,

Padmaja