How to avoid extra div tags, when we add components using cq:include

I tried using the below code in my component jsp from forums to remove those extra div tags when we try to add components using <cq:include tags.
<%
   if (WCMMode.fromRequest(request) != WCMMode.EDIT && WCMMode.fromRequest(request) != WCMMode.DESIGN) {
       IncludeOptions.getOptions(request, true).forceSameContext(Boolean.TRUE);
%>
But this code helped to remove most of the extra div tags , but still adds this extra div tag to the first component I add using  <cq:include tag.
its a basic and very critical necessity to maintain our markup design,But due to this  dynamically added extra div tag will hinder the html and css behaviour of the page.
Appreciate your help to resolve this issue.
Thanks

Hi,
Can you try below if you really dont want to include anything during include.
<%
IncludeOptions opts=null;
   if (WCMMode.fromRequest(request) != WCMMode.EDIT && WCMMode.fromRequest(request) != WCMMode.DESIGN) {
opts= IncludeOptions.getOptions(request, true);     
opts.forceSameContext(Boolean.TRUE);
opts.setDecorationTagName("");
%>
Thanks,
Pawan

Similar Messages

  • Sorry about first try : how to avoid html-text tag converting & to & amp;

    subject
    how to avoid html:text tag converting "&" to "& amp;"?
    body
    hi,
    i have some values on DB like "& #351;" and when i use html:text to
    show binding's value, html:text converts "&" to "& amp;". in generated
    html, it looks like "& amp;#351;".
    how to avoid this conversion?
    thanks...
    Ayhan G�ng�r
    note: i use white-space among special characters because browser renders them. ex : (& amp; to &)

    hi, i use property attribute of html:text.
    property is declared in UIModel xml file.
    i mean, i don't use something like
    <html:text value="data"/>i use just like
    <html:text property="bindingName"/>and value is shown in generated html input tag as value.
    html:text has no attribute like filter.
    i think i should override html:text tag, and create a new tag that checks if value includes "& #351;" this type data. If there is, don't convert "&" to "& amp;"?
    any suggestions?
    thanks...
    Ayhan

  • How to avoid submitting a page when tabular form rows are empty

    Hi,
    I have a master detail form in my application. There are 2 tables that are used Table A and Table B. Table A contains Ticket number and Table B refers to Table A through a foriegn key and Table B have columns like Date,Name, Age, ticket_id (that refers to the ticket_number of the Table A).
    This is how the application works:
    In a page there is a field for Ticket Number, once the user enters the Ticket Number and click Add Details, a tabular Form with 5 empty field appears... (Done through Page Process->Data Manipilation->Add Rows)
    This form contains fields Date, Name and Age. Once the user fills in all the details and click Submit button, the page is submitted. Whatever values that was entered is saved in Table B. Page Sucess message appears. This works fine.
    But once the Ticket Number is entered and Add Details is clicked, and without entering the values in the Tabular Form, if Submit button is clicked, there is no error showing up neither I see Page success message. But this should not be allowed. There should be some error showing up...
    Tabular Form Validations works only when user enters some values in the Tabular Form and click Submit. For the above scenario, where the form is untouched the validation doesnt work.
    How can I get this done? Any ideas?

    Hello Suzi,
    >> if (document.wwv_flow==null)
    The document.wwv_flow is an object representing the current form that was just rendered on your screen. As such, it can never be null.
    >> How to avoid submitting a page when tabular form rows are empty
    The correct way, especially for versions prior to APEX 4.0 is to use JavaScript, but for that, you need to know and understand how APEX generates your tabular form, HTML wise.
    To be very brief, APEX attached a unique ID to every updatable cell in the tabular form, using a certain pattern – each updatable column is getting a unique name (e.g. ‘f01’,’f02’ etc.) and the ID of a cell is a combination of this name with the serial row number the cell is on. For example, a cell on the third row in an updatable column called ‘f04’ will be given an ID of f04_0003. (More detailed explanation, with an example, can be found in my book).
    What you should do is to check these cells according to your validation policy (e.g. is all five row must be filled, is all the columns in a specific row must be filled, etc.).
    Regards,
    Arie.
    &diams; Please remember to mark appropriate posts as correct/helpful. For the long run, it will benefit us all.
    &diams; Author of Oracle Application Express 3.2 – The Essentials and More

  • I'm using Acrobat XI on Windows.  I want to add my company's logotype as a watermark to a PDF document.  How can I do this?  When I add it as a file (jpeg), the logotype is printed on a white square background.  It will be positioned on the PDF document o

    I'm using Acrobat XI on Windows.  I want to add my company's logotype as a watermark to a PDF document.  How can I do this?  When I add it as a file (jpeg), the logotype is printed on a white square background.  It will be positioned on the PDF document on a light, uniform yellowing color. I want this to show through, as if the logotype was stamped directly on the document.  Thanks.age to be completely transparent

    The above was truncated and garbled a bit and I can't figure out how to edit it.  So just to repeat the question a bit more clearly: "I'm using Acrobat XI on Windows.  I want to add my company's logotype as a watermark to a PDF document.  When I add it as a file (jpeg), the logotype is printed on a white square background (because the jpeg is square with a white background of course).  It will be positioned on the PDF document on a light, uniform yellowish color, which I want to show through. I want it to look as thought the logotype was stamped directly on the document.  Thanks.

  • How to add multiple table when creating add on using b1de

    Hi all,
    Plz help me
    How to add multiple table when creating add on using b1de.
    Thanks

    Hi dns_sap,
    Can you explain a little better what you are trying to accomplish? Is it to create UserTables and UserFields in the database, when the addon runs the first time?
    If so, you can use the following code
    Add User Table
            Try
                Dim lRetCode As Long
                Dim oUDT As SAPbobsCOM.UserTablesMD = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oUserTables)
                oUDT.TableName = TableName
                oUDT.TableDescription = TableDescription
                oUDT.TableType = TableType
                lRetCode = oUDT.Add
                '// Check for error when adding the Table: if lRetCode = 0 the table was created; if lRetCode = -2035 the table already exisits
                If lRetCode <> 0 Then
                    oApplication.MessageBox("Error: " & lRetCode.ToString & ", " & oCompany.GetLastErrorDescription)
                End If
            Catch ex As Exception
                oApplication.MessageBox(oCompany.GetLastErrorDescription)
            Finally
                System.Runtime.InteropServices.Marshal.ReleaseComObject(oUDT)
                oUDT = Nothing
                lRetCode = Nothing
                GC.Collect()
            End Try
    Add User Field
    Try
                Dim lRetCode As Long
                Dim oUDF As SAPbobsCOM.UserFieldsMD = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oUserFields)
                oUDF.TableName = TableName
                oUDF.Name = FieldName
                oUDF.Description = FieldDescription
                oUDF.Type = FieldType
                lRetCode = oUDF.Add
                '// Check for error when adding the field: if lRetCode = 0 the field was created; if lRetCode = -2035, the field already exists
                If lRetCode <> 0 Then
                    oApplication.MessageBox("Error: " & oCompany.GetLastErrorCode & ", " & oCompany.GetLastErrorDescription)
                End If
            Catch ex As Exception
                oApplication.MessageBox(oCompany.GetLastErrorDescription)
            Finally
                System.Runtime.InteropServices.Marshal.ReleaseComObject(oUDF)
                oUDF = Nothing
                lRetCode = Nothing
                GC.Collect()
            End Try
    Regards,
    Vítor Vieira

  • How do I turn AppleTV off when I'm not using it?

    How do I turn off AppleTV when I'm not using it?

    It actually goes to sleep instead of powering off. Apple TV only uses 6 watts of power. That would mean 10 Apple TVs would consume the same amount of power as one 60 watt bulb and that's when it's on (not in the sleep mode).
    You can set it to go to sleep after 15 min., 30 min., etc. of inactivity in settings. I think the default is 15 min. That doesn't include watching a movie. You can also put it in the sleep mode in settings, but the easiest way is with the remote.
    Hold the Play/Pause button on the reomte for 5 secs to put it to sleep. This only works from the main menu. To go to the main menu quickly, hold the menu button for 3 secs.
    Source

  • How do you leave your iMac when you're not using it?

    Just curious..
    Hey All..
    I have a 24" iMac 2.8 with a 750GB Hard Drive. I tend to leave it on all the time shutting it down over night probably once a week. I have my settings to turn the display off after 5 minutes and turn off the hard disks "when possible". I just wondered if this was healthy or will it shorten the life expectancy of my pride and joy? I must admit that I do like to leave it on all the time. I leave my Time Capsule on all the time too...should I perhaps shut this down also?
    I have the Applecare program which gives me some piece of mind with my iMac.
    I'd be delighted and interested to hear how you all 'leave' your iMacs when you're not using them.
    Kind regards..
    ~RICKY

    I have my system plugged into a UPS and generally leave it sleeping. There's a window where I have it scheduled to wake up and then sleep again, but it I otherwise sleep it.
    I suspect that sleep probably puts the least wear on your machine and is safe if you have a UPS. FWIW, an early 2007 24" iMac draws 3W of power when it's off, and 10W or so when asleep ( the newer models use less than 6W). During the boot process, power consumption will go 200-220W for ~1 minute. Normal usage it consumes about 100W. Idling, the machine will use between 70-100W depending on the screen brightness, and about 45W if the display is off and machine is idle. Playing something like WoW brings the power consumption up over the 200W mark.
    The mechanical parts wear proportional to the number of times they are used (physical switches), and the electronic parts wear mostly based on the the result of cycles of temperature changes / surges of voltage. Pressing the power-button to power-on the Mac probably puts the most wear on the unit as a whole. That said, under normal circumstances you are not likely to put enough wear on anything but the hard disk to have it fail.

  • I'm trying to view my movies through itunes and apple TV but only a few appear in itunes when i add to library, they include .avi and mp4 files.  Whys have only a few copied and rest wont add to my library, can someone help? Do I need to convert them?

    I'm trying to view my movies through itunes and apple TV but only a few appear in itunes when i add to library, they include .avi and mp4 files.  Whys have only a few copied and rest wont add to my library, can someone help? Do I need to convert them?

    What are the file extensions of the movies that won't import to iTunes
    What video content works in iTunes
    What video content works with iTunes and mobile devices?
    iTunes:
    Video content purchased from the iTunes Store.
    QuickTime and MPEG-4 movie files that end in ".mov", ".m4v", or ".mp4" and are playable in QuickTime Player.
    Video podcasts.
    iTunes Digital Copies.
    iTunes Store Movie Rentals (Requires iTunes 9 or later).

  • Please reply:how to avoid extra trailing spaces while using cursor sharing

    i am using cursor sharing with FORCE or SIMILAR.
    what is the solution to avoid extra trailing spaces without any java code change.
    do we have any option in oracle to avoid extra trailing spaces during the query processing ?
    I am using Oracle 10g
    CURSOR SHARING is a feature in which multiple sql statements
    which are same will have a shared cursor (in the library cache) for an oracle session,
    i.e, the first three steps of the sql processing (hard parse, soft parse, optimization)
    will be done only the first time that kind of statement is executed.
    There are two ways in which similar SQL statements with different condition values can be made to "SHARE" cursor during execution:
    1. Writing SQLs with Bind Variables: SQLs having no hard coded literals in them
    For e.g., the query below
    SELECT node.emp_name AS configid
    FROM emp node
    WHERE emp_no = :1
    AND dept_no =
    DECODE (SUBSTR (:2, 1, 3),
    :3, :4,
    (SELECT MAX (dept_no)
    FROM emp
    WHERE emp_no = :5 AND dept_no <= :6)
    AND node.dept_type = :7
    ORDER BY node.emp_name
    Here all the variables are dynamically bound during the execution. The ":X" represents BIND Variable and the actual values are bound to the SQL only at the 4th step of the execution of the SQL.
    In applications: The queries written with "?" as bind variables will be converted into ":X" and are sqls with Bind Variables.
    2. The CURSOR_SHARING parameter: Only Useful for SQL statements containing literals:
    For eg., the query below:
    SELECT node.emp_name AS configid
    FROM emp node
    WHERE emp_no = 'H200'
    AND dept_no =
    DECODE (SUBSTR (:1, 1, 3),
    'PLN', :2,
    (SELECT MAX (dept_no)
    FROM emp
    WHERE emp_no = :3 AND dept_no <= :4)
    AND node.dept_type = :5
    ORDER BY node.emp_name
    In the query above, there are two hard coded literals H200 , PLN. In this case when the same SQL executed with different values like (H2003 , PLN), oracle will create a new cursor for this statement and all the first three steps ( hard & soft parse and optimization plan) needs to be done again.
    This can be avoided by changing the CURSOR_SHARING parameter which can be set to any of three values:
    1. EXACT: Causes the mechanism not be used, i.e. no cursor sharing for statements with different literals. This is the default value.
    2. FORCE: Causes unconditional sharing of SQL statements that only differ in literals.
    3. SIMILAR: Causes cursor sharing to take place when this is known not to have any impact on optimization.
    So, FORCE and SIMILAR values of the parameter will be helping in cursor sharing and improve the performance of the SQLs having literals.
    But here the problem arises if we use the FORCE and SIMILAR other than EXACT.
    alter session set cursor_sharing ='EXACT'
    select 1 from dual;
    '1'
    1
    alter session set curson_sharing='FORCE'
    select 2 from dual;
    '2'
    2
    alter session set curson_sharing='SIMILAR'
    select 3 from dual;
    '3'
    3
    So, this will give extra trailing spaces in when we retrieve from java method and any
    further java processing based on the hardcoded literal values will fail. this needs lot of
    effort in remodifying the existing millions of lines of code.
    My question is i have to use cursor sharing with FORCE or SIMILAR and can't we do the trimming
    from the oracle query processing level ?
    please help me on this ?
    Message was edited by:
    Leeladhar
    Message was edited by:
    Leeladhar

    Please reply to this thread
    How to avoid extr trailing spaces using Cursor sharing opton FORCE, SIMILAR

  • How to avoid extra page

    HI all,
    I am getting my ouptut in smartforms . But the problem is i am getting an extra page with logo at the end. How to avoid that?
    Here i am using only 2 windows. LOGO window and main window.
    Thanks & Regards,
    Vineel

    Check your main window and see whether there are any blank lines inside your main window... if that is not the case check whether you are using any command and calling the new-page in smartform... if yes.. goto command and un-check the tick box goto next page.
    Close the thread once your question is answered.
    Regards,
    SaiRam

  • How to avoid thread stops ? ( when try to read sockets inputstream ...)

    Hi ,
    When I try to call :
    Socket sok=new Socket (adres,poort);
    the thread looks to stop...
    How to avoid this ?
    Thx for tip etc !

    Take a look at NIO:
    http://www.google.com/search?num=100&hl=en&c2coff=1&q=non-blocking+java+socket

  • How do you make div tags line up in Dreamweaver CS6?

    Is there any way to make the div tags indent so that the opening & closing tags line up vertically?  When use Apply Source Formatting, sometimes the ending tag is at the end of a line of code instead of wrapped to the next line and linked up with its beginning tag.  Are there any settings to make this happen or extensions for this?

    Thank you!  That works if I set the Line Breaks to "Before, Inside, and After."
    However, to help me visually divide each <div> container from the following code, is there anyway to either have Apply Source Formatting:
    Leave the line breaks I've inserted after each </div> tag, i.e., stop removing the link breaks I wanted
    Add another line break after the end </div> tag in my code?

  • How to popup file upload tag when we click on a button?

    Hi All,
    In BSP, How to popup the file upload tag when we click on a button?
    Let us Assume that when we click on open button as mentioned in the below 1st screen shot one popup should open like the below mentioned screen shot2 in the same page?
    Screen Shot1
    Screen shot 2
    Please help me on this.
    Thanks

    if you're using a document class ascircle, that should something like:
    package{
    import flash.display.MovieClip;
    import flash.events.MouseEvent;
    public class ascircle extends MovieClip{
    public function ascircle(){
    init();
    private function init():void{
    stage.addEventListener(MouseEvent.CLICK,clickF);
    function clickF(e:MouseEvent):void{
    Circle.play();
    // if you're adding code to the main timeline, you would use:
    stage.addEventListener(MouseEvent.CLICK,clickF);
    function clickF(e:MouseEvent):void{
    Circle.play();

  • How to avoid security promotion message when opening file in 6630

    Hi, everyone!
    I'm using J2ME to open image in 6630, the code works ,but just got too many security messagebox , every time when i open a folder , open an image, the mobile will promote me a message to confirm this action.
    does anyone know how to avoid this message using java code?
    (not setup in mobile)
    Thank you!
    Any hint or link is much appreciated!

    The "PostToInsecureFromSecureMessage" warning can't be suppressed, it is too important.<br />
    You will get that warning if you go from a secure https connection to an insecure http connection and POST data entered in a form on a secure site is send to an http server.

  • How to avoid sorrouding p tag added by the default text component on editing a text in a page

    We are using Default Text component(foundation/components/text) within a CQ5 Page. The text component is automatically adding a <p> tag surrounding the text in the text area. We would like to control this behavior of auto addition of the <p> tag in the text component. Please suggest us a solution to avoid the <p> tag around the text.
    Here is the brief backgroud- We are doing a migration of html pages into CQ5. The editable sections of the page are converted to CQ5 Text components with in the page. While we are creating the page from the backend, we are not adding the <p> tag surrounding the page. However after creating the page, if users goes to the page and edits a text block within a page, the additional <p> tags are getting added which is disturbing the styling.
    Let us know if we need to provide more information on this.
    Thanks & Regards,
    Vamsi

    Hi Vamsi,
    I am facing same kind of issue.
    As of now I am thinking of overritng the css applied by this <p/> tag.
    If this p tag is fallowing same strucute then though of putting reqular expression to catch hold of this tags on the page.
    Some thing like it always creates with id
    <p id="cq-gen246"></p>
    <p id="cq-gen253"></p>
    <p id="cq-gen254"></p>
    Do you have any better approach..

Maybe you are looking for

  • Apple TV no longer appearing in iTunes

    after months of working flawlessly, Apple TV is no longer syncing to iTunes. It does not appear under Devices. I have checked the Preferences Apple TV tab and although it is set to Look for Apple TVs, none appear. On the Apple TV I checked the networ

  • How to cast an object in JSF?

    I am working on a travel application. A user can have several bookings and a booking can have several components. A component can be either air or hotel. I want to list the user's bookings on the client using JSF datatable. <h:dataTable var="componen

  • How to stop Facebook messages going to iPhone when on iPad

    Hi When I am on Facebook for iPad and I receive a message, is there a way for me to prevent the notification from going to my iPhone as well? I would like to do this without turning all notifications always off, so that when I am not on iPad or iPhon

  • Best free non Apple "message app" for the iPad?

         I have a new wi-fi only iPad and would like to get your input on which of the many "message apps" in the App store is  best for just sending text messages? Do not need other features, just want a basic text messaging app that does not cause othe

  • Design Patterns - download

    Hi friends! i need j2ee design patterns in a single pdf. But in Blueprints section, the design pattern catalog consists of separate link.is there is any link to download design pattern in single pdf? Please inform me regards., sekar