Skip to content

Change the spec of p:message? #691

@xatapult

Description

@xatapult

AFAIK p:message was introduced as an easier and more flexible way to send messages to the console, as a replacement/enhancement of the standard message attribute.

Currently the spec says for p:message: the result of evaluating the select option is serialized and made available

Serialization of a string value means: putting quotes around it. So if I say:

<p:message select="Starting computation at {current-dateTime()}"/>

I get my "Starting computation ..." message quoted on the console. That's not what I want and I also think that's not what was intended.

So I think we should change/modify the spec a little to get the messages come out as just strings. Something like (this is just a proposal):

the result is all items in the select option turned into a string and concatenated
Items that can't be turned into a string result in an error
Or:
Items that can't be turned into a string are serialized implementation-defined

What I mean with "turned into a string" is the using the string() function on them. But probably there is a better way of expressing this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions