I am using primefaces resizable in my application. i know if we set containment=true the containment would be the parent of the component. but i want my component to be contained with in the grandparent below is the code :
<p:dataTable id="tab" value="#{listOfDays}">
<p:column>
<h:outputText value="#{day}"/> //from MON to SUN
</p:column>
<p:column>
<p:outputPanel id="pnl">
<ui:repeat id="loop" value="somelist">
<p:commandLink id="link"/>
<p:resizable for="link" listener="#{calllistener}" containment="true"/>
</ui:repeat>
</p:outputPanel>
</p:column>
</p:dataTable>
i want commandlink to be restricted to outputPanel when resized. as i set containment to true it is restricted to ui:repeat as it is the closet parent of the commandlink. so, is there any way that i can restrict the commandlink to the grandparent i.e., outputPanel in this case when commandlink is resized??
EDIT I am able to set the components parent in the backing bean like this
public void handleResize(ResizeEvent event){
if(first time) {
resizable =(Resizable)(event.getComponenet());
resizable.setParent(event.getParent().getParent());
}
sysout(resizable.getClientId());
}
i can print the client id of the parent on resize but it is not being contained within the grandparent. any help is greatly appreciated.
edit lemme make it clear what i am trying to achieve. i am trying to create a time scheduler (not the scheduler component in prime faces)
in the code, the outputpanel has an image which represents time from 00:00 to 23:59 the outputpanel can have any number of commandLinks thus ui:repeat. commandlink represent time interval say for instance from 12:00 to 20:00 and we can also change the time interval thus resizable. i dont want the timeinterval(commandlink) to go out of outputPanel.
thanks in advance :)