Skip to Content
author's profile photo Former Member
Former Member

How Dynamically control text property of LinkToUrl

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 . .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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

5 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Sep 28, 2006 at 12:00 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 28, 2006 at 12:02 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 28, 2006 at 12:09 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 28, 2006 at 12:17 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 29, 2006 at 06:45 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.