Mauro Castaldo

Greenhorn
+ Follow
since Jul 18, 2005
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
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 Mauro Castaldo

Originally posted by Daniel Prene:
Just trying to apeas the boss. I think he's woried about having to grab the int value whenever dealing with the accessor methods outside the forms



What do you think about using auto boxing/unboxing feature of J2SE 5?
18 years ago
JSF

Originally posted by Adeel Ansari:


Surely, I am here to help you out mate, if I can. But for code, I'm sorry to say its proprietry.

BTW, you didn't respond to my question. It might be helpful for me to tell you the real reason or solve your problem.



Sorry Andeel,
I'm Mauro and I'm asking code to Paul!
18 years ago
JSF

Originally posted by Rob HK:
We're using the Sun reference implementation version 1.1.



It works ok for me but I'm using latest JSF RI release. Try RI 1.1_01.
18 years ago
JSF

Originally posted by Paul Smiley:
Well, I have a HtmlSelectOneMenu component that has a value of 1 member of the backing bean and the SelectItem options are populated with another member which is a list of potential values. When the page renders, the first element of the list always displays in the list, not the current value as held in the backing bean element 1. It seems like some type of translation to the Html Option selected="true" needs to be rendered, but I don't know how to do it. It seems like the data element is not bound to the component.
Thanks,
Paul



This code run correctly on JSF RI 1.1_01:


the HtmlSelectOneMenu correctly select "Item2".
18 years ago
JSF
IE overrides several HTTP error status pages but it has a size threshold. Basically if the error page send by the server has a large enough body then IE decides it's meaningful and displays it.

Usually to be safe you should make error pages that are larger then 512 bytes. The threshold varies per HTTP status code. You can look at what your thresholds are currently set to. In IE 5 and greater the settings are stored in the registry under[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\Main\ErrorThresholds]

Err Size(bytes)
400 512
403 256
404 512
405 256
406 512
408 512
409 512
410 256
500 512
501 512
505 512
18 years ago
JSF
Can you show all your code (form bean and list bean)?
18 years ago
JSF
... or simpler HTML comments <%-- tag --%>
18 years ago
JSF
yes, you could write a custom component to do that work but you can also try simpler solutions with standard ones like this:



move mouse over the image and have your mouseOverAction method executed!
(sorry for zeros instead of 'o' in some code parts but it's a post requirement)
18 years ago
JSF

Originally posted by Jolie Lee:
hmm, i tried to have two forms, but when i submit the first form, it shows me validation error cos my 2nd forms there's validation checking....

how should i go about it?



strange behavior... can you show your code?
18 years ago
JSF

Originally posted by Paul Smiley:
OK, related question. How do you get the combo box to select the current value from the bean on page population? I can't seem to get the list to coordinate with the value chosen. Thanks



Can you explain better what do you intend?
18 years ago
JSF

Originally posted by Paul Smiley:
I have a HtmlSelectOne component on a form. My value-changed listener is not working - never enters the method in the backing bean. I have registered the property in the faces-config.xml:

<managed-property>
<property-name>classIfSelItem</property-name>
<null-value/>
</managed-property>

<h:selectOneMenu id="classification" value="#{form.classIfSelItem}" converter="ItemConverter" valueChangeListener="#{form.processValueChange}"
immediate="true" >
<f:selectItems value="#{list.classifList}" />
</h:selectOneMenu>

And my method:

public void processValueChange(ValueChangeEvent event){
HtmlSelectOneMenu selOne = (HtmlSelectOneMenu)event.getComponent();
System.out.println(selOne.getValue());
System.out.println(selOne.getId());
event.getOldValue();
event.getNewValue();
}

This method never gets entered. Any ideas?



Did you post the form (with a h:commandButton/h:commandLink or javascript)?
if so, did you use a h:messages tag to show eventuals conversion or validation errors?

Mauro.
18 years ago
JSF

Originally posted by Mauro Castaldo:


Mauro



Sorry, should be
18 years ago
JSF

Originally posted by Gregg Bolinger:


That makes sense to me. Ok, since we are on this topic, I have a question. Say I want to change an outputText component to be red when there is an error with it's associated inputText field. If I am using the standard validatators, where can I check for errors to exist to change that label? Would I have to catch this in a phase listener of some sort?



try this:

I can't test it now but it should run.

Mauro
18 years ago
JSF

Originally posted by Rob HK:
Hi,
I have the following code to create a selectOneMenu:
<h:selectOneMenu id="country" tabindex="12" value="#{myForm.country}" disabled="true"
>
<f:selectItems value="#{enumeratiesBean.countries}"/>
</h:selectOneMenu>

and it generates the following starttag:
<select id="body:myForm:country" name="body:myForm:country" size="1" tabindex="12">

The problem is that the disabled attribute is not being rendered at all. Does anyone know this problem?
Greets,
Rob



Are you using JSF reference implementation and, if so, which version?
18 years ago
JSF

Originally posted by Sloan Bowman:
What is the best way to go about creating a template to use with JSF. Currently the only way I have figured out how to do this is to create one .jsp file with includes but the problem is you have to create several navigation cases within the one navigational rule because I can't seem to get the forms to post with parameters. Any ideas what the best method to do this is so I don't have to include a header, footer, menu etc.. in each and every jsp page?

[ July 21, 2005: Message edited by: Sloan Bowman ]


Try Template component from http://www.jenia.org/jsp/home.jsf

Mauro
18 years ago
JSF