Announcement Announcement Module
No announcement yet.
how to prevent on-render call on a first popup display Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • how to prevent on-render call on a first popup display

    Hi there,

    I've got the following scenario. User opens a window with a search filed and with a list of images below it. Since this is a "popup" i need to call <render fragments> in <on-entry> action in order to display it. However this action triggers service.getImagesByName method which doesn't make sense because the requestParameters.imageName parameter will not be present at this time. It make sense to call this method only from the findImage (service.getImagesByName) and deleteImage transitions.
    Is it possible to prevent this call while accessing this view state without requestParameters.imageName or do I need completely rebuild my view-state definition? Here it is:

    <view-state id="insertImage" popup="true">
    			<render fragments="insertImageForm" />
    			<evaluate expression="service.getImagesByName(requestParameters.imageName)" result="viewScope.images" result-type="dataModel"/>
    		<transition on="loadImage" to="composeEmail">
            	<set name="flowScope.image" value="images.selectedRow" />
    		<transition on="findImage">
    			<render fragments="insertImageForm" />
    		<transition on="deleteImage">
    			<set name="flowScope.image" value="images.selectedRow" />
    			<evaluate expression="service.deleteImage(" />
    			<render fragments="insertImageForm" />
    		<transition on="cancel" to="composeEmail" bind="false" validate="false" />
    Thanks in advance.