[JBoss Seam] - clickable dataTable problem
by asookazian
So I have a clickable dataTable that's based on a join of two tables. There is a submit button for each row of the dataTable. I can't use the @DataModelSelection annotation (commented below) b/c the List does not consist of only one Entity class, it's based on two.
How can I identify which row needs to be updated and get all the necessary data for the 2nd table to be persisted to DB? 1st table is read-only. sounds like @DataModelSelection is out of the question here (Java generics does not allow me to specify more than one type per Collection).
any help much appreciated, otherwise I will resort to Seam remoting/ajax call onclick of submit button per row...
code snippet from SFSB:
@DataModel
| private List myAuditList;
|
| @DataModelSelection
| //private TblSecurityAuditWorking tblSecurityAuditWorking;
|
| @Factory("myAuditList")
| public void find()
| {
|
| log.info("in find(): user.getUserId() = " + user.getUserId());
| log.info("in find(): user.getBillingId() = " + user.getBillingId());
|
| int employeeId;
|
| if (!networkId.equals("")) { //user entered a networkId from UI to run for another person, so get new guy's billingId
|
| List myList = em.createQuery("from User u where u.networkId = :networkId").setParameter("networkId", networkId).getResultList();
| User newUser = (User)myList.get(0);
|
| employeeId = newUser.getEmployeeId().intValue();
|
| myAuditList = em.createQuery("SELECT gem, tsaw "+
| "FROM TblSecurityAuditWorking tsaw, "+
| "GlobalEmployeeMaster gem "+
| "WHERE tsaw.id.siteId = gem.id.siteId "+
| "AND tsaw.id.employeeNumber = gem.id.employeeNumber "+
| "AND tsaw.reportToId = :employeeId")
| .setParameter("employeeId", employeeId)
| .getResultList();
| }
| }
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4099513#4099513
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4099513
18Â years, 8Â months
[JBoss Seam] - Seam with multiple web pages
by SchraderMJ11
I am seriously considering moving all of my web applications over to Seam from Struts. I know it is going to be possible to do this, but I wanted to get some thoughts from the experts out there. I have already installed JBoss AS 4.2.2 and installed NetBeans as a Java 5.0 EE Seam development tool. I also have a pretty good idea how to structure a .ear to be used as a singe site deployment. My question relates to having multiple sites with similar structures.
What I have as a scenario is a central site that I want to be the admin page of sorts. It provides admin capabilites to my organization to update content on various sites. It also should be the access point for the actual pages to dynamically show content.
So I have multiple pages that get their content from the central application, but I don't want them all deployed in the single .ear. Actually I think the best way to do this is to have one .ear that handles the actual business logic, and multiple wars to simply read data from the central site, and display it to JSPs. So what is the best way that Seam can handle this. I am assuming the outside sites cannot be Seam, or shouldn't be to eliminate code duplication. They won't contain the EJBs and such.
There are a couple of ways I have thought of to implement this. The central site could either produce xml files and return them to be parsed by the exernal sites which would give the other sites huge control over displaying the content, but would require more logic. Or I could return html formatted components which would reduce flexibility, but make the job easier on the client end.
Or am I missing something completely and I could do this a much different Seam oriented way. Please post your thoughts, all help is appreciated :)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4099512#4099512
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4099512
18Â years, 8Â months
hitting a specific node from the cluster
by Nestor Urquiza
Hello guys,
Just new to JBoss World so if this is not the right list please be
kind and advise where should I post the question.
Currently we have a cluster formed of three nodes, each of them in
separate machines. I want to be able to target a specific node from my
HTTP request. Is there any HTTP Header/GET/POST param that would allow
me to make one node respond to my request?
Thanks in advance,
-Nestor
18Â years, 8Â months