$('#trmnl').puiterminal({ commandHandler: // function });
<div id="trmnl" />
Name | Type | Default | Description |
---|---|---|---|
welcomeMessage | string | '' | Welcome message to be displayed on initial load. |
prompt | string | prime $ | Primary prompt text. |
handler | function | null | Function to handle commands. |
Name | Parameters | Description |
---|---|---|
clear | - | Clears the terminal content. |
$('#trmnl').puiterminal({ welcomeMessage:'Welcome to PrimeFaces Terminal, how are you today?', handler: function(request, response) { $.ajax({ type: "GET", url: 'rest/terminal/' + request, dataType: "text", context: this, success: function(data) { response.call(this, data); } }); } });
<div id="trmnl"></div>