Provide alternative JSON renderer? Without losing default JSON renderer?

REQUIREMENT
Construct some custom JSON rendition of a page. For example: /content/site/page.my.json
And we want to accomplish this without losing the out-of-the-box functionality:
/content/site/page.html - WORKS OUT OF THE BOX
/content/site/page.json - WORKS OUT OF THE BOX
WHAT WE'VE TRIED
We've added a jsp to our global page template and named it my.json.jsp. This has given us this behavior:
/content/site/page.my.json - INVALID RECURSION SELECTOR (the request gets handled by default json renderer and "my" is not a valid recursion selector)
/content/site/page/_jcr_content.my.json - WORKS (we can see our custom json renderer working), but we have other reasons we cannot use this URI.
So we're nearly there. Next, we add "json" to the list of extensions that are treated with default resolution behavior, by going to felix config and editing the "Apache Sling Servlet/Script Resolver And Error Handler:
By doing this, now our custom json WORKS, but we get the following results:
/content/site/page.my.json  - WORKS (our custom JSON renders)
/content/site/page.json - DOESN'T WORK (html is rendered rather than the default JSON renderer)
How can we provide this custom renderer at *.my.json without losing the functionality of the default  *.json renderer, necessary for dialogs in the page properties, etc.
Thanks!

Assuming your are using OOB page component.
After adding a jsp to our global page template and named it my.json.jsp.
In order for [0] to work create a file at [1] having contents [2]. I would advise to overlay at /apps instead of modifying at /libs.   Please refer sling url-to-script-resolution and our training material for more details.
[0]   /content/site/page.my.json
[1] /libs/foundation/components/primary/cq/Page/Page.json.jsp
[2] <%@include file="proxy.jsp" %>

