0

I successfully display a dialog on detail page thanks to guidance from how do I customize dialog to the detail page of an answer set?. But yet I am unable to customise the dialog shown on the detail page, "Here what i found"

enter image description here

Would love to know where could i find out the concept/dialog that is relate to the default dialog on detail page, based on the debug console? or there is others ways?

[Extra infomation] I display detail page with layout match,

}else-if (size(this.audioItem)==1){
                layout-match (this.audioItem){
                    mode (Details)
                }

            }

It success. But when i customise the result view's message,

message{
    if (size(this.audioItem)==1){
        template ("Can?")
    }

The message come out 'Here what i found'.

talatan
  • 41
  • 1
  • 7

1 Answers1

1

The default dialog part might be a bit confusing, there is no need to do dialog model in your case. To replace the default "here is what I found", just use the message child-key in any view model.

For example, the following would display "In result view" instead of "here is what I found"

result-view {
  match: TextName (this) 
  message ("In result view")
  render {
    if (size(this)>1) {

To check the complete example, download capsule from GitHub.

  • Question: does "message" in view trump a dialog model if it exists? If you have both, which is provided to user? – Fred Zimmerman Apr 16 '20 at 18:59
  • @FredZimmerman I cannot say I am 100% sure, but I believe those are not in contradiction of each other. I would say in the above example, no matter what dialog model you defined for TextName, The message will be "In result view" if `message` child-key is provided. Or the message would be "Here is what I found" if no `message` child-key is provided. Different dialog model would only for the different moment. For example, the value dialog, only triggered by using `#{value(this)}`. Of course, you are welcome to try some samples and confirm. – BixbyDevSupport-Tokonyan Apr 16 '20 at 19:09
  • Strange, the dialog on my detail page doesn't change with the added template, what change is the dialog on the list page. Is that i match to a wrong concept? – talatan Apr 17 '20 at 01:15
  • 1
    You may first try `allow-dialogs-on-detail-pages (true)`, read more on https://bixbydevelopers.com/dev/docs/reference/type/capsule.runtime-version.overrides.allow-dialogs-on-detail-pages – BixbyDevSupport-Tokonyan Apr 17 '20 at 17:10
  • Sorry, i think you misunderstood my intention, i tried `allow-dialogs-on-detail-pages (true)` and the detail pages dialog show up with "Here is what i found". And i wish to customize it. – talatan Apr 18 '20 at 01:50
  • The message is customizable by using the result-view -> message child-key. I would suspect a logic issue in if-else statement. You can either post the complete result-view model file so I can update answer, or you can send us the capsule by submitting a support ticket using the "contact support" feature in IDE while capsule is open and synced. – BixbyDevSupport-Tokonyan Apr 20 '20 at 16:36