Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

MohitKumarK
MohitKumarK
Online

Badges

Badges
17

Accepted Solutions

Accepted Solutions
7

Likes Received

Likes Received
29

Posts

Posts
27

Discussions

Discussions
6

Questions

Questions
21

Ideas

Ideas
0

Blog Posts

Blog Posts
0
Top badges earned by MohitKumarK
Customize the badges you want to showcase on your profile
Re: Json object giving null value after sending json array to the sling Servlet - Adobe Experience Manager 04-11-2021
Hi @Sanjay_Bangar , When doing a ajax call use something like below var square = {};square.length = 10;square.width = 10;$.ajax(url: url,data: JSON.stringify(square),dataType: “json”contentType: “application/json”, ); while reading in servlet you can use like below: String requestBody = request.getReader().lines().collect(Collectirs.joining());you can use any Utils class to convert from string to json or java bean. Thanks!

Views

885

Like

1

Replies

0
Re: junit5 and Mockito tests not injecting the ResourceResolverFactory - Adobe Experience Manager 04-11-2021
Hi @RobertHarper ,while including references as mock objects you need to use injectMocks for your actual servlet class. Take an example myServlet is using ResourceResolverFactory your code would look like below. @MockResourceResolver resolver; @MockResourceResolverFactory factory; @InjectMocksMyServlet myServlet = new MyServlet (); and you can use lenient when method to simulate mock on factory to give resource resolver lenient().when(factor.getServiceResourceResolver(anyMap())).thenReturn(resol...

Views

4.6K

Like

1

Replies

2
Re: AEM 6.5 & Sightly Condition with in list - Adobe Experience Manager 04-11-2021
Hi @SonuR1 , use condition like this${page.title}<\a>in css you can add styles to active class. Thanks!

Views

197

Likes

3

Replies

0
Re: ACS Versioned clientlibs not working in AEM 6.5 - Adobe Experience Manager 03-11-2021
Hi @RamTejaReddy ,We also experienced same problem when we upgraded our AEM version. Please check what is your current version of AEM and ACS commons version you are using.6.5.7 version of aem and above has to use ACS 4.11.2 version or above. Also please check if you have Osgi configuration correct and in right node structure such that it is loading in your instance. Thankyou.

Views

571

Likes

3

Replies

1
Re: Unit Test for a service using JobManger api - Adobe Experience Manager 26-10-2021
Hi @Dody ,You still need to do assertions based on your class that you intended to test. That is the main purpose of writing a test case. In your case you are writing a junit class for a service so you can assert outcome of methods inside it. Please mark correct answer such that wider people can refer this question.Thanks!

Views

320

Like

1

Replies

1
Re: Unit Test for a service using JobManger api - Adobe Experience Manager 26-10-2021
Hi @Dody ,Since you are mocking JobManager and not actually initializing it, you will not get actual working on the service and hence every operation that you do with JobManager has to be handled by you in test class accordingly. Refer this example:@Mockprivate ResourceResolver resolver; @Mockprivate ResourceResolverFactory factory; @InjectMocksprivate MyService myService; now if someMethod() in myService is calling factory.getServiceResourceResolver() method you have to tell your test method wa...

Views

343

Likes

2

Replies

3
Re: Mocking JobManager in junit unit TEst - Adobe Experience Manager 26-10-2021
Hi @Dody ,You have to use @Mock for JobManager and after this line @InjectMocks for private MyCustomService myCustomService = new MyCustomService () which inject all your mocks to your service mock. @Mockprivate JobManager jobManager; @InjectMocksprivate MyCustomService myCustomService = new MyCustomService (); Just curious, you said you are myCustomService, by the name it implies you are testing a service (which could be a interface). Does this line is valid private MyCustomService myCustomServ...

Views

512

Like

1

Replies

1
Re: Unable to edit the custom dependent editable input field for RTE. - Adobe Experience Manager 25-10-2021
Hi @swathialeti , You can create a cq:dialog on what field you required to be shown in RTE plugin and then a js has to be written to handle showing of dialog in plugin, reading presaved values and saving values. This js has to be added to "cq.authoring.dialog.all" for it to load in RTE. Refer to http://experience-aem.blogspot.com/2019/04/aem-65-touch-ui-rte-rich-text-editor-structured-content-plugin-creating-tooltips.html on steps to create a custom RTE plugin. Thanks!

Views

306

Like

1

Replies

0
Re: Selectbox with dynamic datasource in multifield - Adobe Experience Manager 25-10-2021
Hi @Reini- ,Can you share how the values are saved in component node (crx/de).Thanks!

Views

287

Like

1

Replies

1
Re: com.adobe.granite.workflow.WorkflowException: Document is in a disposed state! - Adobe Experience Manager 25-10-2021
Hi @SebasRios34 ,Can you please provide saveDocumentToFilesystem this file or else what is the line at 81, just to see what can be the issue.Thanks!

Views

225

Like

1

Replies

0