|
View:
New views
6 Messages
—
Rating Filter:
Alert me
|
|
|
TextField with Separate LabelHi Folks,
Im using VWP with NB6.0., When I use a separate label for a text field (by setting "for" property of label)the error message of the message group shows the text field's name (that means like "pagename:formname:textfieldname") other than the Label.text of the associated label. Here is a message that shows "form1:mainPanel:projectNameTextField: Validation Error: Value is required" but I want "Project Name: Validation Error: Value is required". If I set the label field of the text field that effect to the alignments. BCos I uses GridPanel. Do you guys know any solution to overcome this.. Thanks |
|
|
Re: TextField with Separate LabelHi
I have the same request as Chaminda. If my textfield is rather deep in the component tree, it can leads to things like this on validation error : "form1:layoutPanel3:propertySheet1:secPresentation:property11:txtNumero: Validation Error: Value is required" which is not really user friendly. I've tried to override it in a message bundle with without success : javax.faces.component.UIInput.REQUIRED="{0}": Required field Thanks
|
|
|
Re: TextField with Separate LabelDo you have this in your faces-config.xml?
<application> <message-bundle>yourpackage.MyResources</message-bundle> </application> Where "yourpackage" is the package where "MyResources.properties" is located. Of course MyResources.properties would contain your > javax.faces.component.UIInput.REQUIRED="{0}": Required field -David On Nov 25, 2008, at 7:46 PM, Yves G wrote: > > Hi > > I have the same request as Chaminda. > If my textfield is rather deep in the component tree, it can leads > to things > like this on validation error : > "form1 > :layoutPanel3:propertySheet1:secPresentation:property11:txtNumero: > Validation Error: Value is required" which is not really user > friendly. I've > tried to override it in a message bundle with without success : > javax.faces.component.UIInput.REQUIRED="{0}": Required field > > Thanks > > > Chaminda wrote: >> >> Hi Folks, >> >> Im using VWP with NB6.0., When I use a separate label for a text >> field (by >> setting "for" property of label)the error message of the message >> group >> shows the text field's name (that means like >> "pagename:formname:textfieldname") other than the Label.text of the >> associated label. >> >> Here is a message that shows "form1:mainPanel:projectNameTextField: >> Validation Error: Value is required" but I want "Project Name: >> Validation >> Error: Value is required". >> >> If I set the label field of the text field that effect to the >> alignments. >> BCos I uses GridPanel. >> >> Do you guys know any solution to overcome this.. >> >> Thanks >> >> >> > > -- > View this message in context: http://www.nabble.com/TextField-with-Separate-Label-tp16677394p20693802.html > Sent from the Visual Web - Users mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@... > For additional commands, e-mail: users-help@... > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
|
|
Re: TextField with Separate LabelYes I have it configured in my faces-config, but even with the property "javax.faces.component.UIInput.REQUIRED={0}: Required field." set, the validation error message still gives "form1:layoutPanel3:propertySheet1:secPresentation:property11:txtNumero: Required field.
The "{0}" variable seems to be bound to a sort of internal name of the textfield instead of its label.
|
|
|
Re: TextField with Separate LabelDo you have the "Label" property set? If I clear my "Label" property,
I get the fully qualified component ID. Even a separate "Label" component will not work. You must use the "Label" property for "{0}" to be properly filled in. -David On Nov 25, 2008, at 10:34 PM, Yves G wrote: > > Yes I have it configured in my faces-config, but even with the > property > "javax.faces.component.UIInput.REQUIRED={0}: Required field." set, the > validation error message still gives > "form1 > :layoutPanel3:propertySheet1:secPresentation:property11:txtNumero: > Required field. > The "{0}" variable seems to be bound to a sort of internal name of the > textfield instead of its label. > > > > David Botterill-2 wrote: >> >> Do you have this in your faces-config.xml? >> >> <application> >> <message-bundle>yourpackage.MyResources</message-bundle> >> </application> >> >> Where "yourpackage" is the package where "MyResources.properties" is >> located. Of course MyResources.properties would contain your >> >>> javax.faces.component.UIInput.REQUIRED="{0}": Required field >> >> -David >> >> On Nov 25, 2008, at 7:46 PM, Yves G wrote: >> >>> >>> Hi >>> >>> I have the same request as Chaminda. >>> If my textfield is rather deep in the component tree, it can leads >>> to things >>> like this on validation error : >>> "form1 >>> :layoutPanel3:propertySheet1:secPresentation:property11:txtNumero: >>> Validation Error: Value is required" which is not really user >>> friendly. I've >>> tried to override it in a message bundle with without success : >>> javax.faces.component.UIInput.REQUIRED="{0}": Required field >>> >>> Thanks >>> >>> >>> Chaminda wrote: >>>> >>>> Hi Folks, >>>> >>>> Im using VWP with NB6.0., When I use a separate label for a text >>>> field (by >>>> setting "for" property of label)the error message of the message >>>> group >>>> shows the text field's name (that means like >>>> "pagename:formname:textfieldname") other than the Label.text of the >>>> associated label. >>>> >>>> Here is a message that shows "form1:mainPanel:projectNameTextField: >>>> Validation Error: Value is required" but I want "Project Name: >>>> Validation >>>> Error: Value is required". >>>> >>>> If I set the label field of the text field that effect to the >>>> alignments. >>>> BCos I uses GridPanel. >>>> >>>> Do you guys know any solution to overcome this.. >>>> >>>> Thanks >>>> >>>> >>>> >>> >>> -- >>> View this message in context: >>> http://www.nabble.com/TextField-with-Separate-Label-tp16677394p20693802.html >>> Sent from the Visual Web - Users mailing list archive at Nabble.com. >>> >>> >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: users-unsubscribe@... >>> For additional commands, e-mail: users-help@... >>> >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: users-unsubscribe@... >> For additional commands, e-mail: users-help@... >> >> >> > > -- > View this message in context: http://www.nabble.com/TextField-with-Separate-Label-tp16677394p20695081.html > Sent from the Visual Web - Users mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@... > For additional commands, e-mail: users-help@... > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
|
|
Re: TextField with Separate LabelNo I dont have it set for design and requirement reasons.
Firstly because it is inside a property sheet, the label is set with the property element and secondly , this textfield is related to an identifier which is composed of 2 parts, a static text and the textfield; if we set the label of the textfield, it wont fit the requirements as it will show something like that : Number:(property element) 112546(static text)-Number(label)TextBox However, I've tried an alternative solution in deactivating the required attribute element of the textfield and writing a custom validator handler, but now i face the problem that the handler will never be called when the textfiel is empty. I'd expect it be called with a null or empty value and be gone with that.
|
| Free embeddable forum powered by Nabble | Forum Help |