How to make a text as a CQ component?

Hi,
I am a newbee in CQ development, so please bear with me if I ask too obvious question.
I created a template which diplays a title and summary of page in WCM be below.
I originally put these two values of properties into each page node using CRXDE Lite.
------template.jsp---------------------------------------------------------------
<% String currentTitle = currentPage.getTitle();
String summary = currentPage.getProperties().get("summary",""); %>
<h1><%=currentTitle%></h1>
<p><%=summary%></p>
It successfully display the title for each pages in WCM structure. However, when I click into a page from WCM.
I cannot edit the content of summary as I can edit using a CQ component of text. If I want to edit I have to go back to CRXDElite and
browse the page's jcr:content and find the summary property to edit it.
I tried this.
-------template.jsp(what I  tried)-----------------------------------------------
<% String currentTitle = currentPage.getTitle();
String summary = currentPage.getProperties().get("summary",""); %>
<h1><%=currentTitle%></h1>
<cq:text property="text"/>
<p><%=summary%></p>
But it displays CQ component and my text seperately.
Is there anyway I can do this like this?
<cq:text property="text" value="<%=summary%>"/>

Hi,
Try to read documentation from the following links to understand how components work and for sure how to start implementation for them:
-> http://dev.day.com/docs/en/cq/current/developing/components.html
-> http://dev.day.com/docs/en/cq/current/howto/components_develop.html
-> http://dev.day.com/docs/en/cq/current/getting_started/first_steps_for_developers.html
My suggestion is first of all to create a custom component "summary" under  "/apps/yourapp/components/summary" with some dialog to set summary description and of course some summary.jsp to render it on the page. So summary.jsp will contains something like
<% String summary= properties.get("summary", String.class); %>
<p><%=summary%></p>
Finally you need to inlclude in your template.jsp component:
<cq:include path="summary" resourceType="yourapp/components/summary"/>
Then if you open a page in the EDIT mode you should have possiblity open a dialog for this component and specify a summary.
After click ok on the DIALOG value for summary should be present on the page. This is of course quick overview, so better please check link with documentation.
I hope that somehow helps you.
Regards,
kasq

