Announcement Announcement Module
No announcement yet.
Primeface & Webflow How to define variable for rerender same page Page Title Module
Move Remove Collapse
Conversation Detail Module
  • 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.

    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:" 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"/>
        <evaluate expression="studentFeePaymentController.newDto()" result="flowScope.dto" />
        <evaluate expression="studentFeePaymentController.newDtosIfNull(studentFeePaymentDtos)" result="flowScope.studentFeePaymentDtos" />
        <evaluate expression="studentFeePaymentController.newIfNull(studentFeePayment)" result="flowScope.studentFeePayment" />     
    <decision-state id="startChoice">
        <if test="sub" then="studentFeePaymentSubEdit" else="studentFeePaymentEdit" />
    <!-- EDIT -->
    <view-state id="studentFeePaymentEdit" parent="#studentFeePaymentEditCommon">       
            <evaluate expression="flowsMenuHandler.updateMenu(flowRequestContext,,studentFeePaymentConverter.print(studentFeePayment))" />
        <transition on="addFee">
            <evaluate expression="studentFeePaymentController.addFee(studentFeePaymentDtos,dto)" result="flowScope.studentFeePaymentDtos" result-type="dataModel"/>                 
            <render fragments="form:dtos" />
        <transition on="send">
            <evaluate expression="'status_submitted_ok')" />
        <transition on="send">
            <evaluate expression="'status_submitted_ok')" />
        <transition on="save">
            <evaluate expression="" />
        <transition on="saveAndClose">
            <evaluate expression="studentFeePaymentController.saveAndClose(studentFeePayment)" />
        <transition on="close">
            <evaluate expression="primeFacesUtil.showAskForSaveDialog(persistenceContext,studentFeePayment)"/>
        <transition on="deleteAndClose" to="deleteAndClose">
            <evaluate expression="studentFeePaymentController.delete(studentFeePayment)" />
    I think I have not defined the scope variable properly. Please let me know pointer to fix the issue.
    Attached Files