[JBoss Seam] - DataTable Sorting Example
by griffitm
Hello All,
I have a seam-gen app that gives me a pretty good head start for the simple crud operations needed to maintain a database. I like the pagination of data that is baked in to the JSF pages as the data sources for the components are backed by the EntityQuery objects. However, I have a few instances where I need to build a custom query or do some Ajax look ahead type of querying, and I'd like my datatables in those lists to look and feel like the datatables that are bound to the EntityQuerys. The nice thing about the EntityQuery is that you get the pagination and ability to resort the data simply. Can I use this in my Stateful session bean instead of using EntityManager.createQuery()?
Does anyone know of an example where the data for the JSF page is coming from a session bean page controller and has the ability to sort/paginate data easily?
Thanks in advance!
Cheers!
mg
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4096713#4096713
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4096713
18Â years, 9Â months
[Persistence, JBoss/CMP, Hibernate, Database] - NPE when creating query
by cfthomas
Hi!
I'm using JBoss-4-1.2.1.GA with SEAM 2.0.0.CR2.
I get the following exception when creating a query
| Caused by: java.lang.NullPointerException
| at org.hibernate.hql.ast.tree.FromClause.findIntendedAliasedFromElementBasedOnCrazyJPARequirements(FromClause.java:120)
| at org.hibernate.hql.ast.tree.FromClause.containsClassAlias(FromClause.java:247)
| at org.hibernate.hql.ast.tree.FromClause.isFromElementAlias(FromClause.java:135)
| at org.hibernate.hql.ast.HqlSqlWalker.isNonQualifiedPropertyRef(HqlSqlWalker.java:467)
| at org.hibernate.hql.antlr.HqlSqlBaseWalker.addrExpr(HqlSqlBaseWalker.java:4382)
| at org.hibernate.hql.antlr.HqlSqlBaseWalker.expr(HqlSqlBaseWalker.java:1212)
|
for this query:
| select x from com.xaidat.nippon.Article x where (( UPPER(x.code) LIKE UPPER(?1) OR UPPER(x.name) LIKE UPPER(?2) OR UPPER(x.manufacturer.name) LIKE UPPER(?3) OR UPPER(x.productgroup.name) LIKE UPPER(?4) ) AND ( UPPER(x.code) LIKE UPPER(?5) OR UPPER(x.name) LIKE UPPER(?6) OR UPPER(x.manufacturer.name) LIKE UPPER(?7) OR UPPER(x.productgroup.name) LIKE UPPER(?8) )) order by price ASC
|
How can I fight this problem?
Thanks,
Thomas
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4096709#4096709
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4096709
18Â years, 9Â months
[Installation, Configuration & DEPLOYMENT] - Deployment using JSR88
by prashanthvvbabu
Hi,
I have been working on JSR88 API for Deploy/Undeploy/Stop/Start of an EJB on JBossASv4.0.2. I was able to deploy/undeploy an EJB, but I was not able to start/stop an app. Later I found out that start/stop were not implemented in that version.
So, I moved to 4.0.5.GA and later to 4.2.1.GA. But, there were some changes in the URI and others. Now, am not even able to connect to the JBossAS. Am I doing something basically wrong..
| public class Main {
| public static void main(String[] args) {
| try {
| javax.enterprise.deploy.spi.factories.DeploymentFactory df = new org.jboss.deployment.spi.factories.DeploymentFactoryImpl();
| javax.enterprise.deploy.spi.DeploymentManager dm;
| dm = df.getDeploymentManager("http://org.jboss.deployment/jsr88", null, null);
| javax.enterprise.deploy.spi.Target[] targets = dm.getTargets();
| javax.enterprise.deploy.spi.TargetModuleID[] modules;
| modules = dm.getAvailableModules(javax.enterprise.deploy.shared.ModuleType.EJB, targets);
|
| System.out.println(targets.length + " " + targets[0]);
| System.out.println(modules);
|
| } catch (javax.enterprise.deploy.spi.exceptions.DeploymentManagerCreationException ex) {
| ex.printStackTrace();
| } catch (javax.enterprise.deploy.spi.exceptions.TargetException ex) {
| ex.printStackTrace();
| }
| }
| }
|
The error I get is :
anonymous wrote :
| Caused by: javax.naming.CommunicationException: Could not obtain connection to any of these urls: localhost:1099 and discovery failed with error: javax.naming.CommunicationException: Receive timed out [Root exception is java.net.SocketTimeoutException: Receive timed out]
| [Root exception is javax.naming.CommunicationException: Failed to connect to server localhost:1099
| [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server localhost:1099 [Root exception is java.net.ConnectException: Connection refused: connect
| ]
| ]
| ]
|
I tried with a different URI ("jnp://localhost:1099") also. But, it does not fetch me any modules. Iam unable to understand, what Iam doing wrong.
Please let me know. Am badly stuck. Any pointers to any documentation/examples will also be helpful.
TIA...
Thanks and Regards,
Prashanth Babu.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4096708#4096708
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4096708
18Â years, 9Â months
[Installation, Configuration & DEPLOYMENT] - away from console setup for jmx-console?
by ztaps
Can JBoss be rigged to work from your workstation instead of going to a cold computer room (down the hall in my case) and using the console?
I can't find stuff using Google that shows how to configure your RedHat/JBoss server so I can run jmx-console from my desk's workstation webrowser instead of at the console where the server is located.
Can anyone help me? I've tried lots of stuff...:
1) changing hosts.allow in /etc/ directory.
2) ./run.sh -b xxx.xx.xx.xx (x = my workstation IP address)
3) Changed the /etc/hosts and /etc/sysconfig/network files
4) I went to the console and changed some displayed IP settings to match
my workstation IP address on the jmx-console html screen but there were too many choices so I quit doing that.
5) Used the jems-installer program (hoping it would have some setting to allow me to view jmx-console from my desk) but that GUI installer did not go in that direction.
6) Lots of Googling for terms like "remote access of jmx-console" that went on and on...but no basic instructions for something that seems so simple and much needed. Lots of dead-ends.
Weblogic (from what I've been told) allows for people like me to work from my desk instead of at the console. Does JBoss allow for working at your desk?
P.S. I'm new at JBoss/RedHat. I come from a home version orientation where I use UBuntu.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4096706#4096706
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4096706
18Â years, 9Â months