Hi Sven,
Thanks for your reply. I moved the code from beforePageLoad under a computed field within the panel that I'm trying to refresh. So the code now looks like this:
<xp:view xmlns:xp="http://www.ibm.com/xsp/core">
<xp:panel id="panel1">
<xp:text escape="true" id="computedField1">
<xp:this.value><![CDATA[#{javascript:
txt = "myJSONCategories = [{'category' : 'a'},{'category' : 'b'},{'category' : 'c'}]";
var myJSONcategories = eval(txt);
return myJSONcategories;}]]>
</xp:this.value>
</xp:text>
<xp:br></xp:br>
<xp:repeat id="repeat1" rows="30" var="category" value="#{javascript: return myJSONcategories;}">
<xp:link escape="true" text="#{category.category}" id="link1">
<xp:eventHandler
event="onclick"
submit="true"
refreshMode="partial"
refreshId="panel1">
<xp:this.action><![CDATA[#{javascript:viewScope.selectedPeriod = "";}]]></xp:this.action>
</xp:eventHandler>
</xp:link><xp:br></xp:br>
</xp:repeat>
</xp:panel>
</xp:view>
It didn't work this way either. Then I moved the computed field outside the panel but nothing changed. Still no luck...
Thanks,
Etyien