0

looping list item render

asked 2017-06-09 06:50:10 +0800

bayuprams gravatar image bayuprams
1

i have case, i want to get value from dynamicResult. But when i deploy error cannot be cast to. Anyone can help me? if want to looping the render, how?

    @SuppressWarnings({"rawtypes" })
class InlineRendererPayrollReport implements ListitemRenderer { 

    public void render(final Listitem lstItem, Object data, int index)

            throws Exception {

        OffCycleResultAdd payrollReportResult = (OffCycleResultAdd) data;
        DynamicResult dynamicResult = (DynamicResult) data;

        Listcell cellStatus;

        try {
            cellStatus = new Listcell(payrollReportResult.getPernumb());
        } catch (Exception ex) {
            cellStatus = new Listcell();
        }
        cellStatus.setParent(lstItem);
        cellStatus.setStyle(styleright);

        try {
            cellStatus = new Listcell(payrollReportResult.getNama());
        } catch (Exception ex) {
            cellStatus = new Listcell();
        }
        cellStatus.setParent(lstItem);
        cellStatus.setStyle(styleleft);

        try {
            cellStatus = new Listcell(dynamicResult.getAreaText());
        } catch (Exception ex) {
            cellStatus = new Listcell();
        }
        cellStatus.setParent(lstItem);
        cellStatus.setStyle(styleleft);
        lstItem.setAttribute("data", data);
     }
  }
delete flag offensive retag edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2017-06-10 06:53:16 +0800

Darksu gravatar image Darksu
1991 1 4

Hello bayuprams,

That could work only if the second object was included in the first one.

Best,

Darksu

link publish delete flag offensive edit
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow
1 follower

RSS

Stats

Asked: 2017-06-09 06:50:10 +0800

Seen: 11 times

Last updated: Jun 10 '17

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More