cancel
Showing results for 
Search instead for 
Did you mean: 

Metatag Development

Former Member
0 Kudos
63

Hi Experts,

I have to make an application on NWDS that reads the keywords and description data from the iview profile and puts them in the head section of the html page in which the iview is contained.

Is there any tutorial available?

Any help would be very appreciated.

Thank you,

Regards,

Ashvin

Accepted Solutions (1)

Accepted Solutions (1)

former_member193577
Active Contributor
0 Kudos

Hi Ashvin,

If I understand you correctly, you would like to create a portal application, create from it an iView and put it in the portal.

Next when launching this iView, you would like to read some iView properties and react accordingly in the application , is that correct?

For this purpose , you can indeed develop a portal application with NWDS, then in the doContent of the portal application, read the profile by using this:


IPortalComponentContext componentContext = request.getComponentContext();

IPortalComponentProfile profile = componentContext.getProfile();          

String myprop = profile.getProperty(property_name);

replace property_name with the property you would like to read.

After that, for putting it in the head section , you can use the following:


HtmlDocument htmlDocument = null;

IPortalResponse portalResponse = (IPortalResponse) request.getValue( IPortalResponse.class.getName() );       

if ( portalResponse instanceof PortalHtmlResponse )

{

     PortalHtmlResponse portalHtmlResponse = (PortalHtmlResponse) portalResponse;

     htmlDocument = portalHtmlResponse.getHtmlDocument();

}

htmlDocument .getHead().getHtmlElements().add( new HtmlString( "This will be inserted into head section of html") );

Deploy this portalapp into EP and create an iView from it.

Best Regards,

Tal

Answers (2)

Answers (2)

Former Member
0 Kudos

Thanks for your help guys.

The link below can also help:

NetWeaver Developer Studio

Best Regards,

Ashvin

0 Kudos
Former Member
0 Kudos

Hi Rodrigo,

I need to develop this application on NWDS.

The link you sent in for portal.

Thanks,

Ashvin

0 Kudos

Yes. In NWDS, you need to create a New Portal Application -> Portal Component, and use the API related on the link I pasted before.

Former Member
0 Kudos

Rodrigo, you are sure its the right link? Its pointing him to the object references section of the deployment descriptor. However, I dont see the point on this requirement: Ashvin, if you want to read PCD properties take a look to the provided Java API. I guess Rodrigo wanted to point you to:

http://help.sap.com/saphelp_nw73/helpdata/de/49/f98e2d994a38d8e10000000a42189b/content.htm?frameset=...

And I got you right, after that you would like to put some of them in the header section of your AFP or FAT framework? What exactly you wanna to achieve?

cheers