Announcement Announcement Module
Collapse
No announcement yet.
Primeface & Webflow How to define variable for rerender same page Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Primeface & Webflow How to define variable for rerender same page

    I am developing a application for a school.This application purely design in spring-webflow and primefaces. I have a page where User can add multiple fee received from Student. For that I have design the below page.
    Attachment

    If you see in that page, Use can select fee, noOfInstallment and amount and then click AddFee button. After clicking that button we fired "addFee" action then below table re rendered. After that user can add more fee for the same Student.

    It works for me for one time, when I tried to click addFee on second time am getting below error. Error : "Method call: Method addFee(org.springframework.faces.model.OneSelectio nTrackingListDataModel,com.witness.myschool.dto.St udentFeePaymentDto) cannot be found on com.witness.myschool.web.domain.StudentFeePaymentC ontroller type"

    For above functionality I have defined following webflow .xml file.
    Code:
    http://www.springframework.org/schema/webflow/spring-webflow-2.0.xsd" parent="abstract/edit">
    
    <!-- note: this flow inherits from the abstract/edit flow -->
    
    <persistence-context />
    
    <!-- Flow input parameters -->
    <!-- studentFeePayment: the entity to edit. If null, then we create it here -->
    <input name="studentFeePayment" required="false" value="flowScope.studentFeePayment"/>
    <input name="studentFeePaymentDtos" required="false" value="flowScope.studentFeePaymentDtos"/>  
    <input name="dto" required="false" value="flowScope.dto"/>
    <on-start>  
        <evaluate expression="studentFeePaymentController.newDto()" result="flowScope.dto" />
        <evaluate expression="studentFeePaymentController.newDtosIfNull(studentFeePaymentDtos)" result="flowScope.studentFeePaymentDtos" />
        <evaluate expression="studentFeePaymentController.newIfNull(studentFeePayment)" result="flowScope.studentFeePayment" />     
    </on-start>
    
    <decision-state id="startChoice">
        <if test="sub" then="studentFeePaymentSubEdit" else="studentFeePaymentEdit" />
    </decision-state>
    
    <!-- EDIT -->
    <view-state id="studentFeePaymentEdit" parent="#studentFeePaymentEditCommon">       
        <on-render>         
            <evaluate expression="flowsMenuHandler.updateMenu(flowRequestContext,studentFeePayment.id,studentFeePaymentConverter.print(studentFeePayment))" />
        </on-render>
    
        <transition on="addFee">
            <evaluate expression="studentFeePaymentController.addFee(studentFeePaymentDtos,dto)" result="flowScope.studentFeePaymentDtos" result-type="dataModel"/>                 
            <render fragments="form:dtos" />
        </transition>
    
        <transition on="send">
            <evaluate expression="messageUtil.info('status_submitted_ok')" />
        </transition>
    
        <transition on="send">
            <evaluate expression="messageUtil.info('status_submitted_ok')" />
        </transition>
    
        <transition on="save">
            <evaluate expression="studentFeePaymentController.save(studentFeePayment)" />
        </transition>
    
        <transition on="saveAndClose">
            <evaluate expression="studentFeePaymentController.saveAndClose(studentFeePayment)" />
        </transition>
    
        <transition on="close">
            <evaluate expression="primeFacesUtil.showAskForSaveDialog(persistenceContext,studentFeePayment)"/>
        </transition>
    
        <transition on="deleteAndClose" to="deleteAndClose">
            <evaluate expression="studentFeePaymentController.delete(studentFeePayment)" />
        </transition>
    </view-state>
    I think I have not defined the scope variable properly. Please let me know pointer to fix the issue.
    Attached Files
Working...
X