Similar Messages

  • I have a few wedding projects(1-2 hours)I am trying to export at full hd quality,than burn in idvd.After rendering for 8hrs I receive error code that states "file is too big". Please help? compressing tips without losing quality?

    I have a few wedding projects(1-2 hours)I am trying to export at full hd quality,than burn in idvd. After rendering for 8hrs I receive error code that states "file is too big". Please help? compressing tips without losing quality? or any other exporting alternatives?

    Hey Z,
    Thank you for the tip on exporting by media browser (large) from imovie. But of course, if it's not one thing it's another. Now that I figured how to export a large file from imovie, I have an idvd issue. I followed the instructions for burning from idvd and changing the encoding to professional quality and the burn speed to x4, but I am receiving an error that states the following,
    Your project exceeds the maximum content duration. To burn your DVD, change the encoder setting in the Project Info window.
    Project:
    - total project duration: 79:04 minutes
    - total project capacity: 4.327 GB (max. available: 4.172 GB)
    Menus:
    - number of menus in project: 1 menus
    - total menu duration: 0:39 minutes
    - total menu capacity: 37.370 MB
    Movies:
    - total movies duration: 78:25 minutes
    - total movies capacity: 4.291 GB
    I have searched in the idvd forum for similar issues and I am stumped at this point. I have tried deleting the encoding assets and re launching idvd with the changed preferences, and still the same error. I know you mentioned something about free hard drive space available, and I have very little left. 4GB to be exact due to massive hours of non-edited footage. I am not sure if this is why, but I do not recall ever needing free space to burn memory onto a separate dvd. I would be more than happy if I am wrong, and it would be a quick fix. Otherwise, the technical nightmare continues. It's all a learning process and your expertise is greatly appreciated! Thanks in advance.

  • I would like to change the colour of bars in a chart without losing the underlying default texture associated with my chosen theme. None of the 3D textured fills offered in "Chart Colors" match the textured fill of the theme. Any suggestions?

    I would like to change the colour of bars in a chart without losing the underlying default texture associated with my chosen theme. None of the 3D textured fills offered in "Chart Colors" match the textured fill of the theme. Any suggestions?

    Thanks Gary, but no, that does not work. First of all, I can't select each bar individually. When I click on one bar, all three bars are selected.
    When I use "inspector > graphic" I have 5 fill options: none, color, gradient, image, tinted image. The default selection for the theme I'm using is image. What I would like to use for my charts is the same image that this theme uses for table headers. It has the same texture as the chart, but a different colour. Using anything but image or tinted image removes the texture from the fill.
    I have found I can do one of two things. I can select tinted image from the fill selections in "inspector > graphic" or I can select 2D Image Fills from "inspector > chart > chart colors". The first choice does not allow me to match the table header colour because it only allows me to apply a tint to the existing colour and adjust its opacity. The existing colour has too much influence on the fill, so I can't find an RGB adjustment that will match the table header colour. The image selections from "inspector > chart > chart colors" do not quite match the colour or the texture. Again, I can try to tint the image, but I still can't get it to match and the texture is not the same anyway.
    The image I want to use obviously exists in the software as it is an attribute of the theme, but for some reason is inaccessible. The other angle I have tried is to edit the theme, but I can't figure out how to do that either.

  • How to install linux without losing OneKey default OS instalation

     Hello everyone. I've just bought IdeaPad Y530 and I want to remove Vista from it. I would like to remove both Windows partitions and leave only this hidden one.I would like to install as well GRUB linux loader as a default loader (MBR). My question is : Is it possible to do those things without losing possibility to install VISTA from the hidden partition. IF yes then how to do it? I've got several doubts. Changing partition size, removing VISTA loader from MBR. Even I dislike VISTA, I paid for this soft so I want to keep it. Can I ask a little help?

    Problem is that I would rather expect problems since I read following treads at this forum. 
    http://forums.lenovo.com/lnv/board/message?board.id=ideaPad&thread.id=218 
    http://forums.lenovo.com/lnv/board/message?board.id=ideaPad&message.id=4467&query.id=26921#M4467
    http://forums.lenovo.com/lnv/board/message?board.id=Special_Interest_Linux&message.id=796&query.id=2...
    But it's difficult for me to separate OneKey as a tool to recover OS from OneKey as a thing to regenerate system configuration
    Message Edited by dyschemist on 07-30-2009 07:39 PM

  • HT204053 How do I change the e-mail address default on the icloud without losing the contacts saved?

    How do I change the e-mail address default on the icloud without losing the contacts saved?

    Each iCloud account can only have a single iCloud email account.  As such, you can't have a different email account on your iPod if it is using the same iCloud account. 
    You can create additional alias email addresses within this iCloud account, but they will all receive email in the same inbox as the primary icloud email address.

  • I'm not receiving emails. Internet connection is fine. I was told by my provider that I need to reset my emails. How do I do that without losing all emails in my inbox?

    I'm not receiving emails. Internet connection is fine. I was told by my provider that I need to reset my emails. How do I do that without losing all emails in my inbox?

    Hi..
    If you are using Mac Mail, from the Mail menu bar top of your screen click Mail > Take All Accounts Offline then click Take All Accounts Online.
    You should not lose any unopened or saved mail.

  • UI5 Table JSON Data without columnnames

    Hey there,
    if I want to use JSON Data to be consumed by a SAPUI5 Table the developer guide suggests this format:
    var aData = [
    {lastName: "Dente", name: "Al", checked: true, linkText: "www.sap.com", href: "http://www.sap.com", src: "images/person1.gif", gender: "male", rating: 4},
    {lastName: "Friese", name: "Andy", checked: true, linkText: "www.sap.com", href: "http://www.sap.com", src: "images/person2.gif", gender: "male", rating: 2}];
    But since I have big JSON files I don't want to write the columnname in for each row. It should be specified just by order. So it would look like this:
    var aData = [
    ["Dente", "Al", true, "www.sap.com", "http://www.sap.com", "images/person1.gif", "male", 4],
    ["Friese", "Andy", true, "www.sap.com", "http://www.sap.com", "images/person2.gif", "male", 2] ];
    here is a full example: JS Bin - Collaborative JavaScript Debugging&lt;/title&gt; &lt;link rel=&quot;icon&quot; href=&quot;http://static.jsbin.…
    Is this possible? And how?
    Thank you.

    Hi Andreas,
    i don't think you'll have to worry about optimizing JSON.
    The reason for JSON being preferred is it's lightweight and easy for humans to read & write
    How much would ideally a bunch of 1000 or more than that of extra characters could save the loading time ? It's not gonna be any much difference! And if you remove the column name (object's key), your JSON would become complex to read (naturally/programatically)
    And the format you've suggested is Array of arrays. Though you don't give any column name there, it's gonna take the column name by default as 0...n as below
    A proper JSON would be an Collection of Objects. Objects are supposed to be defined in key:value pairs which you meant as columnName:value.
    Regards
    Sakthivel

  • Can I move my old music from my Nano to my iTunes library without losing it?

    in 10 years 3 computers crashed and I'm the 4th-How do I transfer OLD music from my old Ipod Nano to my iTunes library without losing it. My nano is filled to the brim but I don't want to lose music from CDs I no longer have and the thought of re-purchasing seems crazy.
    Thanks

    The file structure is a little complex. I will use inbox as an example.
    Inbox (a large file with no file extension)
    Inbox.msf ( An index of inbox with tags etc. Can be deleted with only loss of tags)
    Inbox.sdb (a folder, indicating that the folder within Thunderbird has a sub folder.
    POP mail is stored in
    Appdata/Roaming/Thunderbird/Profiles/*.default/Mail/[Server name]/
    Local folder is stored in
    Appdata/Roaming/Thunderbird/Profiles/*.default/Mail/Local Folders/
    As long as you do not overwrite, you can copy and paste whole folder trees into local folders (stuff on your old computer under a mail account is best relocated to local folder and then sorted as necessary afterwards.
    Note that you should delete foldertree.json after making those sorts of copies (it forces a full refresh of the folder tree, no cache) and under no circumstances copy data with Thunderbird running. It can irrevocably corrupt things

  • Exporting a PDF from keynote without losing hyperlinks

    exporting a PDF from keynote without losing hyperlinks
    anyone have any ideas why it doesn't export the hyperlinks to the PDF?
    i only have PDF reader on my machine, not the full PDF creator

    Or, better than that, export the PDF from InDesign as PDF/X-4!
    By default, Acrobat and Reader use overprint preview when displaying PDF/X-4 files. Plus you have the benefit of full color management and not having transparency ruined by premature flattening.
    One other note. Other than for the fairly common practice of overprinting black text over colors to avoid halo effects due to registration, one should be exceptionally careful in using overprint. Trapping, the other good, justifiable use for overprint is really best performed by the RIP. Most modern RIPs provide for automatic trapping. Overprint should absolutely not be used as a “poor man's transparency,” especially in conjuction with spot colors. With the advent of real transparency in the Adobe imaging model and hence in Illustrator, InDesign, and PDF, there is no good reason to use overprint hacks anymore to simulate transparency.
              - Dov

  • How to export raw pictures to jpeg without losing the original colors?

    Hello guys,
    Actually I'm facing a problem
    which is I took photos in Raw Format
    but unfortunately when I import it to LR
    it lose its colors
    and here is a video for my problem
    LR's problem - YouTube
    And now I want a solution
    so I can convert it to jpeg
    without losing its original colors.
    Thank you all in advance

    You ask a variation of the age-old question:  “Why did LR ruin my photos?”  It’s because the initial view is what your camera does for its JPG preview that is embedded in each raw photo based on your camera’s settings and the LR interpretation that loads after a second or two, is the raw data interpreted with the Adobe defaults.
    I would guess that your camera is “fixing” the shots somehow, and LR, not knowing what your camera is doing, is just rendering the shots from the raw data as it exists without fixing anything.
    Do you know if the camera was in some special mode that fixes things automatically before creating the JPG?
    If you

  • How do i update the software on an ipad provided by the company without syncing to my itunes?

    I have an iPad2 provided by my employer based out of Arizona. I want to update the software to the most current available. I do not have access to the iTunes account used to set up the device, and if I use my iTunes, I will loose the apps and data installed on teh device when it was issued to me. Is there a way to update the software without knowing my company's iTunes account and password and without losing the apps and data currently on the device?

    Ok, thank you for the prompt response. I guess I will ahve to send it back to corporate for them to update.

  • Convert RTFD to Doc (without losing images)

    Hello!
    Is it possible to convert RTFD-format files to Microsoft Word (doc) format - without losing images?
    As a longtime Mac user, I have a multitude of RTF and RTFD files. I want to be able to access the contents of these files on platforms other than OS X (eg: Windows).
    RTFD is not supported outside OS X. I'll qualify this by acknowleding that since RTFD files are OS X Packages, they show up in Windows as a folder containing image files and an RTF file; some people conclude that this is acceptable since, strictly speaking, its readable by windows. I disagree because its fiddly and hack-like rather than simple, recognizable and practical like a .doc file.
    Given that I can open an RTFD file, copy/paste it's content (images and text) to a new blank Microsoft Word document and save it as .doc, it seems to me that I should be able to automate those steps using AppleScript or Automator.
    I've Googled for a solution to this but no-one else is talking about it, with the exception of:
    - the command-line 'textutil' converter, but that creates ascii files that are necessarily stripped of all images
    - converting to HTML, but that creates more than a single file (an HTML file plus a folder containing the images)
    Am I missing something really obvious?
    Many thanks!
    Peter

    Hi duncang!
    The command-line 'textutil' app strips out images and so is useless for my purposes. As you pointed out, the solutions suggested by MrHoffman and Etresoft are incorrect.
    A solution for my original post for this thread: use Apple's Pages for Mac (part of the iWork '09 Suite). I have succesfully converted thousands of RTFD files containing images into Microsoft Word (.doc) format.
    If you have a lot of RTFD files to convert, then I recommend using an applescript to automate the process.
    The applescript wizard Yvan Koenig (link) has very kindly provided a useful applescript for Pages '09 to automatically convert batches of RTF and RTFD files into Word or PDF. That guy knows what he's talking about and should be knighted for his efforts and kindness.
    Look on his Box dot net public folder (link) for a file called 'batch_Pages2Doc.zip' (created Jan 31 2013). Here is the path to the file: / for_iWork'09 / for_Pages09 / batch_Pages2Doc.zip
    - open the script in 'AppleScript Editor' on your Mac
    - read the useful instructions he provides in comments within the script
    - save it as an application so you can use it as a droplet onto which you can drag multiple RTFD files
    - you can even edit the script using his instructions so it exports PDF as well as Doc
    - it saves output to a 'wasPages_now_doc' folder on either your desktop or in your Documents folder
    I'm running:
    - Mac OS X 10.8.4
    - iWork 2009 (retail boxed edition, not Mac App Store edition)
    I hope this helps. It took me months to discover the solution to my original post.
    -Peter

  • Installing Maverick on my Mac lost almost all of the calendar entries. They are still on my iPhone and new entries move freely to both devices via iCloud. How do I get the entries from my iPhone to iCloud without losing them from iPhone?

    Like many others after I installed Maverick I found that all the calendar history has been lost and most of the forward info has also been lost. Also in order to get calendar, contacts and notes to sync with the iPhone I have had to move to iCloud. Contacts and notes sync fine. new calendar entries sync ok. My iPhone has all the calendar entries that were on the Mac before I installed Maverick. So far iCloud has not overwritten them nor have they synced onto iCloud.
    How can I get all the entries from my iPhone onto iCloud, without losing the only copy of my calendar from my iPhone?
    Thanks Apple for deciding to take over my privacy. I do not want this data stored on a US based server. Fortunately Mail still syncs via my own email provider. I guess Apple will find a way to stop that soon too!

    Greetings Nefertiti72,
    It seems you are experiencing an issue with contact syncing and management. It seems you've removed an email account which contained a number of contacts that are not associated with your iCloud account. I have linked to a knowledge base article which provides more information about iCloud contacts syncing:
    Get help using iCloud Contacts - Apple Support
    Learn what to do if you’re having issues using iCloud Contacts. For example, you might make changes to Contacts that don't update across all of your devices.
    You may want to consider importing the contacts from the email account you removed. You can do it easily by following the steps in this article:
    iCloud: Import a vCard
    You can import an electronic business card, also called a vCard, into iCloud Contacts. If the vCard contains contact information for more than one person, each contact becomes a separate entry.
    In iCloud Contacts, choose Import vCard from the Action pop-up menu , which appears at the bottom of the All Contacts list or a list of group contacts
    Select a vCard to import.
    The contacts from the vCard are added to the All Contacts group in Contacts. You can add the contacts to any other group by dragging them to the desired group.
    Thank you for contributing to Apple Support Communities.
    Best,
    Bobby_D

  • HT5622 My family has multiple phones on one apple ID. Is there a way of switching it so we each have our own ID without losing everything?

    My family has multiple phones on one apple ID. Is there a way of switching it so we each have our own ID without losing everything?

    Hi ndmulderx,
    If I understand correctly, your family has been sharing a single Apple ID and now you want to give everyone an individual Apple ID without losing any content. You can do this with Family Sharing. The article below provides details about the feature which will allow you to share purchases between family members, create shared photo albums and much more.
    Family Sharing
    Cheers!
    -Jason

  • I want to set up my time capsule on a completely new network & location without losing the old backups. How do I do this?

    I want to set up my time capsule on a completely new network & location without losing the old backups. How do I do this? I cannot find anything in the user manual.

    The TC is very hard to just move.. it retains too much of the old network setup.. buried deep in the bowels of the firmware configuration files.. or even on the hard disk special partitions used by the TC.. invisible to you btw.. !!
    Do a factory reset and setup from scratch.
    That factory reset will have no affect on your backups.. even if you rename the TC.. not a bad things since you also want clients to respond to the new network.. simply reset TM to the new TC name and location.
    See A4 here.
    http://pondini.org/TM/Troubleshooting.html
    Factory reset.
    The Factory Reset Gen1-4.
    Unplug your TC. Hold in reset. and power the TC back on.. without releasing reset for about 10sec. When the status light flashes rapidly; release it.
    Be Gentle! Feel the switch click on. It has a positive feel..  add no more pressure after that.
    TC will reboot after a couple of minutes with default factory settings and will wipe out previous configurations.
    No files are deleted on the hard disk.. No reset of the TC deletes files.. to do that you use erase from the airport utility.
    Factory reset Gen 5
    Hold in reset for about 5sec until the status light flashes quickly.
    If your AirPort Time Capsule still doesn’t respond, do a similar reset to the Gen1-4.
    Unplug your AirPort Time Capsule .. hold in reset and power the TC back on.. without releasing the reset.. wait until status led flashes rapidly.

Maybe you are looking for

  • Free app to search contacts by multiple fields, then dial/send the desired found contact?

    I've got a few thousand contacts. Some I know the company name (organization) or street or city, etc.. I found one app called Contact Finder that searches effectively, but doesn't allow you to do anything once you've found what you're looking for.

  • Oracle HTTP Server and mod_plsql

    Hi there, I have a problem using HTML DB on a small network. LAN consists of two computers with Windows XP Professional, Service Pack 1. Server has two NIC. One connected to the local internet provider (PPPoE) with TCP/IP set to "Obtain an IP address

  • Can you move RAID sets around in Xsan?

    Hi All, My apologies if this is a dumb question--I haven't been able to find this anywhere. Given a SAN, if I shut it down, physically swap two RAID sets, and fire it back up, will Xsan still see everything just fine, or will I have just ruined my SA

  • JSP - Displaying Graphs and Charts.

    Can any body help to display a Graph or a Chart in a JSP. The source data can be static or dynamic data. TIA shrini

  • Larger Cursor on the Front Panel

    Hello,  I wanted to know if anyone knows how to make the mouse cursor on the front panel larger.  I looked at the Cursor VIs built into LabVIEW, but it seems none of them actually change the size of the cursor, but just the cursor image. Thank you, R