Hi Yuval,
Consuming jQuery is quite easy.
My suggestion is to create an iView that you place on your framework page to manage all of your third party scripts (or else you will have lots of applications for no reason).
Create a portal component and use the PRT's IResource to add scripts:
public class CheckBoxComponent extends AbstractPortalComponent { public void doContent( IPortalComponentRequest request, IPortalComponentResponse response) { IResource jquery = request.getResource(IResource.SCRIPT, "scripts/jquery.min.js"); response.include(request, jquery); }
}
That is all to it.
Summary:
1. create portal component with above code.
2. create a folder inside of your component calls scripts.
3. add file name jquery.min.js (or whatever name you want just make sure you refer to it).
4. build and deploy the component.
5. find the application in the portal applications tree.
6. right click copy, right click on a folder you want and select "paste as PCD Object" (this will create an iView from the application).
7. add the iView to your framework page (if AFP then in the hidden container).
8. make sure you unchecked / set to false the "show tray" property on the iView.
9. save.
You should now have jQuery available.
BR,
Saar