aspose file tools*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Tags with scripting varaibles . Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Tags with scripting varaibles ." Watch "Tags with scripting varaibles ." New topic
Author

Tags with scripting varaibles .

Deepak Jain
Ranch Hand

Joined: Aug 05, 2006
Posts: 637
Let me first explain what I have understood about scripting variables.
<myTag:showMovies>
${movie} ---> movie is a scripting variable.
</myTag:showMovies>


According to Mock by Eduardo Cobian question #2.
What are correct statements about creating scripting variables for a Tag::

1) It is necessary to implement TagExtraInfo interface.
2) You have to insert into the tag element of the taglib descriptor file an entry for tei-class element.
3) The interface you have to implement has a method called getVariableInfo.

Answer is 1,2 and 3.
Now I read HFSJ 2nd edition that has that famous example about evaluating the simple and classic tags bodies in a loop. Which is excatly similar to the above example. But HFSJ does not talk about <teiclass/> and TagExtraInfo class.

1) My question is are both similar
2) If yes then why is there no mention about TagExtraInfo
3) Is TagExtraInfo on SCWCD exam?
4) I have seen how to use the TagExtraInfo class where my class inhertied TagExtraInfo and getVariableInfo() was overriden, The thing i did not understand was when will TagExtraInfo methods be invoked?


SCJP, SCWCD, SCBCD
Deepak Jain
Ranch Hand

Joined: Aug 05, 2006
Posts: 637
Any suggestions ?
Seetharaman Venkatasamy
Ranch Hand

Joined: Jan 28, 2008
Posts: 5575

Originally posted by Deepak Jain:

<myTag:showMovies>
${movie} ---> movie is a scripting variable.</myTag:showMovies>



i doubt on this .

i think scripting variable is something like <%= i %>

correct me, if i am wrong
Deepak Jain
Ranch Hand

Joined: Aug 05, 2006
Posts: 637
Please reply,
Rufus Addis
Ranch Hand

Joined: Aug 21, 2008
Posts: 83
The main purpose of tei-class is to allow the creation of dynamic scripting variables without having to specify them in the TLD.

HFSJ shows how to implement scripting variables that are declared in the TLD using <variable>....</variable>.

I don't believe that tagextrainfo is in the scope of the exam. Least ways it's not listed in the requirements and did not crop up when I sat the exam.

The following has a nice explanation of when / how the tei methods are called:

http://www.ironflare.com/docs/tutorials/taglibs/5.html

Rufus.
Deepak Jain
Ranch Hand

Joined: Aug 05, 2006
Posts: 637
HFSJ shows how to implement scripting variables that are declared in the TLD using <variable>....</variable>.

But the TLD in the examples in the book does not have a mention of <variable>....</variable>.
Higor Zardo
Ranch Hand

Joined: Feb 16, 2008
Posts: 59
Buy the Second Edition. ;]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Tags with scripting varaibles .