Quantcast
Viewing all 12476 articles
Browse latest View live

disabling a multifield based on selection

Hi  rush_pawan,


I have three tabs dynamically created with the help of ur your suggestion given above. It works fine.

 

I have another requirement. If i select one tab amongt the three, there is a drop down list with values and a multifield(textbox). If select a particular value in drop down list the multifield should be diasbled.

 

It works well for a dialog of xtype dialog.

 

function(box,value){var ans = box.findParentByType("dialog").form.findField("anstext"); disableAnsText(ans,value);}

function disableAnsText(ans,value)

{

   if(value == "date") {

                    alert("anstype value - "+value);

              ans.setDisabled(true);

    }

 

}

 

Now i have 3 tabs in a dialog of xtype tabpanel. How can i achieve the same with the tabpanel.

 

Thanks. It would be of great help  if i get an answer for this.


how to add values to multi valued properties using JSP

Hi,

 

I am able to use a multi valued property in JSP which is populated manually using CRXDE. I am able to set the multi valued property only by completely replacing it, but not by appending values to it.

 

Can you please help me to append values to the multi valued property?

 

Thanks in advance,

Rajesh.

Pass ClientSide Value to Sling:Include

Hello,

 

I have a business requirement to dynamically load content in a page based on the changes of a dropdown list. My client has 100+ pricing elements that would need to be loaded based on the visitor’s selection of a dropdown list. Instead of having my Authors create 100+ separate pages for each pricing element, it seems more efficient to simply create a generic page (with header, footer, content that applies to all pages) and dynamically load the pricing elements somewhere in the page body.

 

What I’m struggling to understand is how to pass the visitor’s selection of the dropdown list (JavaScript against the dropdown’s onchange event seems like the most appropriate) to CQ’s sling:include function to load the appropriate CQ page.

 

In the dropdown list, I can create the Text | Value pair something like this:

 

Content1 | /content/myproject/content1
Content2 | /content/myproject/content2
Content3 | /content/myproject/content3

 

From there, I’m thinking I would use JavaScript and the dropdown list’s onchange event to get the appropriate page URL value and pass it to “mypage.html” and use the sling:include function to load that content inside of the page body.  My questions are:

 

  1. How to I pass the client side value (e.g., /content/myproject/content1) to CQ’s sling:include function so that it’s dynamic?
  2. How do I ensure that when mypage.html is loaded, the CQ dispatcher’s caching mechanism doesn’t cache this dynamic content?

 

Thanks in advance for any assistance.

CRXDE very slow (after removing .crxde)

Hi,

 

I am wondering if there's a way to improve the CRXDE performance?

 

I have done everything mentioned on this article: http://blogs.adobe.com/contentmanagement/tag/crxde-performance/

 

But after removing the .crxde directory under /user, it took more 2 hours to start CRXDE. First 'Initializing java tooling' took more than an hour, then 'Refreshing workspace' took another hour. Is there anyway to speed up the first time opening CRXDE after removing .crxde?

 

Is there any way to stop 'Initializing java tooling' or 'refreshing workspace'?

 

Many thanks!!

need to call servlet from jsp how

generally we specify in action attribute 

 

in cq how to specify the servlet path

 

what should be the folder structure plz explain with an example

Migrating from WebSphere to CQSE - CQ 5.22/CRX 2.2

We are looking at migrating off of WebSphere to a CQSE environment. Currently running CQ 5.3 qwith CRX 2.2 HFP70. I have been able to get a little bit of this to work by creating a CQSE 5.3/2.2 environment, then copying over the repository and modifying the web.xml and other files for repository names and the workspace.xml for paths. I am able to acces CRX - Package Manager and CRXdeLite, but when I try to getto the site from CRXdeLite, I get classnot found messages referrinf to custom taglibs. Oddly, the main CQ login page gives our custom 404 error page, which is a bit encouraging, but obviously the felix bundles are not the same on the CQSE side as the WAS side, and copying them and config over really doesn't work.

 

I was thinking about trying to import the missing and mismatched buindles, but thats going to be a lot of work, and am hopeing there is something easier we can do to perofrm this migration. Would making the CQSE a cluster member work I wonder? and if it did, would we be able to remove the WebSphere memeber and make the CQSE one master, and then remove clustering altogether?

 

