since ‎08-06-2014
‎10-12-2019
Rui_J
Level 2
Re: Problem using curl to create user profile
Avatar

Rui_J

Rui_J
- Adobe Experience Manager
This is exactly what I wrote in the first thread. And it does not work. curl -u admin:admin -FcreateUser= -FauthorizableId=testuser -Frep:password=testuser -Fprofile/age@TypeHint=Long -Fprofile/age=30 -FintermediatePath="/home/users/test/" http://localhost:4501/libs/granite/security/post/authorizablesThis command puts age (String) = 30 and age@TypeHint (String) = "Long" in the user profile.

Views

500

Likes

0

Replies

0
Re: Problem using curl to create user profile
Avatar

Rui_J

Rui_J
- Adobe Experience Manager
I would like profile/age to be a Long type "30" instead of a String typed "30" in AEM when I create the user using curl command. How can I do this?I know @TypeHint is a way, but not sure how to use when I call create user in http://localhost:4501/libs/granite/security/post/authorizables​

Views

508

Likes

0

Replies

0
Problem using curl to create user profile
Avatar

Rui_J

Rui_J
- Adobe Experience Manager
Hi, I am trying to use Sling @TypeHint to set profile/age = 30, which age is a Long data type. So this is what I did in curl cmdcurl -u admin:admin -FcreateUser= -FauthorizableId=testuser -Frep:password=testuser -Fprofile/age@TypeHint=Long -Fprofile/age=30 -FintermediatePath="/home/users/test/" http://localhost:4501/libs/granite/security/post/authorizables But this is not working. Can someone tell me how to fix this?Thank you

Views

1.1K

Like

1

Replies

5
Problem updating user profile using curl command
Avatar

Rui_J

Rui_J
- Adobe Experience Manager
I want to update the user profile using curl command. For example, I want to set profile/age=30 for a user.So this is the command I am using.curl -u admin:admin -Fprofile/age=30 http://localhost:4502/home/users/JLhct5w1LuPVxGs0X5D5u.rw.htmlIt updates alright. But the problem is the age property type is a String instead of Long. How can I set the age type to "Long" in Curl command? I tried -Fprofile/age@TypeHint=Long, but it doesn't work.Please help.Thanks

Views

347

Likes

0

Replies

0
Re: How do I programically version a page?
Avatar

Rui_J

Rui_J
- Adobe Experience Manager
Thanks. smacdonald2008. PageManager.createRevision("/path") does the trick.

Views

476

Likes

0

Replies

0
How do I programically version a page?
Avatar

Rui_J

Rui_J
- Adobe Experience Manager
Hi, So how do I programically version a page? Basically what I want is regardless of the page has been modified or not, the page should create a new version when I execute the code. I have tried VersionManager.checkin(path), but it doesn't work. Thanks.

Views

510

Likes

0

Replies

2
Re: How to find all the assets that has been published for more than 1 year using JCR SQL2?
Avatar

Rui_J

Rui_J
- Adobe Experience Manager
smacdonald2008 wrote... Here is a blog that i show how to use Dates and JCR SQL2: http://scottsdigitalcommunity.blogspot.ca/2015/12/using-date-values-in-jcr-sql2-queries.html Thank you.Please correct me if I am wrong, for the solution you provided above, I have to execute this query for each asset.For example, /content/path1 's [cq:lastReplicated] is 2013-12-20, so path1's expiry date should be 2014-12-20. Because the expiry date is based on [cq:lastReplicated].Consider another /content/path2 's...

Views

561

Likes

0

Replies

0
How to find all the assets that has been published for more than 1 year using JCR SQL2?
Avatar

Rui_J

Rui_J
- Adobe Experience Manager
How do I find all the assets that has been published for more than 1 year using JCR SQL2 ? Because each asset has a different cq:lastReplicated value, I believe I need to do something like SELECT parent.* FROM [cq:Page] AS parent INNER JOIN [nt:base] AS child ON ISCHILDNODE(child,parent) WHERE ISDESCENDANTNODE(parent, '/content/myapp') AND parent.[jcr:primaryType]='cq:Page' AND datediff(child.[cq:lastReplicated], CURRENTDATE)>365For CURRENTDATE I can get it in java and cast it in SQL2, but how d...

