Steven De Groote

Greenhorn
+ Follow
since Nov 23, 2006
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
1
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Steven De Groote

Hi,

I'm in trouble with a fairly basic custom component I built (using JSF1.2 and facelets)
It's the same as the regular ui:include, but it renders its own children if the includefile cannot be found (instread of an exception like in ui:include).

Here is the code of the apply() function within my TagHandler:


Problem is though, that the code fails on the "this.nextHandler.apply(ctx, null), saying "Parent UIComponent is null.
It doesn't give me an error there when I make sure that the tag does not have any child tags...

Is there any facelets expert around here who knows what I'm doing wrong?
Thanks a lot in advance!
11 years ago
JSF
In facelets they are.

The problem I'm having is that the min and max value setter methods are only called upon page load, not when I perform a reRender or an action function to the same page.
12 years ago
JSF
Although I haven't read anything wrong, there is no real solution to my problem. I have tried several things to get it working, but I believe I've hit a considerable JSF architectural problem which I'm trying to overcome.

I see there was some confusion about security and such. Basically, all I want to do it change the properties of a component.
For instance, I have a component <h:inputText id="text"> (and as such many of this kind on the same page).
Now, what I also have is a Java class, with one method: boolean isRendered(String formname, String fieldname)

The point is that I need to call this method for every single component on my page, so that I can control its (in this case) "rendered" property.
What I could do is add a rendered property on every element, and create a getter for every component.
I think though this is extremely useless coding, and I want a system that can change an attribute value without me having to set the property manually.

Hence my idea to loop every component before rendering, do something with them and afterwards do the rendering.
Problem is that the component tree isn't built at that time (see OP).

As for your suggestions with @PostConstruct, I also fail to see how that is ever going to work.
It is possible that I'm showing a page with a Session managed bean, and then I'm nowhere with the postconstruct I think.

Anyway, I'm out of ideas
Hope you guys still have some.

Steven
12 years ago
JSF
Hi,

I have an issue with the attributes values of a validator component.
Apparently the validator is created when I first visit a page.

Please see my code below:



The inputText component is rerendered through ajax but apparently, including the value that is displayed.
Unfortunately, the qsetting.minValue and qsetting.maxValue are not refreshed, causing my validator to not work correctly.

Is there a possibility to refresh the validator, to make sure it re-retrieves its attributes or to just create a new instance of the validator?
The validator class itself is currently implementing "Validator, Serializable".
Also, I'm using jsf1.2 with facelets...

Thanks,
Steven
12 years ago
JSF
Well I know what each attribute is for, that is not the problem really.
I do have a system where the admin can say, look on this page I now want this field disabled until I enable it again.

I have the system in place to store, and get these rules in a phaselistener to apply them on my page, but unforunately when I need them the component tree is not filled in yet. That really is my only - but apparently BIG - problem.

Maybe it's not possible to do such thing through a phaselistener, but then I want to know how it is. There must be a way...
12 years ago
JSF
Hi,

mojarra is Sun's reference implementation of JSF. There is also one from Apache. You will always need one of these, I prefer Mojarra all the time.
Richfaces, rcfaces, icefaces and all these things are libraries that provide extra components to use with your JSF project.

JSTL I think is never needed for JSF, although there may be a lib dependency, but I'm not sure.
12 years ago
JSF
Hi,

I have a regular JSF1.2 project with facelets, but I now have to add configurable field-level security.
It should be possible for a user to somewhere configure to make a field read-only.

Now, I have tried implementing this with a PhaseListener and doing this:

UIComponent comp = viewRoot.findComponent("testform:inputfield");
comp.getAttributes().put("style","display:none");

Unfortunately, this doesn't appear to work:
- in beforePhase, the viewroot is still not filled up, so I cannot find any component, hence I'm unable to set any attribute
- in afterPhase, viewroot is filled, the code runs perfectly, but the actual view (rendered xhtml) isn't changing.

I'm now out of ideas of how to do this.
Adding a disabled property to the fields seperately isn't appropriate either, as it would have to be done for every field, and then also for rendered or value as I would eventually want to change these as well.

I'm curious to know if any of you do have any ideas about this. I'd greatly appreciate the help.


Thank you,
Steven
12 years ago
JSF
Hi all,

I've nearly finished part II, but for delivery there is mention "All deliverables will be accepted in HTML only and each diagram must be UML compliant". These should then be packaged in a JAR file.

Does that mean I cannot put any images in, because I was thinking of linking from my html to images, one for each diagram.


Any thoughts?

Thanks
Hi all,

I have read that most of you consider that the class diagram should be technology independent.
One requirement however is to mention all functions used in transaction diagrams.

I was wondering how to combine these two things?
What should be in the class diagram, only data objects? Or also other classes?


Thanks,
Steven

deepak adlakha wrote:This is what i did.

I showed all component(JSP/ EJB..and more) in component diagram, nothing specific to method level details. Only a component talking to another component, very high level.


You didn't show any interfaces in your diagram then? (like with the lollypop)
I thought that would be a requirement as I read that "a component provides one or more interfaces that other components can use to interact with it".
Hi,

from previous experience and habit, I tend to make a giant class diagram, and so I did, but it seems that I'm going to split that off, as that also contains my beans, system lookups, pattern implementations etc. Back in my UML 1.1 days, people were hardly busy with component diagrams (or at least those who I learnt from weren't...

I am wondering though... an EJB in a component diagram, how do you model that exactly? If you have an OrderBean, would that mean that every method (which is an action obviously) is to be modelled as a component provided interface?


Thanks,
Steven
Thanks a lot guys, that cleared things a bit for me!
Hi,

I was wondering, how far do you guys go in the level of classes you show.
For example if you are using JMS, do you also include the standard JMS API classes and calls in your diagram, or only your own classes?

I was doing the first approach, but my diagram is starting to get really bloated...


Thanks,
Steven
Hi all,

I have a general system question regarding LDAP, as I'm fairly new to that.
Basically I have a webapp on tomcat that works with a Jboss appserver.
Upon login, I now ask the appserver to verify, and it replies with a token object (so a completely custom system).

Now I want to start using role-based security, with things like isUserInRole().
I think I need to re-configure tomcat and jboss for form-based auth, but beyond that I'm stuck.
What kind of realm do I need to configure, and how will the credentials be known by the webserver and the appserver then?


Any help would be much appreciated!
Hi,

I'm working on part 2 for SCEA and I'm struggling a bit to work out what to put into my component diagram and what in the class diagram.

I was thinking to show the actual framework of my design in the component diagram (web pages, controllers, services, bus delegates, ...).
The I would limit my class diagram to only business classes.

But how do I show then the interaction/usage between my components and the business classes?
And also where should I put transfer objects then?


Thanks