Hi, I would like to ask the community three questions. Prior to asking the quest

Hi, I would like to ask the community three questions. Prior to asking the questions, I would like to give some context and please do let me know if you have questions here:

I am trying to construct a reusable editable grid and trying to make the 'rows' attribute as much generic as possible. In this attempt I have made the rule reference as input, which means that anyone who uses this reusable grid would be able to use their own rule which renders grid row layout.

So simply speaking, the reusable grid rule looks like below:

editableGrid
-----------------
a!gridLayout(
/*Other attributes of gridLayout removed to make it look simple*/
rows: a!applyComponents(
ri!nameOfItemsRowEachRule(
ri!items,
_,
ri!itemsToken
),
if(or(isnull(ri!items), count(ri!items) < 1), {}, 1+enumerate(count(ri!items))),
ri!itemsToken
)
                    /* where ri!name...

OriginalPostID-169115

OriginalPostID-169115

  Discussion posts and replies are publicly visible

Parents
  • @Phil Hi, many thanks for your comments.
    #1 - Got it, please assume that I have used 'array' attribute only once and the other attribute is 'function', it's a typo in my post. May I know what do you say finally here? I might be wrong but as per my understanding, the reason why this in't possible is, as the rule that is going to be invoked is going to be decided dynamically at runtime, invoking the same by making use of arguments may not be possible.

    #2 - Correct and also it might be a defect as said by @Jennifer.

    #3 - True, there aren't any guide lines with regards to this kind of implementation which I too haven't seen in documentation ever before.

    @Jennifer Hi, many thanks for your comments.
    As per my knowledge, the context should be resolved atleast when the implementation makes use of ri!, rule!, local! etc. and a race condition shouldn't run thereby and also this kind of behaviour isn't desired. I hope this race condition is a defect as per your explanation and thanks for letting us know.
Reply
  • @Phil Hi, many thanks for your comments.
    #1 - Got it, please assume that I have used 'array' attribute only once and the other attribute is 'function', it's a typo in my post. May I know what do you say finally here? I might be wrong but as per my understanding, the reason why this in't possible is, as the rule that is going to be invoked is going to be decided dynamically at runtime, invoking the same by making use of arguments may not be possible.

    #2 - Correct and also it might be a defect as said by @Jennifer.

    #3 - True, there aren't any guide lines with regards to this kind of implementation which I too haven't seen in documentation ever before.

    @Jennifer Hi, many thanks for your comments.
    As per my knowledge, the context should be resolved atleast when the implementation makes use of ri!, rule!, local! etc. and a race condition shouldn't run thereby and also this kind of behaviour isn't desired. I hope this race condition is a defect as per your explanation and thanks for letting us know.
Children
No Data