java


Set a CQ5 component to editable or not editable


Is it posible if i want to set a cq5 component editable in page A, but not editable in page B.
For example: at page A, i have C component we allow authors to open dialog and edit the component. But we do not allow authors to open dialog to edit component C on Page B.
I try to research cq:EditConfig link, but It's not enough documentation to resolve my issue.
You can set ComponentContext.BYPASS_COMPONENT_HANDLING_ON_INCLUDE_ATTRIBUTE before the include, and remove it after the include.
Set:
slingRequest.setAttribute(ComponentContext.BYPASS_COMPONENT_HANDLING_ON_INCLUDE_ATTRIBUTE, true);
Remove:
slingRequest.removeAttribute(ComponentContext.BYPASS_COMPONENT_HANDLING_ON_INCLUDE_ATTRIBUTE);
More details are here: https://dev.day.com/docs/en/cq/current/developing/boilerplates.html
You can write a Sling component filter: http://www.cqcon.eu/content/dam/cqcon/Pr%C3%A4sentation_Dominik_Suess.pdf
And you can check the page and the component, and if you want to disable editing, just set the attribute, do the filter, and unset the attribute...

Related Links

Android ListView - divider after nth element
getting error while executing a command line with java
Uncaught TypeError: Illegal invocation
passing values between 2 threads without intrrrupting each other
regex for even no. of single quotes
doFilter method is not running?
error in acessing Neo4j
Getting Location and latitude as 0.0 and 0.0 respectively
payment through paypal without making account in paypal
Maven: How to include ${project.version} in multi-module project
How to handle special characters like “\n” in string reverse?
Import proorblem “hibernate_sequence” table with Generation.type
I need help finding a web element in selenium Java
How to debug a DO_NOTHING_ON_CLOSE failure?
Actionbar with menu for each tab
StackOverFlowError for quicksort Java

Categories

HOME
ibm-bluemix
log4j
jdo
clips
asp.net-core
smarty
vmware
tesseract
grep
sqlite-net-extensions
setup-deployment
amortized-analysis
infragistics
packages
c#-2.0
fancybox
flyway4
uber-api
contact
amazon-cloudformation
gnupg
zend-framework3
php-7.1
gz
windows-server-2012
quickfix
serverless-framework
apache-metamodel
interop
viewport
plunker
custom-wordpress-pages
css-animations
cultureinfo
icloud-api
dxf
android-widget
fish
pepper
chromebook
uninstall
web-api-testing
typo3-6.2.x
subdomains
phonegap
openoffice.org
amazon-kinesis-kpl
normal-distribution
sequential
bower-install
dynamics-crm-2013
reportbuilder
temporary-files
eclipse-scout
arena-simulation
checkboxlist
flashair
wso2carbon
scrollable
dropbox-php
powercli
veracode
lowpass-filter
darcs
nativeapplication
forever
slickedit
google-perftools
qtwebview
sqldf
instant
file-writing
underscore.js-templating
nsfilemanager
firebaseui
fputcsv
bluegiga
uid
lib.web.mvc
cyclomatic-complexity
iis-arr
embedded-code
muse
ibaction
twirl
iiviewdeckcontroller
census
umbraco6
npapi
block-device
qpainter
codeigniter-url
android-nested-fragment
uitouch
hippomocks
stxxl
intentservice
mcts
prettify
xsockets.net
jsctypes
access-rights
ruby-datamapper
dataadapter
padarn
hungarian-algorithm
lcs
http-unit
specification-pattern
e4x
getmessage
wse3.0
qtkit
subscript
adk
php-parser
mercurial-server
data-loss
gcj
coredump
netbeans-7.1
recent-documents
html-input
fluent-interface
infrastructure
data-driven
virtual-functions
xetex

Resources

Encrypt Message



code
soft
python
ios
c
html
jquery
cloud
mobile