ViewModel Column in Nested ViewModel class – self refers to result of Expression

CapableObjects Forums SupportForum ViewModel Column in Nested ViewModel class – self refers to result of Expression

This topic contains 1 reply, has 2 voices, and was last updated by  Admin 1 week, 5 days ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #5177 Score: 0

    SteveA
    Participant

    Greetings to all
    “ViewModel Column in Nested ViewModel class – self refers to result of Expression.” This is true for “Expression:” (in my case “ClientInvoice”).
    HOWEVER “Readonly Expression” and “Visible Expression” and “Disabled Expression” are using class for the root level of the ViewModel (in my case “ProjectOwner”). So I can invoke a method such as self.IssueInvoiceEffect i.e ClientInvoice.IssueInvoiceEffect but I cannot use the trigger self.trigger_IssueInvoice? for the disabled expression

    The viewmodel expression editor reports
    Context ProjectOwner
    5:”trigger_IssueInvoice?” is not a member of “ProjectOwner”

    The the viewmodel Editor reports
    “The column IssueInvoiceEffect has a ExpressionForReadOnly that does not evaluate to bool”

    Attachments:
    You must be logged in to view attached files.
    #5180 Score: 0

    Admin
    Keymaster

    All the ReadOnly, Visible StyleRef expressions have the viewmodel root object as self.
    To evaluate the expression for a nesting you should use the vCurrent_ variable for that nesting instead of self.
    In your case try vCurrent_SelectClientInvoice.trigger_IssueInvoice?

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.

Comments are closed.