on 03-31-2009 6:53 PM
Hi,
I have a requirement where I am getting value from a RFC. That RFC is binded to a node now my requirement is to get value of an attribute of the node.
Suppose the node is weekday and an attribute day. The node is binded to structure whose one of the field is day. Now we are having days such as monday, tuesday etc in the attribute.
My requirement is that when the day is wednesday display the field with some text.
Thanks
Shantanu
I have a requirement where I am getting value from a RFC. That RFC is binded to a node now my requirement is to get value of an attribute of the node.
Suppose the node is weekday and an attribute day. The node is binded to structure whose one of the field is day. Now we are having days such as monday, tuesday etc in the attribute.
My requirement is that when the day is wednesday display the field with some text.
Thanks
Shantanu
Hi Santanu,,
RFCvalue nodeRFCweek.
RFCvalue node attributeRFCday
supposevalue node--weekday ;
Value Attribute---day.
now you are using RFC..
you have to write some code
at time of copping all mdel node value to custom node value as weekday.
you should write code like this.
int size=wdContext.nodeRFCweek().size() //model size
for(int i=0;i<=size;i++){
IPublic<comp name>.IWeekdayElement ele=wdContext.nodeWeekday().createDayElement();
if(wdcontext.nodeRFCweek().getRFCweekElementAt(i).getRFCday().equalignorecase("wednesday"){
ele.setDay("any name according your requirement");
}
else{
ele.setDay(wdcontext.nodeRFCweek().getRFCweekElementAt(i).getRFCday());
}
}
thanks
jati
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi
IPublic<comp name>.IWeekdayElement ele=wdContext.nodeWeekday().createDayElement();
if(wdcontext.nodeRFCweek().getRFCweekElementAt(i).getRFCday().equalignorecase("wednesday"){
ele.setDay("any name according your requirement");
}
wdcontext.nodeWeekend.addelemnt(ele);
else{
ele.setDay(wdcontext.nodeRFCweek().getRFCweekElementAt(i).getRFCday());
}
}
try this and write the above code in the for loop
Hi Santanu,,
samll chaneh in you codding..just follow once again.............
and writen in component controller............
RFCvalue nodeRFCweek.
RFCvalue node attributeRFCday
supposeValue nodeweekday ;must be cardinality-0:N
Value Attribute---day.
now you are using RFC..
you have to write some code
at time of copping all mdel node value to custom node value as weekday.
you should write code like this.
int size=wdContext.nodeRFCweek().size() //model size
for(int i=0;i >size;i++){
IPublic<comp name>.IWeekdayElement ele=wdContext.nodeWeekday().createDayElement();
if(wdcontext.nodeRFCweek().getRFCweekElementAt(i).getRFCday().equalignorecase("wednesday"){
ele.setDay("any name according your requirement");
}
else{
ele.setDay(wdcontext.nodeRFCweek().getRFCweekElementAt(i).getRFCday());
}
wdContext.nodeWeek().addElement(ele);
}
Edited by: sudhir kumar on Apr 1, 2009 5:04 PM
Edited by: sudhir kumar on Apr 1, 2009 5:06 PM
HI
You have Node called Weekdays and this is Model Node and this has cardinality 0..n
and with one attribute .
get the size of the node .
for(i=0.i<wdcontext.nodeWeekDays.size();i++
{
wdcontext.nodeWeekdays.setleadSelection(i);
String day= wdcontext.nodeWeekdays.currentcontext.getDays();
if(days==Moday)
{
show the text
}
or
int n= wdcontext.nodeweekdays.getLeadselection();
for(i=0.i<wdcontext.nodeWeekDays.size();i++
{
wdcontext.nodeWeekdays.setleadSelection(n);
String day= wdcontext.nodeWeekdays.getWeekDaysElementsatindex(n).getdays();
if(days==Moday)
{
show the text
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If the node is as below:
WeekDay -
>Node 1...1
-
Day -
>Attr
Code:
if (wdContext.currentWeekDay().getDay().equalsIgnoreCase("Monday") {
//to do populate the field with text
}
--MLS
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.