FilterPostProcessor identification!?

I’m instantiating a new FilterPostProcessor in one application state, and then switching to a new application state, purposely not removing the processor from the view port so I don’t have to reinitialize it again on the next state which uses that same FilterPostProcessor. My problem is that it doesn’t seem to contain any field or any means of identifying that particular Processor–so I’m stuck iterating through the processor’s child filters to look for a specific filter of the previous state to ensure I have the same one…am I missing something? was this deliberate?

Are you using equals()?

No, I have nothing to check equality to. That’s my issue :cry:



I have a new app state that has access to the application and there fore the list of processors attached to the view port, but I don’t have access to the previous app state to grab (not that it’s publicly accessible anyway) the filter post processor. I guess I was looking for something to attach some sort of Identification to it and easily find it on the next app state.



Basically now, I’m iterating through each of the processors and then iterating through each filter of each processor and do an equality check since the filter has a name property.



The javadoc didn’t expose any id field, but I just wanted to check with the community :stuck_out_tongue:

I don’t get what you are trying to do…

a piece of code maybe could help…

what do you mean by “it doesn’t seem to contain any field or any means of identifying that particular Processor”?

You can store the previous app state in a private variable and access its filter through a getter method.

@nehon said:
I don't get what you are trying to do...
a piece of code maybe could help..
what do you mean by "it doesn’t seem to contain any field or any means of identifying that particular Processor"?


I simply meant that the FilterPostProcesser has no Name field to identify it. ~~ sorry for confusion

oh ok…well you can iterate through processors and find it with an “instanceof FilterPostPorcessor”