Hello,
I have seen threads around Getting the latest component on page via CLT or Java Class. There is a mention of doing this through JS hack on the Get Latest Screen. Can anyone confirm, if this is actually possible and some pointers.
Reference Thread: /t5/TeamSite/Get-Latest-Component-via-a-CLT-or-a-Java-class/m-p/186832/highlight/true#M120254
There is still no supported API for this function. What exactly are you hoping to do?
As someone stated in the other thread that, we can have this done by JS hack in the Get Latest screen and you mention that, it can be done in several ways. Would like to know what are the options to achieve the 'Get Latest Component' on the page via external command.
You're not being very clear about your objective. What is the context in which you would like to execute a "get latest components" operation? Workflow? Custom screen? Menu item? External tool?
Get Latest Components on specific list of pages via Menu Item (Preferably).
....how is your objective different from what that function does currently?
Need to take update on specific list of pages. List of files in a txt file.
Ok, so how would that work? The user uploads a text file to TeamSite, then selects the file and clicks Actions > Update Pages From List?
Tell me the whole story instead of just pieces.
Yes, That's correct.
User uploads the list of files needing update and then do Site Publisher - > Get Latest Components.This approach for the Menu Item.
If we have any way to Get Latest Component Via CLT / Java Class (Not supported by HP so far), we should be able to take update against the list of pages.
Thanks
Can't say I exactly understand why you'd want to update pages in this way, but you can use your browser inspection tool (e.g. Firebug) to see what gets passed to the existing menu item. You'll notice that it's essentially a servlet, and each file you select gets passed in as a "vpath" parameter. Your custom menu item would basically have to create a "false" page with a <form> tag and prepopulated hidden inputs with all the vpaths in the uploaded file, and then POST that to the ootb servlet.
Obviously not supported, but that's how I'd do it.