[JBoss Seam] - Seam newbie question
by nepveul
Hi!
I'm relatively new to Seam and the related technologies (JSF, hibernate, etc.)
I'm trying to build a very simple webpage. One of my entity is a User.
I have some sort of UserList.xhtml page that displays all the user info + a link for each row. I want this link to call an action listener, something like that:
| <h:column>
| <f:facet name="header">action</f:facet>
| <s:link view="/#{empty from ? 'User' : from}.xhtml"
| action="#{bean.action}"
| value="Select"
| id="user">
| <f:param name="userId"
| value="#{user.id}"/>
| </s:link>
| </h:column>
|
But I want my #{bean.action} to be parametrized.
So I create a param to this page:
| <param name="action_"/>
Then I change, the previous code to :
| <h:column>
| <f:facet name="header">action</f:facet>
| <s:link view="/#{empty from ? 'User' : from}.xhtml"
| action="#{action_}"
| value="Select"
| id="user">
| <f:param name="userId"
| value="#{user.id}"/>
| </s:link>
| </h:column>
|
But that doesn't work, right, because it will resolve #{action_} as some piece of text like "tournamentHome.addUser", but not as a method reference like #{tournament.addUser}.
I'm sure this is trivial...but can't seem to figure out out to parametrize correctly my action to put under my link.
Thanks for your help!
Laurent
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4124983#4124983
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4124983
18 years, 2 months
[Persistence, JBoss/CMP, Hibernate, Database] - Storing large objects in the DB?
by EricJava
My application allows users to attach images to many different objects in the DB. It also allows PDFs etc to be attached. These types of attachments are typically in the 100s of K, or maybe up to a couple of MB.
I know that there are two camps on this. One, put attachments on disk as plain files. Two, store them in the DB.
I personally like databases. I like everything I get with them, especially ACID. I like the idea of being able to back up my entire application state by backing up one thing, one thing that has excellent backup tools built in to it.
However... I'm worried some about performance. I know that within JDBC, I can fetch LOBs as OutputStreams, so it can stream data out of the DB in an efficient way. Looking at the EJB3 docs, there is a @Lob annotation which handles the thing as a byte[] basically. Of course these can be fetched lazily.
Does anyone have some views on the performance aspects of this? Should I go ahead and store everything in the DB, or is that going to kill this app if traffic goes up?
I'll be using the Postgres database, if it matters.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4124980#4124980
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4124980
18 years, 2 months
[Security & JAAS/JBoss] - Re: Logout from a WebService application
by ragavgomatam
Calling logout() on your LoginModule is only possible if you do a JAAS login with a handle to your CallbackHandler and LoginContext. In the case of web applications the container does this Jaas Login eventhough you have your LoginModule. The container has the instance of the Callback Handler & passes that as arguments to your initialize()method. So calling logout() method on your CustomLoginModule is ruled out when do a web based login...There is no way you can do it from your browser....
Next question is :- Are you certain that the Principal is not cleared from our session... Check it as follows after session time out:-
| Principal p = request.getPrincipal() If the Principal is null then it works else we have an issue......I tried it with jboss 5 Beta 3 & it works...You are redirected to the Login Page again & asked to authenticate
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4124977#4124977
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4124977
18 years, 2 months