Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package org.richfaces.component.behavior;
 
 import  com.google.common.collect.Lists;
 import  org.ajax4jsf.javascript.JSFunction;
 import  org.ajax4jsf.javascript.ScriptString;
 import  org.ajax4jsf.javascript.ScriptStringBase;
 import  org.richfaces.javascript.Message;
 
public class MessageUpdateScript extends ScriptStringBase implements ScriptString {
    private final List<Message> messages;
    private final String clientId;
    public MessageUpdateScript(String clientIdList<Message> messages) {
        this. = clientId;
        this. = Lists.newArrayList(messages);
    }
    public void appendScript(Appendable targetthrows IOException {
        JSFunction resetMessages = new JSFunction("RichFaces.csv.clearMessage");
        resetMessages.appendScript(target);
        target.append(';');
        for (Message message : ) {
            JSFunction sendMessage = new JSFunction("RichFaces.csv.sendMessage"message);
            sendMessage.appendScript(target);
            target.append(';');
        }
    }
New to GrepCode? Check out our FAQ X