[JBoss Seam] - EntityQuery and s:selectItems ???
by terryb
Please help, I can't seem to get "h:selectOneMenu using s:selectItems and s:convertEntity" working with EntityQuery. My search pages is based on seam-gen's MyEntityList example.
i am not sure if it is even possible?
I have oneToMany between User and UserSecurityRole. On the UserSecurityRole search page, I would have a pulldown list with all users. I would simply like to restrict UserSecurityRole results to the value selected in User pulldown.
| My JSF:
| <h:selectOneMenu value="#{userSecurityRoleList.userSecurityRole.user}" id="user">
| <s:selectItems value="#{userAll.resultList}" var="user" label="#{user.username}" noSelectionLabel="All users"/>
| <s:convertEntity />
| </h:selectOneMenu>
|
|
| Component.xml
| <framework:entity-query name="userAll"
| ejbql="select u from User u"
| order="username">
| </framework:entity-query>
|
|
| UserSecurityRoleList.java
| @Name("userSecurityRoleList")
| public class UserSecurityRoleList extends EntityQuery {
|
| private static final String[] RESTRICTIONS = {
| "lower(userSecurityRole.id) like concat('%',lower(#{userSecurityRoleList.userSecurityRole.id}),'%')",
| "lower(userSecurityRole.user.id) like concat('%',lower(#{userSecurityRoleList.user.id}),'%')",
| };
|
| private UserSecurityRole userSecurityRole = new UserSecurityRole();
|
| @Override
| public String getEjbql() {
| return "select userSecurityRole from UserSecurityRole userSecurityRole";
|
| }
|
| @Override
| public Integer getMaxResults() {
| return 25;
| }
|
| public UserSecurityRole getUserSecurityRole() {
| return userSecurityRole;
| }
|
| @Override
| public List<String> getRestrictions() {
| return Arrays.asList(RESTRICTIONS);
| }
| }
|
I don't get any errors, but my selection is ignored. I think I loose user pulldown value in UserSecurityRoleList. I could really use some help here.
Thanks!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4096472#4096472
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4096472
18Â years, 9Â months
[JBoss Seam] - seam security and Restful parameters
by vas_opel
Hi all,
I am developing a product site using seam. The access to all pages is restricted to authorised users only. I use seam security for this purpose with a login page where each request is driven there if the user hasn't logged in. The problem i face is that i want't to use restful urls in my site (for example: /secure/viewProduct?pId=200). When the user is logged in the links works normally, but when the user isn't logged in seam redirects the user to the login page and after the succesfull login redirects again to the viewProduct url but the GET parameters (pId) are lost.
I have configured the components.xml file as defined in the tutorial in order the restful url parameters to be maintained :
<event type="org.jboss.seam.notLoggedIn">
| <action expression="#{redirect.captureCurrentView}"/>
| </event>
|
| <event type="org.jboss.seam.postAuthenticate">
| <action expression="#{redirect.returnToCapturedView}"/>
| </event>
|
Any ideas how to solve this problem?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4096469#4096469
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4096469
18Â years, 9Â months
[Installation, Configuration & DEPLOYMENT] - Re: Creating a secure development environment
by MMirabito
Thanks for you continued feedback.
I agree with you all that if you are running on localhost there should not be problems. But I am beginning to think security teams operate under the concept of "conspiracy theory" and all development teams are and an due risk to the network.
We already have a second desktop but both are connected to the same network. One for email and office apps with no privileges and the second one is for development with full admin privileges.
We where told that separating the network is not possible at this time ? this is a long term plan. Of course I can?t argue this since I am not an infrastructure guy.
The dual-nic came up briefly but always in the context of doing RDP to VMware server session. The way I see it if this stands we would turn our workstations (dual core 3GB RAM and 500GB+ HDD) into dumb-terminals ? how smart is that?
I like the idea of working disconnected (which BTW I do when I am not in the office) but then it becomes a challenge to manage lots of developers that require enterprise services (ie DBMS, LDAP, Reporting server, source control etc)
We could duplicate them on the disconnected workstation but how practical is that beyond a DBMS? In addition if we need to do research on the internet we now would have to use as second PC and manually transfer files.
I am also curious to know what JBoss would recommend assuming you guys are not working for Red Hat already?
Thanks again for your thoughts
Max
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4096463#4096463
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4096463
18Â years, 9Â months