Chuyển đến nội dung chính

Bài đăng

Đang hiển thị bài đăng từ 2013

Image is not showing up on Dialog.

I am getting problem with Dialog. In my Dialog I have created the image field which accepts image from dam by Drag and drop. Whil Iam dropping the image it is showing up inside the Dialog properly and is showing up on the screen also But when I try to edit the image the current image got vanished inside the dialog. I don't understand why it is happening? Here is the example of configuration of an image on the tab of dialog. <backImage jcr:primaryType="cq:Widget" cropParameter="./backImage/imageCrop" ddGroups="[media]" fileNameParameter="./backImage/fileName" fileReferenceParameter="./backImage/fileReference" mapParameter="./backImage/imageMap" name="./backImage/file" requestSuffix="/backImage.img.png" rotateParameter="./backImage/imageRotate" sizeLimit="100" title="Background Image" xtype="html5smartimage"/> You ...

Can multiple smartimage xtypes appear on one dialog tab in AEM

Widgets API document for  smartimage Note that the component is mainly designed for use on a separate dialog tab. You may use the component inside a CQ.Ext.layout.FormLayout optionally if you provide a  suitable height setting . Here are codes for dialog: <?xml version="1.0" encoding="UTF-8"?> <jcr:root xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" jcr:primaryType="cq:Dialog" height="{Long}600" title="dialog" xtype="dialog"> <items jcr:primaryType="cq:Widget" xtype="tabpanel"> <items jcr:primaryType="cq:WidgetCollection"> <panel jcr:primaryType="cq:Panel" title="Panel with two Images"> <items jcr:primaryType="cq:WidgetCollection"> <firstimage ...

How to turn off personalization targetting on components?

The "Target" menu option can be disabled at component level by setting cq:editConfig/cq:disableTargeting to true. As an example for out of the box text component is shown below. Don't forget to overlay in order to be upgrade safe. 

How to see .content.xml and .vlt, ... in Eclipse

In cq5 developement, I have seen .content.xml. I donot see it in eclipse though its in my workspace and is visible if I directly browse my workspace through windows explorer. 1/ Just go to Window->Show View->Navigator which will open the navigator tab for project and you can view all hidden files there. 2/ In the package explorer, in the upper right corner of the view, there is a little down arrow. Tool tip will say view menu. Click that, Select Filters. uncheck .* resources. So Package Explorer -> View Menu -> Filters -> uncheck .* resources

How to set up run mode in CQ / WEM

Run modes allow you to tune your CQ instance for a specific purpose; for example author, publish or development. This is done by defining collections of configuration parameters for each run mode. A basic set is applied for all run modes, additional sets are each tuned to the purpose of your specific environment. All configuration settings are stored in the one repository and activated by setting the Run Mode. Standard run modes are: • author • publish You can also create environment specific run mode such as, • author, development • publish, test • author, intranet, us • as required... There are two mechanisms for setting standard and environment specific run mode for your instance: •  To set up standard run mode Use the naming convention: cq-<run-mode>-<port-number> For example, set a standard run mode by naming the jar file cq-author-4502 or cq-publish-4503 •  To set up environment specific run mode there are two methods, 1) Through <cq-installation-dir>/c...

CQ5: preview mode in sidekick does not refresh automatically

Issue If you are using the sidekick to switch between edit, design and preview modes, you may notice that the pages refreshes automatically when switching to edit and design mode, but not when switching to preview mode. This can cause problems if you are using the  WCMMode  methods and properties in your application to display a different page view depending on the current mode (i.e. using conditional logic based on WCMMode.DESIGN, WCMMode.EDIT and WCMMode.PREVIEW).  If the page does not refresh when switching to preview mode, then it will display the same objects and state as it did in edit mode. Solution The solution is simply to force a page refresh automatically when switching to preview mode. I. If you don't overwrite head.jsp Open  /libs/wcm/core/components/init/init.jsp Add the  previewReload  property as follows and save the changes: CQ.WCM.launchSidekick("<%= currentPage.getPath() %>", { propsDialog: "<%= dlgPath == n...

How to add a new supported language in CQ / WEM (Translator in CQ)

Use case:  You want to add new language to CQ Change display language options in translator grid Change language name and default countries  Solution: You can access translator UI in CQ with following URL http://<HOST>:<PORT>/libs/cq/i18n/translator.html Create new language location for Dictionary Go to CRXDE lite (or your favorite JCR browser) and add this structure (assuming /apps/myapp/i18n as a typical location for custom apps): /apps/myapp/i18n [sling:Folder]     - de [nt:unstructured]         + jcr:mixinTypes = [mix:language]         + jcr:language = de     - fr [nt:unstructured]         + jcr:mixinTypes = [mix:language]         + jcr:language = fr Then reload the translator and the path /apps/ myapp /i18n should show up in the drop-down at the top. Note: the translator will only s...

How to install Multiple Package in CQ / WEM

Use Case:  You have a Hotfix that has many dependencies and you want to install them in order Or you want all packages to install in particular order. Installing through package manager can be time consuming process. Solution:  When CQ starts up it checks /crx-quickstart/repository/install till  CQ5.4  and  /crx-quickstart/install for  CQ5.5 & 5.6  folder for any new package and install them in alphabetical order. So for example you have a package which has many dependencies, You can rename them in alphabetical order and put them in /crx-quickstart/repository/install folder. Next CQ restart will make sure that they are installed in that order. For example, If you have Zip file name p001-hotfix-<Some-number>.zip and p002-hotfix-<some-number> under install folder, then p001 will get installed first and then p002 upon restart. After initial installation CQ creates properties file (some thing like <your-package-name>.propert...

How to change Admin password in CQ5.5 & 5.6

Use case  Change admin password  Good news  Till now you have to change admin password at multiple location if you are using CQ5.4, see here   From CQ5.5 onward you just have to change admin password once. There are multiple ways though, 1) Using CRX explorer (Old way) 2) Using granite http://host:port/libs/granite/security/content/admin.html#edit:/home/users/a/admin 3) using curl command curl -u admin:OLD_PWD -F rep:password="NEW_PWD" http://host:port/home/users/a/admin.rw.html You can also use security API for do user related task, Something like this curl -d "createUser=true&authorizableId=$userId&rep:password=pw&membership=administrators" -u "admin:admin" http://host:port/libs/granite/security/post/authorizables (There is set of operation you can do using this, JAVA DOC coming soon) For any other user other than admin you can use CURL to change password as curl rep:password="test" --user admin:ADMIN_PASSWORD http://host:port/home/...