Quantcast
Channel: patterns & practices: Prism
Viewing all articles
Browse latest Browse all 1878

New Post: How to activate an existing order details view in StockTraderRI ?

$
0
0
Hi Federico,

I wonder if you could help me out with this one.

FYI: For my demo, I have renamed OrderEntryDetails with JournalEntryDetails. It has the same functionality as in the StockTraderRI demo app.

This is what I've done. In the JournalEntryDetailsViewModel (or OrderEntryDetailsViewModel) I added the following code to TransactionInfo property:
    public TransactionInfo TransactionInfo
    {
        get { return this.transactionInfo; }
        set
        {
            this.transactionInfo = value;
            this.RaisePropertyChanged(() => this.TransactionType);
            this.RaisePropertyChanged(() => this.JournalEntryId);

            // refresh data

            JournalEntry journalEntry = journalEntriesService.GetJournalEntry(value.JournalEntryId);
            this.HeaderText = journalEntry.HeaderText;
            this.BodyText = journalEntry.BodyText;
      }
    }
The idea here is that when transaction info is set in the OrderDetailsViewModel I obtain the existing record from the XML file using the JournalEntryId from the TransactionInfo object.
I subsequently load two properties HeaderText and BodyText with the values from the XML file.

The retrieval of the JournalEntryDetails via the journalEntiresService class works fine. The problem is that values for HeaderText and BodyText still doesn't show on the JournalEntryDetails view. As a matter of fact I seem to be getting a stack overflow problem here.

Is there a binding problem here? Any help would be greatly appreciated.

Viewing all articles
Browse latest Browse all 1878

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>