Question

I have a gadget that should be dynamic-height and it should have scroll-y.

I tried using this annotation in my java class:
@ModulePrefs(scrolling = true)

It returned below XML code:
ModulePrefs scrolling="true"

But my iframe still has "scrolling=no" property.

Am I doing something wrong?

I'd appreciate any help/hint. Thanks in advance.

Was it helpful?

Solution

Apparently it's a bug in shindig, because it generates a javascript file with a hard coded "scrolling=no" property. As this js is created using a servlet, I overwrote the servlet and put:
replaceAll("scrolling=\"no\"", "scrolling=\"auto\"");

OTHER TIPS

Whether the iFrame scrolls or not is actually up to the container. The container may choose to let your gadget grow as big as it wants in which case you may never see scroll bars. Or the container may let the DOM element surrounding the iFrame scroll. The container could even have the BODY element in the gadget iFrame scroll if it grows to big. No matter what the container decides to do, all your gadget should have to do is include the dynamic-height feature and call gadgets.window.adjustHeight() when it wants to adjust its height.

As for the scrolling attribute of ModulePrefs, I think that is bug, I don't think it is a valid attribute. The only place I see a reference to this in the current spec is in the Gadget XML Schema [1], which makes me think that it was removed at some point and just not removed from the XML Schema.

[1] http://opensocial-resources.googlecode.com/svn/spec/2.0.1/Core-Gadget.xml#GadgetXmlSchema

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top