cancel
Showing results for 
Search instead for 
Did you mean: 

Property Renderer - What is wrong with my code

Former Member
0 Kudos

Hi fellow KMCers,

I am trying to get into developing my own renderers. So I thought that I would start with something simple like getting a developed property renderer mapped to a custom property. However with no complete examples (and only the "How to Impliment Flexible UI Components" Guide), it is proven a little more difficult that i expected.

With the code below, I just want to display the string...what is wrong with my code below?

Thanks in advance,

Vic

-


public class MyPropertyRenderer extends AbstractPropertyRenderer {

public Component renderProperty(

IProperty property,

IMetaName metaName,

IResource resource,

IProxy proxy,

IParameters parameters) throws WcmException {

TextView t = new TextView();

t.setText("Hello World");

return t;// renders a property

}

}

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Hi Vic,

your coding looks good, but s whats about the configuration? Have you created a new technical maping to your coding in the Property Metadata service? If yes, ensure that you have modelled a property which should be rendered by your implementation. Add the technical mapping alias to the moddeled property definition. Next step, assing the modeled property to a collection renderer or resource renderer. That's it

Regards,

Thilo

Former Member
0 Kudos

Hi Thilo,

Yes, I am aware of the configuration and have completed it best to my knowledge:

1) Created a new Property renderer. The Render Class format is used was <package>.<class> (eg. com.mycompany.project.km.ui.renderer.MyPropertyRenderer)

2) Created a new Property of type string.

3) Triggered the Property's advanced settings mode and in the "Property Render" field selected the propery render that was created in step 1).

4) In the collection renderer add the property from step 2) to the "Displayed Properties" field.

5) Go to the navigation iView and observe the change.

It is the step 5) which does not work for me. The extra property column is displayed in the Navigation iView however it is blank, i believe that it should display "Hello World".

Am i missing a step?

Cheers,

Vic

PS. some points awarded

Message was edited by: Victor Yeoh

Former Member
0 Kudos

Hi,

I am still having trouble with the renderers...

To deploy do I put it into a PAR file which I just upload a per usual? Is there any special deploy procedures?

What will be in the portalapp.xml?

Cheers,

Vic

0 Kudos

Hi Vic,

only putting it into a PAR file is not enough. Keep in mind that you have the RFServerWrapper implementation in the PAR as well. I would recommend to use the KMC Plugins to generate a valid KMC PAR file.

Regards,

Thilo

Former Member
0 Kudos

Hi Victor

If you can paste in your email id I can send you a par based on your code

Regards

Pran

Former Member
0 Kudos

Hey Pran,

We meet again

My email is victor.yeoh@axcel-metro.com.

Greatly appreciated.

Cheers,

Vic

Former Member
0 Kudos

Solved...

The major problem was that a Portal reset was required for the portal renderer to become effective.

This is for EP6 SP9. Apparently for SP12, this should not be an issue.

Thanks for all who contributed.

Cheers,

Vic

Former Member
0 Kudos

Hi I am trying to code something very similar... did you find out what is required in the portalapp.xml file?

I currently have a class (exactly the same as above) which extends the AbstractPropertyRenderer and RFServiceWrapper class and interface files.

When I deploy to the portal as a PAR file I get the same problem with an empty field....

does anyone know what I am missing?

Thanks,

Tom

Answers (0)