create messages by javascript?

UI Components for JSF
Post Reply
Alex
Posts: 256
Joined: 16 Dec 2010, 14:24
Location: Germany

15 Jul 2011, 10:03

Hi,

I think I know the answer already, but is it possible to create a message which is displayed by p:messages by javscript only, so without a request and the JSF lifecycle?

Greetings from Germany
Alex
PrimeFaces 3.2
Mojarra 2.0.2
Glassfish 3.0.1

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

15 Jul 2011, 10:42

There is no client side API, hard way is to generate dom with jQuery;

Code: Select all

<div class="ui-messages ui-widget" id="j_idt43:j_idt44">
   <div class="ui-messages-info ui-corner-all">
        <span class="ui-messages-info-icon"></span>
       <ul><li><span class="ui-messages-info-summary">Sample info message</span><span class="ui-messages-info-detail">PrimeFaces rocks!</span></li>
        </ul>
    </div>
</div>

Alex
Posts: 256
Joined: 16 Dec 2010, 14:24
Location: Germany

15 Jul 2011, 10:44

that was my expected answer.. already started to build this.

Thanks anyway.
PrimeFaces 3.2
Mojarra 2.0.2
Glassfish 3.0.1

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 13 guests