Any ideas or shared experiences or suggestions are welcome!

 

Thanks!

How to use currentNode Object in jsp ???

Hi all ,

 

 

I have created a component for leftNav and i have a jsp in it.

The currentNode Object the jsp is returning null.

 

Please let me know why i am getting this .

 

Thanks in advance !!

Migrating Assets to CQ DAM

We are woking on migration of assets (only images) from flat file system (we will get files in folders) to CQ DAM. this is one time migration and the size of the data will be around 60 gb. Please suggest best and fast way (timlines are very low).


Can I use regular expression in JCR QueryBuilder?

I want to find all the pages with cq:tag which end with "/testingtag"

 

is it possible to do so using ?

 

Are there any online tutorial on JCR QueryBuilder?

 

I tried something like that but unfortunately it is not showing what I expected to see

 

fulltext=testingtag$

type=cq:tags

Configure location of .vault directory in FileVault

Hi,

 

Is it possible to override the default location that filevault creates it's .vault directory (currently set to the Home Directory)

 

Thanks!

List component dialog, In List tab 'Build List using' drowdown is not getting expanded

In List component dialog, 'Build List using' allows the author to select pages in different ways and also allows the dialog to open up with a second tab based on the option selected in that drop down.

 

I tried with following scenario:

 

Step 1: Double click the list component

 

Step 2: Select an option from 'Build List using' say 'Fixed List', so Fixed List tab will open up as second tab

 

Step 3: Select few pages

 

Step 4: Click on List tab

 

Step 5: Press OK

 

Step 6: Reopen the dialog, make sure dialog shows two tabs (List, Fixed List) 

 

Step 7: Try to expand the 'Build List using'

 

Will rendering of tabs affect the dropdown??

 

please explain what exactly happening in this scenario

Fail to access CRX with JcrUtils.getRepository

I just started with CQ5/CRX/JCR, so I beg your pardon if asking silly questions.

I'm running a CQ5 Standalone Server (CQ_5_5_Quickstart.jar) on my Windows 7 and am fine with accessing it with my browser and the URL "http://localhost:4502".

Now I try to access it via a Java-client using the JcrUtils.getRepository-method, as described in http://dev.day.com/docs/en/crx/current/developing/accessing_the_crx.html.

But this fails with message:

javax.jcr.RepositoryException: Unable to access a repository with the following settings:

    org.apache.jackrabbit.repository.uri: http://localhost:4502/crx/server

The following RepositoryFactory classes were consulted:

    org.apache.jackrabbit.commons.JndiRepositoryFactory: declined

Perhaps the repository you are trying to access is not available at the moment.

at org.apache.jackrabbit.commons.JcrUtils.getRepository(JcrUtils.java:199)

at org.apache.jackrabbit.commons.JcrUtils.getRepository(JcrUtils.java:239)

at AccessJCR.connectJcrUtils2(AccessJCR.java:32)

at AccessJCR.main(AccessJCR.java:16)

 

I'm not sure about the used URL; I just took it from cited webpage. There is said: "The default server's endpoint URL is http://host:port/crx/server. Make sure you adapt the client-side connection URL in case of customized server installation.".

I didn't customize anything so this should be ok. I will attach the complete Code, hopefully you can give some hints.

 

Regards,

Ulrich

 

[code]

import java.util.*;

import javax.jcr.*;

public class AccessJCR {

      public AccessJCR() {}

 

      public static void main(String[] args) {

           AccessJCR ajcr = new AccessJCR();

           try {

                ajcr.connect();

           }

           catch (Exception ce) {

                ce.printStackTrace();

            }

        }

 

      private void connect() throws Exception {

           //Create a connection to the Day CQ repository running on local host

           Repository repository = org.apache.jackrabbit.commons.JcrUtils.getRepository("http://localhost:4502/crx/server");

        }

}

[/code]

Sling Mapping in etc/map

etc/map for a domain is working for appending the path to the root path(language page). In addition to that, I need to handle other urls which are short in the website but need to prepend with additional path. How do we achieve this?

How to load all checkboxes "checked" initially?

Hi

 

     I am loading a set of checkboxes through xtype:selection  and type: checkbox. As per my requirement initially (first time load) all the checkboxes should be checked.. How can i acheive this. Any help would be appreciable.

 

 

