• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Tags with scripting varaibles .

 
Ranch Hand
Posts: 637
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
 
Deepak Jain
Ranch Hand
Posts: 637
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Any suggestions ?
 
Ranch Hand
Posts: 5575
Eclipse IDE Windows XP Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
Posts: 637
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please reply,
 
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 637
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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>.
 
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Buy the Second Edition. ;]
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic