Hi All,
I know that we can pass a parameter through context attribute of tag in
template, but how to achieve it in java code? like this:

public class Edit {
    @Property
    @Autowired
    private Employee employee;

    @InjectPage
    private View view;

    @Log
    Object onSuccess() {
        employee.persist();

        // Pass parameter employeeId to view Page

        return view;
    }
}

public class View {
    @Parameter
    private Long employeeId;


    @Property
    private Employee employee;


    void onActivate(Long employeeId) {
        if (employeeId != null)
            employee = Employee.findEmployee(employeeId);
    }
}

Thanks!
-- 
Best Regards
Rock Lee

Reply via email to