Thanks in Advance

 

Veena

JAX-WS integration within OSGi

Greetings,

 

I'm trying to integrate a component wired together with a webservice call using the JAX-WS API. I'm utilizing JAX-WS request dispatcher to make the service call.

The service call is working as expected from my local eclipse (able to create the service object, place the dispatch call and receive the response back.)

 

The error that I'm getting in the CQ error log:

 

Caused by: org.apache.sling.api.SlingException: javax.servlet.ServletException: java.lang.LinkageError: loader constraint violation: when resolving method "javax.xml.ws.Service.create(Ljava/net/URL;Ljavax/xml/namespace/QName;)Ljavax/xml/ws/Serv ice;" the class loader (instance of org/apache/felix/framework/ModuleImpl$ModuleClassLoaderJava5) of the current class, com/mohegansun/website/api/services/facade/ServicesFacade, and the class loader (instance of <bootloader>) for resolved class, javax/xml/ws/Service, have different Class objects for the type javax/xml/namespace/QName used in the signature

 

The jdk used by my eclipse and CQ instance (local) are both same!

I removed the jaxws-api-2.2.8 and jaxws-rt-2.0EA3 jars from the jre/lib/ext folder, restarted my machine, hoping to get a different error/exception - It still fails with same error!

I'm banging my head against the wall as i write this!

Any help, much appreciated.

 

Thanks,

Sivaram


Nothing shows in sidekick inspite of the design selection

Additional update-  If the same page, I view it in preview and revert back to authoring mode, sidekick gets populated. So preview does the trick of sidekick population but not on all the templates. For few, the sidekick stays empty all times but parsys has the component list from design.

 

Hello,

 

     I have a template which has usual header/footer/leftnav embedded in it. In the body of the template there are two components. First is embedded global headline component and next is a parsys component. I go in design and identify the components that will be part of parsys and save it. There are two things happening here.

 

1. No matter what I do, sidekick doesnot populate at all and is always empty.

 

2. If I directly go to the parsys and righclick on new, another popup comes that lists all the selected component identified in the design. So I can create the content directly from parsys but not from sidekick.

 

Why is sidekick empty? How can that be fixed? I have attached the code.

 

<%@ include file="/apps/homesite/components/global.jsp" %>

  <cq:includeClientLib categories="820subNav"/>

<section id="content" class="container_12 clearfix">

          <aside id="leftSubNav" class="twoCol">

                      <cq:include path="leftnav" resourceType="homesite/components/leftnav"/>

          </aside>

          <div id="content-wrapper" class="tenCol">

        <div id="subIndustry" class="mainPadding">

          <cq:include path="globalheadline" resourceType="/apps/homesite/components/globalheadline"/>

          <cq:include path="subindustries" resourceType="/apps/homesite/components/parsys"/>

          <%--For this section of content created in parsys, sidekick will have video and multiple lists with no links --%>

        </div>

          </div>

</section>

<cq:include path="collateralcarousal" resourceType="/apps/homesite/components/insights/collateralcarousel"/>

 

 

Thanks

Workflow skip button

Hi,

 

I have a question about the workflow complete action. When a user tries to complete a task from his/her inbox, it opens up Complete Work Item dialog. There are three buttons on this dialog, what is the purpose of the "Skip" button? What happens when user clicks this button? It is kind of confusing to our users and we were wondering if we can hide this button some how.

 

How can i hide this button ?

 

Image may be NSFW.
Clik here to view.
http://dev.day.com/content/docs/en/cq/current/workflows/wf-using/wf_participate/_jcr_content/par/procedure_6/proc_par/step_0/step_par/image.img.png/1329236015000.png

How to post a form to a servlet in CQ5.5?

Hi all,

  I'm using CQ5 to develop some things. and now i am not so clearly how to post a 'FORM' and accept with a SERVLET.

 

  I've seen this 'http://forums.adobe.com/message/4932739#4932739' already, and try it. But once i add a new <input /> like :<input name="age" value="age" />.

