Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Javascript in Metatagger
GaneshSalian
Hi!
I want to do javascript validation while saving the metatagger details. How Can I proceed?
Thanks,
Ganesh.
Find more posts tagged with
Comments
Migrateduser
can you elaborate?. You want to validate javascripts with MetaTagger?
BIRT_NextLineSample.rptdesign
GaneshSalian
Hi!
Thanks...
My sceanario would be ..I have description field in metatagger. I want to check the special characters in that fields and stop the process if user has entered any special characters..
Metatagger layout we define using xml configuration file...
Please let me know if there is any way i can do this.
Migrateduser
There is no way to stop MetaTagger from processing the file once it has kicked off one of your content processors.
One thing you can do is to remove the special characters(string manipulation) from your description field or the file(temporary) itself by writing a processor.
At the pre-processor stage you will have access to the contents that further stages will see, so you can come in here and remove/replace the special characters inside the file and MetaTagger will not see those characters anymore.
At a post-processor stage you can manipulate the description field(metadata field) and replace/remove the special characters.
GaneshSalian
Yes we can do it in preprocessor stage...
I wanted to know for eg..In metatagger can we not write some onblur javascript event and call javascript function...
Migrateduser
I do not understand! Can you explain your usecase?
GaneshSalian
normaly in javascript we write function in onblur event ...that is when user enters some content in text box and come out of text box we can put javascript validation...for e.g.: we can check whether user has entered special characters in text box...
GaneshSalian
I wanted to do the same thing metatagger screen using javascript...I am not getting how I can start ...where i need to write the javascript and how I can call that function. My Metatagger screen is defined using xml configuration file.
do u have any clue??
test.rptdesign
Migrateduser
did you mean a TeamSite DCR when you say metatagger screen?
Metatagger ships with a Java based open API, you can capture the contents of the box(preferably, server side) dump it in to a temporary file and tag it using the open API.
look specfically at MetaTaggerClient object and processContent method.
so something like(in JSPs)
1. stuff in text box
2. submit + post
3. post['textarea'] >> tmp.ext
4. MetaTaggerClient mtclient = new blah()
5. mtclient.processContent(tmp.ext,blah)
6. viola!
unless, you think I'm still talking nonsense!
preview.pdf