how to implement jsPanel with jsf

Asked

Viewed 49 times

1

I am trying to render a xhtml page inside jsPanel, but only return the empty jsPanel. this is javascript:

function executeLoad(aUrl){

$.jsPanel({
    load:{
        url: aUrl
    },
    selector: "#content",
    title: "com url",    
    bootstrap: 'primary',


});

}

in xhtml make the call

<p:menuitem value="Lista Tipo Grupo" onclick="executeLoad('../sisger/TipoGrupo/sisgerTipoGru/List.xhtml')" />

get back to me: inserir a descrição da imagem aqui

In the object inspector of Chrome only appears the original codiogo without rendering.

1 answer

1

It depends on the version you’re using. In this case the option "load" was replaced by "contentAjax" which receives a json array of data, including the destination url. Follow a jsPanel v3.0.0 example

function executeLoad(aUrl){

$.jsPanel({
    contentAjax: {
    url:      aUrl, // exemplo de url: '../media/files/exampleAjax.html'
    autoload: true
},
    headerTitle: 'Título da Janela',
    contentSize: {width: 470, height: 340},
    position:    {my: "center-top", at: "center-top"},
    theme:       'lightblue',
});

}
  • It would be interesting for you to explain what has changed in the code and how it works now, for the answer to be more complete and useful for those who fall into this question after a survey :)

Browser other questions tagged

You are not signed in. Login or sign up in order to post.