on 09-28-2006 12:46 PM
Hi,
My requirement is I am fetching emai id records from
SAP/R3 and displaying in table.In table one field is
Email Id.When I am click on email id Microsoft outlook express is opening and the mail id is automatically comming to the To field of outlook express,because before binding to reference property of LinkToUrl I modified in Component context code like mailto:xyz@yahoo.com.I set reference and
text property of LinkToUrl to <context node>.<node value>.My problem is in reference and text property of LinkTOUrl mailto:xyz@yahoo.com is comming.I want in text property xyz@yahoo.com and in reference property mailto:xyz@yahoo.com should be come
Thanks & Regards
muna
Hi,
According to Armin suggesion I created calculated
attribut(first i created one value attribute in name of calculate and set calculated property to true and ser read only to true)in context of component controller.
I added following code in getter method .
public java.lang.String getOutputCalculate(IPrivateBirthDayAppCust.IOutputElement element)
{
//@@begin getOutputCalculate(IPrivateBirthDayAppCust.IOutputElement)
return element.getAttributeAsText("BirthDayAppModel.Zbirthday_List.Email_Id");
//@@end
}
Under Outputput model node I created calculate value attribute.My component Context node structure is like
this.
Context->OutPut(Model Node)->Birthdaylist(Model Node)->Email_Id (Model Attribute).
I am mapping Component Context to View context(Result View).My view context Structure is like.
Context->Birthday(Model Node)->Birthdaylist(Model Node)->
Email_Id.calculate attribute created under Birthday.
when i am running application i got nullpointer exception.
The initial exception that caused the request to fail, was:
java.lang.NullPointerException
at com.bajaj.auto.wdp.IPublicBirthDayAppCust$IOutputElement.wdGetObject(IPublicBirthDayAppCust.java:472)
at com.sap.tc.webdynpro.progmodel.context.NodeElement.getAttributeAsText(NodeElement.java:887)
at com.bajaj.auto.BirthDayAppCust.getOutputCalculate(BirthDayAppCust.java:151)
at com.bajaj.auto.wdp.InternalBirthDayAppCust.getOutputCalculate(InternalBirthDayAppCust.java:155)
at com.bajaj.auto.wdp.IPublicBirthDayAppCust$IOutputElement.wdGetObject(IPublicBirthDayAppCust.java:474)
... 75 more
Thanks & Regards
muna
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Berned,
Thanks for your reply.since I am using Adaptive RFC, I am creating model and bind to component context, for mailid data only one model attribute is created and I am creating another model attribute but how i will get all the mail details in to that model attribute that i created.
Thanks & Regards
sailajit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Armin,
Thanks for your immediate help. I know how to create modele node,model attribute,value node and value attribute but don't know how to create calculate attribute.
Thanks & Regards
sailajit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
In the Component controler youcan see the property of the Element calculated false/true.
you can set as true and you can see the methods as
calculatedAttributeGetter <getTest>
calculatedAttributeSetter <setTest>
you can do the calculated values in this part
See this blogs
Kind Regards
Mukesh
Hi,
you need two separate values attributes in your context - one to bind it to text property of LinkToUrl and one to bind it to the reference property.
And you only add "mailto:" to that value attribute, which is bound to the reference property.
Greets
Bernd
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Create calculated attribute "MailToURL" and implement getter like
String getMailToURL(I<Node>Element element)
{
return "mailto:" + element.get<attribute-storing-text>();
}
Bind LinkToURL.<i>reference </i>property to attribute "MailToURL".
Armin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
81 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
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.