on 05-24-2005 10:45 AM
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
}
}
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.