Views

961

Likes

0

Replies

4
Re: Is it possible to start a workflow on asset folder?
Avatar

Rui_J

Rui_J
- Adobe Experience Manager
sam.stange wrote... Sorry, I thought you were talking about adding a workflow launcher on a sling:OrderedFolder. Where are you trying to add the functionality? [img]2015-06-17_21-52-21.png[/img] I mean here.

Views

465

Likes

0

Replies

0
Re: Is it possible to start a workflow on asset folder?
Avatar

Rui_J

Rui_J
- Adobe Experience Manager
If I understand you correctly, you are saying on siteadmin page, overwrite the dialog javascript to enable the workflow on context menu, then write a servlet to trigger the workflow?

Views

463

Likes

0

Replies

0
Is it possible to start a workflow on asset folder?
Avatar

Rui_J

Rui_J
- Adobe Experience Manager
Hi, I have a requirement that I need to start a workflow on a selected asset workflow. This will iterate each asset under this folder and process some work. But when I right click on an asset folder, the "workflow" option is disabled. So I am wondering if it is possible to start a workflow on an asset folder?Thanks

Views

879

Likes

0

Replies

5
Re: How to let the dispatcher not cache certain component?
Avatar

Rui_J

Rui_J
- Adobe Experience Manager
Hi, Thanks for the link. It is really helpful! I have managed to setup the SSI. But One thing confusing me is how do I differ the WCMMode in publish instance from dispatcher? This is what I wrote in the code, author and dispatcher are working fine, But the publish instance does not show. Any idea?<% String path = currentNode.getPath().replace("jcr:content", "_jcr_content") +".dynamic.html"; %> <% boolean authormode = ((WCMMode.fromRequest(request) == WCMMode.EDIT) || (WCMMode.fromRequest(request...

Views

763

Likes

0

Replies

0
Re: How to let the dispatcher not cache certain component?
Avatar

Rui_J

Rui_J
- Adobe Experience Manager
Bruce Lefebvre wrote... Try hitting your component without the 'dynamic' selector (for example, http://localhost:4505/content/myapp/mypage/_jcr_content/rightPar/dynamicComponent.html). The contents of dynamicComponent.jsp (including 'render this') will not be included in the response when the selector matches another script. I would also suggest renaming dynamicComponent.dynamic.jsp to simply dynamic.jsp. I have changed to dynamic.jsp, yes, it starts to show some right thing. At least this "rend.dynamic.html" -->...

Views

758

Likes

0

Replies

0
How to let the dispatcher not cache certain component?
Avatar

Rui_J

Rui_J
- Adobe Experience Manager
Hi I have a componenet that has some dynamic content. And I don't want to dispatcher to cache this part. So inspired by http://www.slideshare.net/netceteragroup/dynamic-components-using-singlepageapplication-concepts-in-aemcq-39532610 (Page 4), This is what I did, under apps/myapp/dynamicComponent, I have a two files, one is dynamicComponent.jsp and the other is dynamicComponent.dynamic.jsp, So in dynamicComponent.dynamic.jsp page, I have some JSP code to render the dynamic content. and in dynam...

Views

3.3K

Likes

2

Replies

7
Angularjs not binding on second component when there are two same components are on the page
Avatar

Rui_J

Rui_J
- Adobe Experience Manager
Hi, I created a very simple component, in side the component, I am using angularjs just to render a simple hello world. This is what I did, I create a component from CRXDE. On the jsp page, this is the code I wrote. <%@include file="/apps/pwc/global.jsp" %> <% String clientID = currentNode.getIdentifier().replace("/", "_").replace(":",""); %> Hello {{helloTo.title}} ! angular.module("myapp_<%=clientID%>", []) .controller("HelloController", function($scope) { $scope.helloTo = {}; $scope.helloTo.title = "World, AngularJS"; } ); But Only the first component showing the correct binding (Hello World, AngularJS), and the second component only shows Hello ...

Views

1.8K

Likes

0

Replies

2
Re: workflow always in RUNNING state even though the workflow process finishes
Avatar

Rui_J

Rui_J
- Adobe Experience Manager
[img]2015-02-21_20-39-46.png[/img] And this is the Working flow instance. It is always in RUNNING status

Views

959

Likes

0

Replies

0
Re: workflow always in RUNNING state even though the workflow process finishes
Avatar

Rui_J

Rui_J
- Adobe Experience Manager
This is what I have. For example I start this workflow for one page for example /content/mysite/en.The workflow is supposed to finish without any user participation. I checked the log, everything runs without error. But if I switch to workflow instance tab, I can see that this workflow is still in RUNNING status. I cannot start other workflow for this page because this workflow somehow is still running. Why is this happening?Sorry, I dont know how to attach multiple pictures, So I add a new repl...

Views

964

Likes

0

Replies

0
Re: workflow always in RUNNING state even though the workflow process finishes
Avatar

Rui_J

Rui_J
- Adobe Experience Manager
I don't want to manually terminate it. I need it complete automatically without any manual process. Is there any thing I did wrong in my code?

Views

956

Likes

0

Replies

0
Re: workflow always in RUNNING state even though the workflow process finishes
Avatar

Rui_J

Rui_J
- Adobe Experience Manager
Yes, I can see its statsus is RUNNING in the instance tab. But this workflow should be completed without any manual work. How can I do that?

Views

966

Likes

0

Replies

0
workflow always in RUNNING state even though the workflow process finishes
Avatar

Rui_J

Rui_J
- Adobe Experience Manager
Hi, I am writing a workflow. This is my Code, In workflow, I put a "Process Step" in a workflow called "my workflow", check "Handler Advance". Then I start the workflow on this page, The code does the job. But if I switch to http://localhost:4505/libs/cq/workflow/content/console.html Instance tab to check the workflow instance, I found that "my workflow" is still in RUNNING state. What did I miss here?package com.mycompany.workflow; import com.adobe.granite.workflow.WorkflowException; import com...

Views

3.5K

Likes

0

Replies

9
Custom widget grid panel problem.
Avatar

Rui_J

Rui_J
- Adobe Experience Manager
Hi, I am trying to write a custom that contains a gridpanel. This gridpanel loads some static data. And this is the code I have.When I load it, nothing shows up.[img]2014-08-11_9-32-42.png[/img] Can anyone tell me what the problem is?Thank you.Ejst.ContactSearch = CQ.Ext .extend( CQ.form.CompositeField, { /** * xtype: hidden store real value file: this is json format * {url: '/content/sample', text: 'sample'} */ valueField : null , userPanel: null , constructor : function(config) { config = conf...

Views

658

Likes

0

Replies

1
sidekick not showing up because not included head.jsp?
Avatar

Rui_J

Rui_J
- Adobe Experience Manager
Hi, I am a newbie to CQ5 and I am trying to follow this tutorial to create a simple page with a sidekick. http://dev.day.com/docs/en/cq/current/howto/website.html This is my contentpage.jsp <%@include file="/libs/foundation/global.jsp"%><%%><%@page session="false" contentType="text/html; charset=utf-8" %><%%>And I found something weird. If i remove cq:include head.jsp, the sidekick will not show on the page. I wondered why? If this is a mandetory on the page, what else are mandetory? Thank you

Views

537

Likes

0

Replies

1
Resizing image question
Avatar

Rui_J

Rui_J
- Adobe Experience Manager
Hi, I just get a small CQ5 project of resizing the smartImage. Right now, I have two options. One Node jcrContent = currentNode.getNode("image/jcr:content"); String imagePath = jcrContent.getPath(); Resource imageRes = resourceResolver.getResource(imagePath); Image img = new Image(imageRes); img.setItemName(Image.NN_FILE, "image"); img.setSrc(img.getPath()); img.setSelector("img");Once it is done, i will just use to display a easy resized picture.Option Two, extend the AbstractImageServlet to d...

Views

332

Likes

0

Replies

1
Re: How to use POJO in Sling taglib?
Avatar

Rui_J

Rui_J
- Adobe Experience Manager
smacdonald2008 wrote... All back end OSGi bundles must be active for front-end components (ie - JSP) to communicate with them. When you have red like that -it means that there is a missing dependency - in this case - the version may be causing the issue. Remove the version from the MF file as stated in a previous answer. OK, after followed goffinf's link https://github.com/Adobe-Consulting-Services/com.adobe.acs.bundles.sling-models/releases/tag/com.adobe.acs.bundles.sling-models-1.0.2 I have in...

Views

61

Likes

0

Replies

2
Re: How to use POJO in Sling taglib?
Avatar

Rui_J

Rui_J
- Adobe Experience Manager
justin_at_adobe wrote... Your model class needs to be in an OSGi bundle with the appropriate bundle header. It cannot be just a bare Java file in the repository. I have put my model class in the bundle class. package com.techsharp.mytestweb.model; import javax.inject.Inject; import org.apache.sling.api.resource.Resource; import org.apache.sling.models.annotations.Model; @Model(adaptables=Resource.class) public class MyDataModel { @Inject private String firstname; public String getFirstname() { r...

Views

2.4K

Likes

0

Replies

5
Re: How to use POJO in Sling taglib?
Avatar

Rui_J

Rui_J
- Adobe Experience Manager
goffinf wrote... Hmmm I thought if you want to access the Sling resource associated with the request URL you would need a sling:defineObjects somewhere in your JSP ? That aside, I assume you did actually install the Sling Models OSGI bundles ? Fraser. I added the but no luck.I put this model java class within the component folder if this is what you mean by sling model osgi bundle..

Views

2.4K

Likes

0

Replies

8
Re: How to use POJO in Sling taglib?
Avatar

Rui_J

Rui_J
- Adobe Experience Manager
goffinf wrote... So in your JSP, what is ${resource} ? Fraser. I am not sure about this. Isn't it the implicit object in cq5?

Views

2.4K

Likes

0

Replies

10
Re: How to use POJO in Sling taglib?
Avatar

Rui_J

Rui_J
- Adobe Experience Manager
goffinf wrote... One thing that jumps out immediately is that your adaptTo class name is myDataModel (note the lower case 'm'), whereas you actual class name is MyDataModel (upper case 'M'). HTHs Fraser Thanks, thats one mistake I made. I have updated the class name in JSP page,but still it is not showing up.

Views

2.4K

Likes

0

Replies

12
How to use POJO in Sling taglib?
Avatar

Rui_J

Rui_J
- Adobe Experience Manager
Hi, I am trying to use POJO in sling taglib in CQ5 component. First, I created a component, called "myDataModel" Then I have a dialog with a textfield named "firstname", this is the my dialog.xml Then I create my POJO model classpackage apps.mytestweb.components; import javax.inject.Inject; import org.apache.sling.api.resource.Resource; import org.apache.sling.models.annotations.Model; @Model(adaptables=Resource.class) public class MyDataModel { @Inject private String firstname; public S...

Views

2.8K

Likes

0

Replies

14
Custom widget property problem
Avatar

Rui_J

Rui_J
- Adobe Experience Manager
Hi,I am trying to wirte a simple custom widget extending CQ.form.ColorField, this is my code. ColorScheme = CQ.Ext.extend(CQ.form.ColorField,{ constructor: function(){ ColorScheme.superclass.constructor.call(this,{ colors: ['FF9900'], showHexValue:true }); } }); CQ.Ext.reg('colorscheme', ColorScheme);When I reference this in my jcr and tried to set fieldLabel, it never picked up my fieldLabel value on the page. And fieldLabel only works when I set the value in the constructor. Can someone help m...

Views

402

Likes

0

Replies

1
Likes given to