and i submit this form, then tell me error: javax.jcr.nodetype.ConstraintViolationException: no matching property definition found for {}age

 

  see the code

   jsp:

     <!-- String action = /content/myproject/en/thanks   -->

    <form id="submitForm" method="post" action="<%= action %>.POST.html" onsubmit="return validate();">

        <input type="hidden" name=":redirect" value="<%=resourceResolver.map(action)%>" />

        <input type="hidden" name=":formpath" value="<%=currentNode.getPath()%>" />

        <input type="hidden" name=":formtype" value="<%=component.getResourceType()%>" />

        <input type="hidden" name="_charset_" value="utf-8" />

        <input name="age" value="26" />  <!-- if i comment this line, it can submit success, otherwise show me Status: 500. -->

        <input type="submit" value="Submit"/>

    </form>

 

  servlet:

    @Component(immediate = true, metatype = false, label = "QuestionnaireServlet")

   @Service

   @Properties(value = {

                    @org.apache.felix.scr.annotations.Property(name = "sling.servlet.methods", value = { "POST" }),

                    @org.apache.felix.scr.annotations.Property(name = "sling.servlet.resourceTypes", value = { "sling/servlet/default" }),

                    @org.apache.felix.scr.annotations.Property(name = "sling.servlet.selectors", value = { "POST" }),

                    @org.apache.felix.scr.annotations.Property(name = "sling.servlet.extensions", value = { "html" })

   })

   public class QuestionnaireServlet extends SlingAllMethodsServlet implements

                    OptingServlet {

 

    protected void doPost(SlingHttpServletRequest request,

                              SlingHttpServletResponse response) throws ServletException,

                              IOException {

          //it seems never call this function.

    }

   }

 

can anybody told me in details ?

@Reference annotation causing customised servlet stop getting called

Hi guys,

 

I noticed that as soon as I add the @Reference annotation in my servlet, the sevlet will not be called when the form is submitted. As soon as I remove @Reference the servlet will be called. But the email will not function because @Reference is required to make the email to work.

 

I have the servlet registered and briefly it looks like below:

 

@Service(value = Servlet.class)

@SlingServlet(

                    resourceTypes = {"myapp/components/content/faqNewQuestions"},

                    methods = {"POST"},

                    selectors = {"email"},

                    extensions = {"html"}

                    )

 

@SuppressWarnings("serial")

public class FAQNewQuestionServlet extends SlingAllMethodsServlet {

 

@Reference

          private MessageGatewayService messageGatewayService;

 

@Override

    protected void doPost(SlingHttpServletRequest request, SlingHttpServletResponse response) throws ServletException, IOException

    {

              response.setContentType("text/plain");

              response.getOutputStream().print("FAQNewQuestionServlet is called");

    }

}

 

MessageGatewayService is imported through:

import com.day.cq.mailer.MessageGatewayService;

 

This package is added to the .bnd file under:

Import-Package: ..., com.day.cq.mailer, org.apache.felix.scr,org.apache.felix.scr.annotations,...

 

the faqNewQuestions.jsp (which lives under apps/myapp/components/content/faqNewQuestions) has a form looks like this:

 

<form method="POST" action="<c:out value="${resource.path}" />.email.html">

          <input type="text" id="email" name="email"/>

          <textarea name="question" id="question"></textarea>

          <input class="button" id="questionSubmit" type="submit" value="submit" />

</form>

 

I just keep getting 'Content modified' page rather seeing the "FAQNewQuestionServlet is called" I was expecting.

 

Content modified /content/my-trick/jcr:content/par/faqnewquestions

Status

200

Message

OK

Location/my-trick/_jcr_content/par/faqnewquestions
Parent Location/my-trick/_jcr_content/par

 

Really appreciate any inputs..

How to limit path field selection only to one level?

Hi

 

Requirement:

 

      I have a pathfield where i have set a root path

 

for eg: /content/geometrix

 

 

Image may be NSFW.
Clik here to view.
req1.png

author shud be able to select only among these nodes. he shud not be able to select the child nodes of each individual nodes

 

eg: he can select /content/geometrixx/English

 

Image may be NSFW.
Clik here to view.
req2.png

 

 

but he shud not select child page of English

 

ie : /content/geometrixx/English/Toolbar shud not be assesible to him

 

Image may be NSFW.
Clik here to view.
req3.png

 

 

 

Hope my requirement is clear. Is there anyway we can achieve this.. If we can limit the nodes from expanding; then it would be very useful . Is there any way we can achieve this??

 

 

Thanks

 

Veena

Viewing all 12476 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>