aspose file tools*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Problem in Adding Attributes to TLD file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Problem in Adding Attributes to TLD file" Watch "Problem in Adding Attributes to TLD file" New topic
Author

Problem in Adding Attributes to TLD file

Micheal John
Ranch Hand

Joined: Nov 01, 2006
Posts: 344
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 ]

Micheal John
SCJP 1.4 (86%), SCWCD 1.4 (86%), SCBCD 1.3 (85%), SCDJWS (Just Started...) - Satisfaction Lies in Our EFFORT, Not in the ATTAINMENT
Stary Kapec
Ranch Hand

Joined: Dec 04, 2005
Posts: 81

<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

Joined: Nov 01, 2006
Posts: 344
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

Joined: Dec 04, 2005
Posts: 81
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

Joined: Sep 15, 2004
Posts: 230
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.


Regards,<br />Mani<br />SCJP 1.4 (95%)<br />SCWCD 1.4 (94%)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem in Adding Attributes to TLD file
 
Similar Threads
Question on Empty body content of Simple Tag Handlers
AdvisorTagHandler unable to compile
custom "advice" tag example
org.apache.jasper.JasperException: Unable to compile class for JSP:
Problem While using EL