Use seams built in enum handling:
Here is an example of handling a True/False Enum
|
| Active
| *
|
|
|
|
|
Ran into the same problem, make sure in your Atom.java Entity the id field is
annotated with a @Generated, reveng won't put it there by default, it will only
put the @Id
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4033497#4033497
Reply to the post :
http:
I need some assistence getting my exceptions routed to my own /error.xhtml
page. I have a seam gen'd project from around 3 days old CVS.
No matter what I do, I can't get seam to redirect to the /error.xhtml after an
exception, please help.
I am getting the page that looks like:
An Error Occurr
I used seam gen to generate my entities for CRUD operations and it appears to
work great at first. However, there is an inheirent problem. On the List page
for my entity, I can create my entity one time and everything works great. The
next time I go to create another entity, the previous one
double post, apologizes:curses back button:
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4021807#4021807
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4021807
___
jboss-
Speak for yourself man, just copy one of the examples, or do seam gen, and that
is it, start coding.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4021806#4021806
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4021806
btw, running 4.0.5
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4020724#4020724
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4020724
___
jboss-user mailing list
jboss-user@l
Using latest code in CVS, when I generate a basic project with seam-gen and two
enties, upon hitting http://localhost:8080/myapp for the first time I receive:
"The page isn't redirecting properly"
I tried this by generating another project with existing entities, same issue.
My previous apps th
I use the EntityHome exclusively and I can't live without it. It
significantely reduced my code and made everything much more maintainable. I
do have a lot of customer logic in my Class that extends EntityHome, but this
is expected. The main point is, I get full CRUD from one class and one xh
I am having the same problem, I'm eager to see the solution to this.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4004884#4004884
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4004884
__
I am having problems getting exceptions.xml working. I want to get a simple
scenario working of redirecting all exceptions to /error.xhtml.
exceptions.xml
|
|
| Unexpected failure
|
|
|
|
And I am testing this by throwing a NPE in one of my EJBs(extends En
Not at all, I commented out the Injecting of the FacesMessages and I haven't
gotten the exception all day long, strange.
btw, how do I add messages to the facesMessages in a Class that extends
EntityHome, because there is no direct access to facesMessages in Home since it
is private and not vis
I apologize for the lack of information:
The exception is reliable to reproduce, but seems to happen at random. It
happened last when I executed 4 actions that interacted with drools
workingMemory in the backend. It worked the first 3 actions and failed the
4th. However, previously, it worke
I am consistently getting long exceptions with the below as the root cause. I
believe this is from a classloading conflict, do you guys have any hints
whatsovever as to how to trouble shoot this? I'm puzzled, and the exception is
not helpful.
| Caused by: java.lang.NullPointerException
Speak for yourself, just follow one of the example projects as a template.
Setting everything up has been the easiest experience for me.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3996350#3996350
Reply to the post :
http://www.jboss.com/index.html?module
I am following the example as closely as I possibly can. I can not track seam
to track down this problem.
Here is the directory structure of the drools example deployed and my
application deployed:
JBoss- seam
EAR contents:
| drwxr-xr-x 3 root root 4096 Dec 8 11:00 drools
| drwxr-xr-x
Also, from the SEAM docs on drools:
|
|
| @In WorkingMemory policyPricingWorkingMemory;
|
Is there some magic happening here? Because the components.xml defines
policyPricingMemory, yet the EJB is injecting policyPricingWorkingMemory.
View the original post :
http://www.jboss.co
I made some progress but now getting massive exceptions. I changed the
components.xml to look like the drools example one:
components.xml
| ...
|
| purchasingRules.drl
|
|
|
| #{ruleBase}
|
| ...
|
But now I'm getting a ClassCastException,
I am following the documentation for injecting the WorkingMemory into an EJB.
I know my problem is configuration, but there are no working examples specific
to the documentation, so I'm having trouble:
| SEVERE: Error Rendering View[/purchase.xhtml]
| org.jboss.seam.RequiredException: In a
Documentation does not denote the correct namespace for installing drools
components.xml, and I can find no examples that make use of how the
documentation says implement drools.
| Caused by: org.dom4j.DocumentException: Error on line 16 of document : The
prefix "drools" for element "drools
excellent, is there a jira link or whatever those ICEfaces guys use.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3991684#3991684
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3991684
__
I only get this exception when using ICEfaces inputText, however the exception
ends in a SEAM class, so I think it is most pertinent in the SEAM forum first.
I converted only one of my h:inputText to ice:inputText, when I try to load the
page I get the exception:
| java.lang.NullPointerExcep
Thanks Gavin, didn't know if it was a known issue or not.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3990781#3990781
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3990781
_
I installed Icefaces into my app and got it working, however in turn, it broke
the EL.
On my index.xhtml I have a login/logout, the logout will be shown on the
evaluation of #{loggedIn}
Which worked pre ICEfaces, when I installed ICEFaces the actual icefaces
component worked, but part of my EL
How should I programatically forward http to https for sensitive pages like
register and login. Should this be even done programmatically or with
something like mod_rewrite with apache in the front?
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3990557#399
Clarification: #{purchase.totalUnitCost()} to map to public Double
totalUnitCost()
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3990556#3990556
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3990556
__
I was originally trying to get an action method working:
I wanted purchase.totalUnitCost() to map to the method public Double
totalUnitCost()
I only had to convert it to ValueBinding because I couldn't get the action
method to work.
View the original post :
http://www.jboss.com/index.html?mod
Actually, the way I'm getting around this is to define a Transient field with
the name of the action method.
so:
| ...
| @Transient private Double totalUnitCost;
| ...
| @Transient
| public Double getTotalUnitCost() {
| double total = 0;
| for(Item item
Hmm, I think I know the problem. I am trying to access action methods with the
Enhanced EL in an Entity, which probaly is not going to work since I'm assuming
EL assumes everything is field level access.
So the reason I got one of the examples working before is because I did it
from an EJB3 a
I am also getting exceptions when I try to invoke action methods. I actually
reproduced the docs example of print.println('Hello World!')
However, when I go invoke an action method with parameters, it craps out. Any
idea of what could cause this, because the documentation says I can do the
fo
I've had this problem in CR1 and now CR2.
I follow the instructions in Chapter 18: Expression language enhancements but I
still get exceptions when trying whatever.doMethod() in the expression
language. Any pointers would be appreciated.
faces-config.xml
|
|
|
org.jboss.s
What is the most recommended way to SSL protect specific pages, like login and
register and any other sensitive ones.
Off the top of my mind, one could achieve this through URL rewriting with
Apache as the front end.
Are there any other ways to do this?
View the original post :
http://www.j
Self are blind..
I am still having problems I need to work out, but I got passed my initial
problem, I wasn't adding the following to my TicketHome.java
| @RequestParameter
| Long ticketId;
|
| @Override
| public Object getId()
| {
| if (ticket
I copied an example working project I created using seam gen where it generated:
|
|
|
|
Whereas mine looks like this, the value doesn't matter since it is for display.
|
|
|
|
tempTicket is only for the temporary Ticket instance for searching. In the
dataTable
I am creating a Help Ticketing system and I am following the SEAM documenation
and making use of the EntityHome for CRUDing my Ticket Entity. The initial
creation and updating works great, however when I go to view tickets, then
click on a ticket which gets redirected back to my original ticket
I was under the impression that using the "JBoss 4.0.5.GA with the EJB3
profile" will still NOT work with SEAM. In fact, the JBoss download area says
that to use SEAM you still must install JBoss using the -installer.jar.
I couldn't find the newest installer right off hand, but there defini
I have the java.lang.RuntimeException: org.hibernate.TransactionException:
Could not register synchronization from time to time and I've fixed it by
redeploying the app, but I am tired of doing that and I want to find a real
solution.
It is happening currently when I click view jobs to list ou
I see now what you are saying with the example. However, that still begs the
question, what is the correct way to implement pagination when one has Lazily
initialized collections where the EXTENDED PersistenceContext must be used, but
you are saying that there is a problem using that with @Scop
So you are saying that one way to fix it is to do a refresh on all jobs in the
job list?
| public String view() {
| Map parameters = new HashMap();
| StringBuffer queryString = new StringBuffer();
|
| queryString.append("from Job");
| Query query = em.createQuery(que
Thank you for the response, I am currently not passing the entity reference to
the details screen like you advised not too. I pass the entity id as a
parameter, then in my details screen I em.load the entity.
What is the most accepted way to do pagination? If I don't use the SESSION
should I
I need the Statefullness because I intent on adding pagination, and I need the
extended persistence context because the job contains Lazy initialized
collections.
Am I just overlooking something very simple? All I want is for the data for
this specific viewJobs SFSB to be refreshed everytime t
I posted in the EJB 3.0 forum without much success, so I am hoping this forum
can help me, as the users are more active.
I am having a horrible time with stale data. In my seam app, I create jobs
then list the jobs, and I can click on a job to edit it. However, when I edit
a job, the changes
I even disabled second level cache to no avail? I am still getting stale data.
Mysql command line is still reporting something different than what I am
seeing in my view.
|
|
| org.hibernate.ejb.HibernatePersistence
| java:/testDatasource
|
|
|
|
|
I also tried doing this:
| query.setHint("org.hibernate.cacheable", new Boolean(false));
| query.setHint("org.hibernate.cacheMode", CacheMode.IGNORE);
|
But I am still getting stale data, the only way to get the new data is to
redeploy the webapp.
Please help.
View the original post :
I am wondering how I disable cache on a per Query basis to ensure the latest
data?
In my code I am select a list of jobs to be displayed in the view. The status
of the jobs gets updated frequently, however the changes are not being shown in
the view. In the output of jboss, I do get the sql b
Thanks Gavin, I'll go grab the cvs copy.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3974978#3974978
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3974978
___
jboss-user mai
I am having a strange problem I am not sure how to fix, possibly a customer
converter?
I have an inputTextArea which I allow the user to input any text, later to be
parsed, the text can contain any characters necessarily:
|
|
|
| Job Parameters:
|
|
|
I hope this is an acceptable place to post this question versus another forum.
My Goal: Generate hibernate mapping xml files from my Annotated Entity beans
so I can use them in a non web application.
Here is what I've tried. I think I just need to be steered on the right track.
|
Just to let you know, you are not alone. I am not sure if there is some
special attribute to the pages.xml xml, however, I ran into the exact same
problem. Lessoned learned, don't use pages.xml with a Stateful bean that uses
pagination, it won't work. I had to change the way I was doing thin
I just found this:
#{facesContext.externalContext.requestContextPath}
Is there any other way?
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3968970#3968970
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3968970
___
I am using facelets, seam, ect..
In my previous projects, I always avoided hard coded cotext paths with jstl:
How can I duplicate this in jsf/facelets?
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3968969#3968969
Reply to the post :
http://www.jboss.co
Hibernate is going to automatically create the tables based on which POJOs are
declared as @Entity beans and the subsequent annotations to the getter methods
in that Entity bean.Hibernate will do this as long as your enforce a
create-drop policy, or update I believe.
Entity beans must have
Its times like these I want to crythen laugh really hard, as always Gavin
was right, it was in my code.
The entire problem has to do in this line:
| Query query = em.createQuery("from Group where group.id = :id");
|
I left out the group alias, so hibernate has no idea what group.id
I want to configure log4j.xml to NOT truncate my stack traces, and I've
searched google for about an hour on how to do it to no avail, someone please
HELP!
Ex.
| Caused by: javax.transaction.RollbackException: Already marked for rollback
TransactionImpl:XidImpl[FormatId=257, GlobalId=dhcp59
For reference:
persistence.xml
|
|
| org.hibernate.ejb.HibernatePersistence
| java:/DefaultDS
|
|
|
|
|
|
|
|
|
|
components.xml
|
|
I don't touch transactions in my code anywhere. Here is a strange thing. I
take the type=EXTENDED off of my persistence context, and I get a
NullPointerException on:
| Query query = em.createQuery("from Group where group.id = :id");
|
Which tells me that the EntityManager is somehow no
What is the EJB3 bug and is there a work around? I do not use an IDE, so I
won't be able to debug it at the moment.
The server.log was not very helpful, though it gave a little more information,
nothing additional on the exception though:
| 2006-08-30 08:43:31,146 DEBUG [org.jboss.seam.uti
Also, this occurs on a fresh start of JBoss and thereafter, it is not random.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3968215#3968215
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3968215
_
I have inexplicably ran into this exception:
java.lang.RuntimeException: org.hibernate.TransactionException: Could not
register synchronization
| 16:20:46,188 ERROR [[Faces Servlet]] Servlet.service() for servlet Faces
Servlet threw exception
| javax.faces.FacesException: Error calling ac
The seam docs are not completely clear on where an Entity lives when it exists
in several scopes.
The following example:
| @Entity
| @Name("dog")
| @Scope(EVENT)
| @Role(name="currentDog", scope=SESSION)
| @Table(name="dogs")
| public class Dog implements Serializable {
|
|
ajanoni, follow the directions in the following link exactly.
http://labs.jboss.com/portal/jbossseam/gettingstarted
Most likely you had the same problems I had at first also, I downloaded the
regular installer that is linked from the main jboss.org downloads site. You
actually can't use SEAM w
I fixed it, I changed the Scope on my Group Entity bean to EVENT and I passed
the groupId to the showGroup.jsp so the backing bean to that jsp could locate
the group.
Thanks for all the help guys.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3967913#3967913
And I just removed the @Out annotation to the Group object, but I'm still
getting the Detached Exception when trying to persist a group twice.
Let me explain what I'm seeing. I click on registerGroup.jsp brings me to a
page, I input a name and click register, then I get redirected to a page whic
For the seam examples set your jboss.home to the directory of where you
installed jboss too, for me it is:
jboss.home = /usr/local/jboss
Tomcat is located at:
${JBOSS_HOME}/server/default/deploy/jbossweb-tomcat55.sar
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewt
I will post my code to satisfy curiosity although there is not much to look at.
Using Conversation scope seems very strange to me in this instance. I guess
SEAM caters to a whole new realm of patterns that don't exist in the other MVC
world.
Registering a Group SHOULD be stateless, at least
Thank you for the replies, I don't really want to use the other group as a
template let me clarify my goals here again:
All I want is a simple page that allows a person to register a group, after
registering the group, the EJB3 redirects to page that displays that group with
links to edit the g
Can someone explain to me the details of scoping with entity beans. The
majority if not all of the examples I've seen show entitiy beans using the
session scope. Like in the seam documentation:
| @Name("user")
| @Entity
| @Scope(SESSION)
| public class User {
| ...
| }
|
I see what I'm doing wrong, but that begs another question, how do I accomplish
what I want to accomplish.
Shouldn't Registering a Group be stateless?
I want for the user to register a group, and be redirected to a page which
displays that group, and allows the user to modify that group ect.,
I have a form which a user can input a group name and other group information.
The EJB3 backing the form persists/merges the Injected Group object given there
are no errors.
My Problem:
First I could not get em.persist(group) to persist more than one Group object
after a form submit becau
Thank you for the response, so I should be able to use pull-style MVC like in
the Blog example. However, in that example, the BlogService is Stateless,
hopefully employing it as Stateful will be with minimal pain. However, in the
BlogService, there is no @Factory used, just the @Unwrap.
Wh
I need advice on best practices. Here is what I want to accomplish. I am
trying to implement a page that shows all registered users, that also has
pagination. Well, when the user clicks on the showUsers.jsf link, the List of
users should be initially populated.
Here is what I'm doing now an
I would like to log to syslog, which should be easy, I just uncomment the
following section.
|
|
|
|
|
|
|
|
|
|
And my syslog.conf looks like:
| local7.*/var/log/jboss.log
|
It works, but JBoss is not logging
I have a page to show the groups in my system. There are a series of links to
allow the user to modify the group. I am having trouble implementing the first
of those links where the user clicks to edit the group itself.
|
|
|
|
| @Name("editGroup")
| @Stateless
| publi
I understand that, however, a stateless EJB can not have a an extended
persistence context from what I've found.
I'm wondering if there is a way to tell the query to eagerly fetch all of the
associations for this special case.
View the original post :
http://www.jboss.com/index.html?module=bb&
I am using seam, however, this is more of a hibernate question. I would like
to retain the laziness of my hibernate managed beans, however, when I am using
a stateless session bean, I would like to turn on eager fetching for that
instance, otherwise I'll get the Lazy Exception. I did a quick
That was it, thanks so much.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3963816#3963816
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3963816
___
jboss-user mailing list
jb
Thank you for the response,
are you sure there is nothing else I need to do to get this working. I changed
my pages.xml to:
|
|
|
|
And when I hit /showGroups.seam, this is all I get in my console:
| 16:33:30,791 INFO [Pages] reading pages.xml
| 16:33:31,458 INFO [Myf
I am trying to emulate the "push"-style section 1.10.3 in Chapter 1. Seam
Tutorial.
When I load the page I want data to get pushed to initially, nothing happens in
console and the data is not loaded, despite the page loading as normal. So I
am assuming the EJB is never actually getting called.
I have done a lot of web development in JSPs/Servlets and in Spring. I must
say that SEAM is the best framework (if one chooses to call it that) I've ever
worked with.
I thought Spring was a revalation and it did reduce a significant amount of my
code, but SEAM reduces that code even more.
Thank you petemuir, all I needed to do was output the messages, then I saw the
validation error, because I had two fields as required, I took the required off
and everything worked.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3963276#3963276
Reply to the p
Below is the showUsers.jsp.
What I want to use is allow the user to click on the R or the S and for that
to bind to the userFinder.findFirstPage which will look for the start variable
which is set to R or S and find all users that start with and R or S and return
the list.
As I said before, w
I have a page which allows me to search for registered users to a site.
The part of the page I have a problem with is as follows, page: showUsers.jsp
which makes calls to an EJB3 called userFinder
|
|
|
|
Here is the problem. When I initially hit the showUsers.jsp page and cli
Thanks a ton.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3961860#3961860
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3961860
___
jboss-user mailing list
jboss-user@lists.
I successfully got the seam registration example running. I took that example,
changed a few classes so I could begin getting familiar with seam, but I can
not get past this one exception:
| javax.faces.FacesException: Error calling action method of component with
id _id0:_id7
| a
84 matches
Mail list logo