voyent
Messages posted by: wcaicedo  XML
Profile for wcaicedo -> Messages posted by wcaicedo [12]
Author Message
You can construct the person object you want to remove (I get it from db using jpa) and do something like (sintax not guaranteed! :) ) :
Code:
 yourArraylist.remove(Person);
 

Or using only the id:
Code:
 Iterator<Person> it  = youArrayList.iterator();
 while (it.hasNext()) {
    Person p = it.next();
    if (p.getId ==  id) {
      it.remove();
      break;
    }
 }
 


Of course you have to deal with the persistence layer if your object has already have been persisted.

Regards,

William
Hi all, i've been experiencing an issue with panelPopup: Whenever i set it to be draggable, it gives me a NPE. I would like to ask if anyone have experienced something similar and if anyone got a possible fix/workaround.

I'm using ICEfaces 1.8.1


Regards,

William.
Check your import...sometimes you add the wrong one. i.e. java.awt.event.ActionEvent instead of javax.faces.event.ActionEvent


Hope it helps

William.
Hi friends, i'm experiencing weird and random popup behavior. I have this popup with an inputFile/Progress bar control into it. Also i have a form and a submit button. The idea is that users upload a file and then submit the form.

However, when i click the upload button, the popup just goes wild and moves to another position on the screen, and the rest of form components go blank...so i have to re-enter values and then submit. It is a modal, autocentered popup, i'm using icefaces 1.8 and it behaved the same using 1.72

What could it be??

Thanks in advance.

William

P.S: By the way i'm getting a Nullpointer Exception when i try to make my popup draggable...any ideas? thanks
Hi, you have to download spring security jars and add them to your project. They (spring security 2.0.3) also come with sourcecode of the tutorial available at icefaces.org. It seems things have changed from 2.0.3 (i think they further modularize it) to 2.0.4. If you use 2.0.3, you should be alright with the tutorial jars, but if you want to upgrade to 2.0.4, you will need in your classpath something like this:

spring.jar
spring-dao-2.0.8.jar (this is needed if you code your custom impl of userDetailsService)
spring-security-core-2.0.4.jar
spring-security-core-tiger-2.0.4.jar
spring-security-tag-libs-2.0.4.jar (not really sure if it's needed for basic stuff)

The icefaces.org tutorial is great, it helped me a lot.

Regards,

William
Well, as i see it it's more like a trick to force image reloading. Everytime you press a button, documentId is recalculated, firing an icefaces incremental update.

If you remove the EL expression, the servlet is only invoked once (when you load the page).

Maybe i'm completely lost, but i figured it out that way....just my 2 cents.

Regards
William.
hi Wolf, i'm using Toplink

By the way, 'cause i'm coming from jsf/icefaces to spring security, i'm using the classes of the package javax.persistence, not the classes of org.springframework.orm.jpa

Which package should i use to implement my JPA/UserDetailsService ?

Thanks man, this community is great, i've posted a similar thing on spring forums and not a single answer :(

Regards,

William.
Hi all, finally i decided to give it a try with spring security, i found the icefaces tutorial quite good, and i got my own example working properly. Also, i implemented my own UserDetailsService on top of JPA and that was very easy to accomplish...nice framework :)

However i've gotten several times a weird class cast exception: It says it's unable to cast class A to class A (class A is one of my JPA entities). I've read somewhere that kind of errors are related to different classloaders loading the same class, and the outcome of this is a class cast exception being thrown when an attempt to cast an object of a class into an instance of its same class is made. I have resolved this by restarting glassfish, it has happened twice and it could happen again.


Any one has a solution/workaround for this? I would appreciate any help :)

Thanks in advance.

William.
Thanks for all your suggestions...it's already working, previously i placed a security constraint over the entire app

Code:
 <web-resource-collection>
          <web-resource-name>Restricted Resources</web-resource-name>
          <url-pattern>/*</url-pattern>
 </web-resource-collection>
 

Now i just secured a folder:
Code:
 <web-resource-collection>
          <web-resource-name>Restricted Resources</web-resource-name>
          <url-pattern>/secured/*</url-pattern>
 </web-resource-collection>
 


And voila!

I have to say that it's very very dissapointing that you have to suffer so much for an everyday task as user authentication in JEE, considering it's so simple to achieve in other languages. I've been a Java advocate for so many years and i can't possibly defend the fact that you have to resort to a third party framework (Seam, acegi/spring security, jguard)to leverage security in a comprehensive fashion(again, is so simple in other languages)... I come from PHP and client side ajax (mootools) and I was so excited with jsf/icefaces but now it's no longer bells 'n whistles...

I'll take a look to spring security and keep trying with j_security_check...thanks again.

William
Hi guys, i'm trying to integrate Icefaces and container managed security to resolve the issue of users being able to enter a direct url ang gain access to restricted resources.

After an hour or so i configured a jdbc realm on glassfish using mysql and wrote the corresponding jsp with a form and (action="j_security_check"), made necessary changes on web.xml and sun-web.xml. It is authenticating properly but there's something i can't explain: I try localhost:8080/iceapp2/ and it redirects me to login, i submit my credentials and somehow i end up here: http://localhost:8080/iceapp2/xmlhttp/1238454318369/icefaces-d2d.js
I'm so frustrated cause i have a deadline closing in and absolutely no idea on what's happening. I've attached web.xml and login.jspx

Anyone has experienced something similar? Any ideas? Is there another way (non-JAAS) to secure my webapp and resources like pdf files into it?

Thank you...a lot!!!
Thanks Ted, now i get it. I doubted you would answer my 2-years late reply ;-)

I don't see how that trick can be be considered as "inappropriate", taking into consideration that JEE somewhat forces you to use container managed security when developing a web app. Thanks again man !!!!
Hi Ted, could you please elaborate more on your non Seam solution?
Specifically about the following:

Code:
 rendered="#{ roles.ROLE_USER || roles['ROLE_SUPERVISOR'] }"
 

I assume you store the bean in application scope under the key "ROLE"
and if it's so, i don't really get the way you query the bean using EL, considering you have a descendant of HashMap acting as a bean...no parameter, no get method, etc.

I'm desperately needing some clarification in here :)

Thanks

William
 
Profile for wcaicedo -> Messages posted by wcaicedo [12]
Go to:   
Powered by JForum 2.1.7ice © JForum Team