Uploaded image for project: 'Seam International'
  1. Seam International
  2. SEAMINTL-55

Support summary and details text for messages

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 3.1.0.Beta1
    • Fix Version/s: 3.1.0.Beta3
    • Component/s: Messages
    • Labels:
      None

      Description

      Currently the messages api in International Module and MessageAdapter in Seam Faces Module doesnt support summary and details text for faces messages.

        Gliffy Diagrams

          Activity

          Hide
          ssachtleben Sebastian Sachtleben added a comment -

          We could extend message api:

          Message should get new method:

          String getDetail();

          BundleTemplateMessage should get two new methods:

          public BundleTemplateMessage detail(final BundleKey text)
          public BundleTemplateMessage detailParams(final Object... textParams);

          Seam Faces MessageAdapter need a change here:

          event.getFacesContext().addMessage(m.getTargets(), new FacesMessage(getSeverity(m.getLevel()), m.getText(), null));

          to

          event.getFacesContext().addMessage(m.getTargets(), new FacesMessage(getSeverity(m.getLevel()), m.getText(), m.getDetail()));

          I think its a nice solution. The current behavior doesn't change but we get the opportunity to add additional the detail message. I could take it and make a pull request for both projects.

          Show
          ssachtleben Sebastian Sachtleben added a comment - We could extend message api: Message should get new method: String getDetail(); BundleTemplateMessage should get two new methods: public BundleTemplateMessage detail(final BundleKey text) public BundleTemplateMessage detailParams(final Object... textParams); Seam Faces MessageAdapter need a change here: event.getFacesContext().addMessage(m.getTargets(), new FacesMessage(getSeverity(m.getLevel()), m.getText(), null)); to event.getFacesContext().addMessage(m.getTargets(), new FacesMessage(getSeverity(m.getLevel()), m.getText(), m.getDetail())); I think its a nice solution. The current behavior doesn't change but we get the opportunity to add additional the detail message. I could take it and make a pull request for both projects.
          Hide
          ssachtleben Sebastian Sachtleben added a comment -

          Added pull request for the detail text implementation.

          Show
          ssachtleben Sebastian Sachtleben added a comment - Added pull request for the detail text implementation.
          Hide
          paul.dijou Paul Dijou added a comment -

          Really nice. Would it be possible to add support for the "detail" value on the org.jboss.seam.international.status.Messages interface ? Right now, all the cool methods like info(...), warn(...), ... only support "summary" value.

          The workaround is to call "messages.info("Summary value").detail("Detail value

          {0}

          ").detailParams("Detail param value"); but it would be better to have it directly inside the Messages interface.

          Thanks in advance.

          Show
          paul.dijou Paul Dijou added a comment - Really nice. Would it be possible to add support for the "detail" value on the org.jboss.seam.international.status.Messages interface ? Right now, all the cool methods like info(...), warn(...), ... only support "summary" value. The workaround is to call "messages.info("Summary value").detail("Detail value {0} ").detailParams("Detail param value"); but it would be better to have it directly inside the Messages interface. Thanks in advance.

            People

            • Assignee:
              kenfinni Ken Finnigan
              Reporter:
              ssachtleben Sebastian Sachtleben
            • Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development