Similar Messages

  • I cannot figure out how to make the text larger on an incoming email.  The finger method doesn't work and I cannot find any toolbar with which to do it.  I could find nothing in settings also.  Plese help and thank you.

    I cannot figure out how to make the text larger in a received email.  The finger method doesn't work and I can find no tool bar as I can for composing emails.  I can find nothing in settings.  Please help and thank you in advance.

    Hi there,
    Download a piece of software called TinkerTool - that might just solve your problem. I have used it myself to change the system fonts on my iMac. It is software and not an app.
    Good wishes,
    John.

  • How to make a text "drawer" in iWeb

    Does anyone know how to make a text "drawer" in iWeb? What I mean is when you click on a hyperlink to read more text, but instead of opening up a new page, it makes the text appear below the link on the same page.

    Anything fancy with iWeb has to be done in the HTML Snippet or after publishing the page.
    Find the code for the drawer, apply it and show us the result.
    Perhaps not the drawer you had in mind but this is something near:
    http://www.wyodor.net/Ajax/
    Here's another one with drawer in the title:
    http://jqueryfordesigners.com/slide-out-and-drawer-effect/
    http://jqueryfordesigners.com/demo/plugin-slide-demo.html
    Found with : [text drawer|http://www.google.com/search?client=safari&rls=en&q=text+drawer&ie=UTF-8 &oe=UTF-8]

  • How to make the text in sub-division

    Hi,
    I am usign text  module in my adobe forms.
    Text in text module contains sub-divisions as a), b) and c). Each sub-division are in a separate line.
    While in pdf, all the sub-division combines and comes a single paragraph.
    What  would be the problem for this issue? Any Idea?
    May I know how to make the text in sub-division as in text  module?
    Thanks,
    Thiyagu
    Edited by: Thiyagu on Oct 26, 2009 7:08 PM

    Hello, experiment with Object - Field tab. Do you have your text field with "allow multiple lines" checked? I guess so. And what about the field format? Plain text or Rich text? Please try:)) Regards, Otto

  • How to make indented text in Muse

    How to: make indented text in Muse, like a list with bullits

    I read on another post that you can do ALT 0149 (WIN) and it will create a bullet in Muse.  I tried ALT+0149 and then ALT then 0149 and neither one created a bullet so I must not be understanding the key shortcuts to create the bullet.
    The above video is not captioned (I'm deaf) so I don't understand how he's creating the bullets.  Can someone explain what I'm doing wrong?
    PS - when videos are made, it would be nice if you brought some kind of graphic on saying (for example) "Press the [whatever] key" so deaf people can see what's happening.

  • How do make the text on a label Bold?

    Simple question: How do make the text on a label Bold?

    use html : label.setText("<html><body><b>TestText</b></body>/html>");
    regards,
    Tim

  • Anyone know how to make vertical text in a table in keynote?

    anyone know how to make vertical text in a table in keynote?

    Just to add a bit more about this question. I have seen in other related questions that this feature (vertical text) is not available in (apparently) the whole iWork09. someone even said that it should be asked to the developers, so they include this feature in iWork10. I find this issue a bit sad. This feature has been present in msOffice since a while, and at least for me, this is quite important for my work. It is also apparently not possible to have different page orientation in the same document, meaning portrait and landscape, so one can have wide tables in a whole page, for example. If this is true, it is again sad, and I just cannot understand why such a basic feature is not available in an already 09 version. I am using only the trial version of iWork, but already in the first day I have discovered that I actually cannot do what I was used to. Again sadly I (and many others I guess) will have to stick to Office until the mac software is fully developed.

  • Help:How to make static text in JTextField??

    How to make a text to be displayed initially on a JTextField, yet we can not change the text (so the text
    is static)?
    The other question:
    How to make an input mask so that a JTextField
    has input pattern of XXX.XXX.XXX.XXX
    (which is the mask of IP Address) ??
    What I know that limiting input in JTextField can be done
    by extending PlainDocument....what about the cases above??
    Please reply if you know.
    Thanks a lot,
    Ted.

    For the first question, just call setEditable(false).

  • How to make a text in a text object Bold at run time

    I would like to make a text in a text object Bold depends on a record value. how can I control that ?
    Edited by: Hagita1 on Jan 18, 2011 10:51 AM
    I found the solution-Thank you

    You should share your solution with the community.

  • After uploading IOS7, all text turned white and is very hard to see.  I can't figure out how to make the text black again.

    After loading IOS7, text turned white.  Very hard to read. Cant figure out how to make it black again.  Thanks for any help.

    chflags -R nohidden /path/to/folder/

  • How To Make Translucent Text In Photoshop?

    Hi, I was wondering, how would I make translucent text like this: http://imgur.com/6RzdZge on top of an image In photoshop? I am a bit new so step by step instructions would be awesome. Thanks!
    EDIT: I just realized that this is probably not in the right section! SORRY!

    This is not the effect you show, although your example shows a mirror image of text. 
    There are a lot of stuff you can do with PS, and everyone at one time starts at zero.  But today there are lots of online tutorials and YouTube how to videos to guide you.  When stuck with specific questions here is the place to answer.  Setting down with a 1 through 30 steps is too time consuming.

  • How to make a text becoming more and more visible?

    Maybe I didn't use google well, but I didn't find anything in the internet what could solve my question.
    I basically want to work with a white background, where a text is on which becomes more and more visible the more it comes closer to the bottom. The tricky thing is, it's for a website, so it has to be responsive for smartphones or tablets for example (first idea: put the white background layer to the front like it makes the text behind it more and more visible/invisible?). Any ideas how to solve that? Would be so great to know.

    I'm not sure what it means to "be responsive for smartphones or tablets"...  People put complex graphics on those things all the time.  They have unprecedented power.
    Photoshop can help you do what you're describing.  What you want is no more complex than putting a gradient mask on a layer so as to create partial transparency.  You could have fading text (as a graphic) or a fading solid color fill that would overlay text rendered by a browser.
    Just some graphic ideas...
    Save as a PNG-24 to get partial transparency that a browser can render.
    -Noel

  • How to make a text file out of a bunch of strings

    Hey Guys,
    Can anyone please tell me how I can make a text file that stores a bunch of strings. I have some strings that store some values. I want to know is there a way so that I can just keep on appending the string values to the text files. Please reply. Any help would be appreciated.
    Thank you,
    Vivek

    boolean appendToFile = true;
    // will create the file if it does not exist...
    // will append to the file (at the end of the file) if it exist
    PrintWriter out = new PrintWriter( new BufferedWriter(
         new FileWriter("term.txt", appendToFile)) );     
    out.println(str);   // print the string and append a newline character
    out.print(str);     // print the string
    out.close()         // close the file when done (release the resource)
            

  • How to make a text field exactly 3 chars wide?

    I have an telephone area code item text field in a form which only can be input 3 digits. How can I make this text field exactly 3 chars or digits wide?
    Appreciate!

    244805,
    What browser are you using?
    I just set up an item with Width & maxWidth of 3, and I cannot type more than 3 characters in it. I also changed Width to 1, and it still worked as I expected.
    As I alluded to in my prior post, the size is approximate - it all depends on the font size used.
    Thanks,
    - Scott -

  • Almost finished!!  How to make JButton Text word wrap??

    Is this possible? If so, how or, where do I go to get the answer. After reviewing the JButton class (which I really don't always understand the leap between the API documentation and the actual code that is derived from it) and its constructors, methods and inherited everything, I cannot seem to find a way to make my text wrap in a JButton.
    It just disappears to the right, but nicely centered.
    Much appreciation.

    This is why you don't post the same question multiple times....
    I answered your question in your other thread, and was all ready to ignore this thread when I saw the dukes.
    Answer is here:
    http://forum.java.sun.com/thread.jsp?forum=54&thread=372505&tstart=0&trange=15
    Cheers,
    Radish21

Maybe you are looking for

  • On RHEL 5.7,  Oracle 11.2.0.3 Client installation error

    Hello Friends, I am getting below error while installing Oracle 11gR2 client on a RHEL5.7 Machine. After I finished the installation by silent mode whenever I am launching the sqlplus /nolog command sqlplus: error while loading shared libraries: libc

  • In upgrade of OBIEE 10g to 11g does one have to merge the RPD.

    In Oracle's documentation they mentioned that the RPD and catalog need to be merged (Section 3.22 and 3.23) . However, i have successfully run upgrade assistant to upgrade the old catalog and rpd. Is there still a need to do the merges. http://itwiki

  • Create a flat file with multiple characters for enclosures

    Hello, we use OWB 11g2 (11.2.02). Now we try to create a flat file with multiple characters for enclosures. The manual wrote: "Enclosures (Left and Right): Some delimited files contain enclosures that denote text strings within a field. If the file c

  • Unable to copy DVD with home movies

    I am able to play a DVD that has home movies on it on my Imac and MacBook Pro. I am not able to import into IMovie to try some editing and I cannot copy or burn another disk to share. The copy company stated there was no copy protection on the disk.

  • Unable to launch captivate after updating windows

    As title, nothing happens when I click the captivate icon. OS : windows 8.1 I've check the application log, and get this error message: Faulting application name: AdobeCaptivate.exe, version: 8.0.1.242, time stamp: 0x543b9a99 Faulting module name: CP