This may help:
http://appfuse.org/display/APF/AppFuse+Core+Classes
Matt
On 8/24/07, Scott Ryan <[EMAIL PROTECTED]> wrote:
> I have been looking at the appfuse posts and trying to find a best practice
> for this but cannot locate the answer. I am using Appfuse 2.0M5 and wanting
> to override the
Why are you throwing a generic exception like java.sql.SQLException?
Spring's DataAccessException (and many others) are designed to be
wrappers around this exception to give you much better information.
As far as exception handling goes - that's up to you to catch. Most
web frameworks have a way t
You might try registering Spring's RequestContextListener in your
web.xml. That way, you can get the request from a ThreadLocal and get
the session from that.
http://www.springframework.org/docs/api/org/springframework/web/context/request/RequestContextListener.html
Matt
On 8/24/07, BruceLee <[E
Don't forget that you have the entire power of HQL at your disposal. If
you want to add a "where" clause, go ahead. It's arbitrary "on" clauses
that hibernate cannot yet do. (Although it does create sql joins with
complex on clauses--those inherent in the object relationships.)
A filter won'
Hi,
I am using appfuse-jsf 1.9.4
Do I have to throw DataAccessException and java.sql.SQLException in the
following HibernateSpringDAOImpl? How are database exceptions like DB
unavailable, bad query etc are
handled in appfuse-jsf?
public boolean FoundEmptyToDate( Long parentId ) th
Thank Absolut a lot for sharing the helpful code.
However when I try to getSession() in the Listener, sometimes it returns
null. After I refresh the page serveral times, it gets normal. Any ideas?
---my code---
public void onApplicationEvent(ApplicationEvent event) {
// check failed eve
I have been looking at the appfuse posts and trying to find a best
practice for this but cannot locate the answer. I am using Appfuse
2.0M5 and wanting to override the User object so I can add more
relationships. I am using the JPA version and not sure how to
approach this one. I have t
Thank you for the reply. The joins all work fine in the tests and I can
filter out the information after it is pulled from the database, but I
am just getting huge records and would rather have the filter take care
of the extra information in the sql statement as apposed to in memory.
Thanks
Hello Mike,
I forgot to run "mvn install". I found that all the tests are running fine.
Then I moved on to appfuse:gen in the web module.
Thanks
Rubel Ahammad
Mike Horwitz wrote:
>
> Haeve you run a mvn install on you core component? It seems it can find
> the
> class you generated in core.
>
Eric Fitzsimmons wrote:
Using AF 2 m5 Struts full source. I am trying to add a filter to a join
table that will filter for an active date range.
I've not worked with JPA or with filters, so I can't offer much specific
help, but I can point out that I don't think you're doing what you think
y
Using AF 2 m5 Struts full source. I am trying to add a filter to a join
table that will filter for an active date range.
I added for the class
@FilterDef(name="effectiveDateInfo)
I added for the attribute which has a @OneToOne mapping
@FilterJoinTable(name="effectiveDateInfo", condition="'2006-1
Figured it out... It had to do with me setting the inverse='true' on the
Document side of the relationship. By moving inverse='true' to the
'documents' Set under class 'Project', it allowed the Document instance to
manage the relationship. Great explanation of it here:
http://simoes.org/docs/hi
Could you post your modified annotations?
On 8/24/07, Julien C. <[EMAIL PROTECTED]> wrote:
>
> It's not better.
>
>
> Michael Horwitz a écrit :
>
> Try this from the Hibernate annotiations guide:
>
> To map a bidirectional one to many, with the one-to-many side as the
> owning side, you have to re
I agree - if you submit this as a ticket in JIRA - I'll commit it this morning.
http://issues.appfuse.org/browse/APF
Matt
On 8/24/07, benoit moraillon <[EMAIL PROTECTED]> wrote:
> I think log4j.xml should include this for appfuse 2 / struts 2 archetype :
>
>
>
>
>
> In order to av
It's not better.
Michael Horwitz a écrit :
Try this from the Hibernate annotiations guide:
To map a bidirectional one to many, with the one-to-many side as the
owning side, you have to remove the mappedBy element and set the many
to one @JoinColumn as insertable and updatable to false. This
The only thing that stands out is the following line:
locationDao.get(1L);
Does reducing this number, or changing it to -10L change the behavior?
Matt
On 8/23/07, p7k <[EMAIL PROTECTED]> wrote:
>
> Dear Matt and users,
>
> When you have time, if you have time, take a look at this code
> htt
select * from user_role.
Matt
On 8/24/07, ros <[EMAIL PROTECTED]> wrote:
>
> How I can see user roles?
>
>
> benoit wrote:
> >
> > I think you should check your user's role in order to know what role
> > is assigned to the anonymous user.
> >
> > -Message d'origine-
> > De : ros [mailto:[
Try this from the Hibernate annotiations guide:
To map a bidirectional one to many, with the one-to-many side as the owning
side, you have to remove the mappedBy element and set the many to one
@JoinColumn as insertable and updatable to false. This solution is obviously
not optimized and will prod
I think it's correct :
-
@Entity
public class Enquete implements java.io.Serializable {
...
@OneToMany(mappedBy="enquete",cascade=CascadeType.ALL)
public Set getModeles() {
return modeles;
}
...
}
@Entity
public class Modele implement
Have you set the appropriate cascade on the relationship between Enquete and
Modele?
Mike
On 8/24/07, Julien C. <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I don't figure out how to use the form:select tag with multiple select. I
> have try this :
>
> -
>
>
>
>
Thanks Michael.
I have to take a look to maven's doc.
Julien.
Michael Horwitz a écrit :
At the moment both of these plugins are set to fire unless you specify
-Dmaven.test.skip=true, which will have the unfortunate side effect of
making maven skip your test as well. You could move the plugin
Hi,
I don't figure out how to use the form:select tag with multiple select.
I have try this :
-
itemLabel="nom">
-
no errors but nothing is selected and nothing is saved -
I have registered a custom binder for Mo
Thanks for the suggestion. I did try this but it didn't work. But...then I
looked closer at the log...What is actually happening is that Hibernate is
trying to delete:
document_project - which is okay.
document - which is okay too...
then the project! - NOT okay.
Can anyone see, based upon my m
How I can see user roles?
benoit wrote:
>
> I think you should check your user's role in order to know what role
> is assigned to the anonymous user.
>
> -Message d'origine-
> De : ros [mailto:[EMAIL PROTECTED]
> Envoyé : vendredi 24 août 2007 13:32
> À : users@appfuse.dev.java.net
I think log4j.xml should include this for appfuse 2 / struts 2 archetype :
In order to avoid the famous OgnlUtil.setProperty warning when doing a
redirect-action with parameter.
See :https://issues.apache.org/struts/browse/WW-1714
-
I think you should check your user's role in order to know what role
is assigned to the anonymous user.
-Message d'origine-
De : ros [mailto:[EMAIL PROTECTED]
Envoyé : vendredi 24 août 2007 13:32
À : users@appfuse.dev.java.net
Objet : [appfuse-user] RE: menu-config.xml show/hide menu ite
Why menu item always hidden? In in menu-config.xml there is
Thanks.
benoit wrote:
>
> ROLE_ANONYMOUS is the anonymous role name by default in acegi (no
> authentication).
>
> -Message d'origine-
> De : ros [mailto:[EMAIL PROTECTED]
> Envoyé : vendredi 24 août 2007 13:08
> À : users
ROLE_ANONYMOUS is the anonymous role name by default in acegi (no
authentication).
-Message d'origine-
De : ros [mailto:[EMAIL PROTECTED]
Envoyé : vendredi 24 août 2007 13:08
À : users@appfuse.dev.java.net
Objet : [appfuse-user] menu-config.xml show/hide menu item with roles
Hi!
How i
Hi!
How in appfuse application to show menu item for anonymous user and admin,
but hide this menu item for user with other roles (e.g. role editor).
If in menu-confg.xml there is:
then item visible for all users.
If in menu-config there is:
then it's not visible at all.
Wha
At the moment both of these plugins are set to fire unless you specify -
Dmaven.test.skip=true, which will have the unfortunate side effect of making
maven skip your test as well. You could move the plugin definitions to their
own profile, which you can selectively enable based on a property.
Mike
You can run native SQL queries using Hibernate. See
http://www.hibernate.org/hib_docs/v3/reference/en/html/querysql.html for
further details.
Mike.
On 8/24/07, Sanath <[EMAIL PROTECTED]> wrote:
>
>
> I have a rather long and complex SQL query that has nested quires inside
> too.
> I have notices
Hi List,
I want to turn off this 2 plugins when I test some class to be more
productive.
Is there a parameter in maven command line to disabled this.
something like this :
mvn test -Dtest=ModeleDaoTest -Ddbunit.disabled=true -Dhbm2ddl.disabled=true
Thanks, Julien Chanséaume.
I have a rather long and complex SQL query that has nested quires inside too.
I have notices that appfuse uses getHibernateTemplate().find to give the HQL
statement. Is there anyway that I can run a "SQL" statement without using
HQL statements to avoid much more complexity
--
View this message in
You will need to explicitly tell it to cascade on a merge by setting the
cascade attribute on your join.
Mike.
On 8/24/07, p7k <[EMAIL PROTECTED]> wrote:
>
>
> no success in using merge(), no exceptions of any sort but nothing gets
> updated or removed.
>
> still looking for help.
>
> thank you!
34 matches
Mail list logo