Just another site

WebRemote and Seam

Step 1: add webremote annotation for the specific method in local interface

public interface ProspectController extends StatefulController {

public String createNewProspect();


Step 2:  create the javascript function

function showProspectPopUp(modelPanel,id){
Seam.Remoting.getContext().setConversationId(id);   //this is important: make sure the remote call is in the same conversation

Step 3:  in jsf page, add the following:

<ui:define name=”js”>
<s:remote include=”prospectController”/>
<onepl:javascript src=”/js/main.js” cachebusting=”true”/>   //where the javascript function locates

<h:outputLink onclick=”showProspectPopUp(‘prospPanel’,#{});return false;”  value=””>test </h:outputLink>



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: