• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem in Adding Attributes to TLD file

 
Micheal John
Ranch Hand
Posts: 344
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How to add more attribute for the customm tags? below is the one of the example, I am trying.. If I am running with one attribute in the TLD, then it's running fine. If I add another attribute, some error is diplaying..

If we are adding attribute elements in the TLD, then setter method for that attribute should be placed in the tag handler..right?

See the below code and where I did the mistake..?








Error Mesasge


[ January 10, 2007: Message edited by: Micheal John ]
 
Stary Kapec
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

<mine:advice user="${userName}"/>
<mine:advice user1="${userName1}"/> // error come here..???


As you configured your TLD both user and user1 attributes are mandatory per every invocation.

Change the code to:



But I have a question to you and others. Is there a way to set the TLD so that one attribute was mandatory but only one from the two. For example user or user1 but not both at the same time?

Or is it possible only programmatically for example:


[ January 10, 2007: Message edited by: Jasiek Motyka ]
 
Micheal John
Ranch Hand
Posts: 344
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello ranchers,

I am expecting the answer for my problem.. But Jasiek Motyka raised another question for my question, instead of answer.. and finally there is no answer for both of us and thread is seems to be die...

Sorry Ignore this POST !!! I am not read the reply from Jasiek Motyka properly... I got the answer for my question... answer for Jasiek question...

Thanks Jasiek Motyka

[ January 10, 2007: Message edited by: Micheal John ]
[ January 10, 2007: Message edited by: Micheal John ]
 
Stary Kapec
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
sorry for the confusion. I should not have put my own question in your thread but I thought my doubt is somewhat connected with yours.
 
Manikandan Jayaraman
Ranch Hand
Posts: 230
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Having one of the two attributes. I hope this are your rules:

- One of the two attributes shd be specified.
- Both shd not appear.

Keep one attribute in tld with 'required' as false. Use one of them as dynamic attrbute. Do programmatic checking for your conditions.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic