on 03-19-2008 5:41 AM
Hi,
I have created Two UI elements InputField and Label. I set the property 'labelFor' of the UI element Label to 'InputField'.
This is my requirement . I am having the Id of InputField in the code . I want to get the value of 'text' of the UI element Label.
Please suggest how to proceed.
Points will be rewarded for helpful answers.
Best Wishes
Idhaya R
Hi,
Set this properties to ur Input field and Label:
Lable Property->Label for:Ictx_nputField1
Input Filed Property -->id:ctx_InputField1
Create one Context element like:ctx_inputfield
Set the value for label(if ur getting the value from and u want to diplay that)
wdContect.crtContextElement.setctx_inputField1("LABLE');
(ur getting the ID of inputfld from ur code i.e LABEL right)
Regards,
Lavanya.G
Edited by: Lavanya Goriga on Mar 19, 2008 7:24 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Not sure why you really need this, but you could do something like
IWDInputField field = (IWDInputField) view.getElement("inputFieldID");
IWDLabel fieldLabel = null;
for (Iterator children = field.getContainer().iterateChildren(); children.hasNext(); )
{
IWDUIElement child = (IWDUIElement) children.next();
if (child instanceof IWDLabel)
{
IWDLabel label = (IWDLabel) child;
if ( field.getId().equals(label.getLabelFor())
{
fieldLabel = label;
break;
}
}
}
Armin
Hi
small suggestion if ur doubt has cleared.
then select the radiobutton problem resolved
Hazrath
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
//first get the ref of Label
IWDLabel label=(IWDLabel)view.getElement("labelid");
//now get the labeltext
label.getText()
write the above code in the wdDoModifyView() method
Hazrath.G
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
You don't have to use the InputField inorder to get the Label text.
Follow the code and it is under the method WDdoModifyView()
IWDLabel label = (IWDLabel)view.getElement( "Label");
label.getText();
Regards
- Vinod
*
Edited by: Vinod V on Mar 19, 2008 11:45 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.