XML FORM  -  How to save read-only controls with a default value

Hello everybody,
I have a 3 xml forms, each one to create one type of news. I need to use 3 because each of this forms has their own controls. But the control which indicates the type of news (asociated with a KM Predefined Property) must be common in the 3 forms, in order to use it on searches.
The question is, how can I include in this forms a control:
  - Visible for the user
  - With a default value defined in the control properties (each form has a different value, corresponding with the type of news)
  - Read-only mode
  - The value showed in the control must be saved in the associated KM Predefined Property when the user clicks the Save button. 
Anyone knows how to do this?
What control can I use?
I was thinking of trying with text boxes, but I don't find the way to make them unwritable (Read only mode).
It is posible using labels?
Thanks.
Kind regards

Hello Jose,
I know you responded with a question... I see it in the email, but I don't see it here!  Very odd... but in response:
The first thing I do when I open the Edit.xsl file is do a 'find' for the name of the text field that I want to be read-only (in my test case, it's 'location').  Repeat the find until you see something like:
[code]<!--
field location
-->[/code]
Below there is where I put the new code.  Mine looks like this:
[code]- <xsl:choose>
- <xsl:when test="location='' and ($editmode='create')">
- <xsl:choose>
- <xsl:when test="./xf:ValidationError/@tagname='location'">
- <input name="location" size="30" type="text" class="urEdfiTxtEnbl" id="field_1157467268006">
- <xsl:attribute name="tabindex">
- <xsl:choose>
  <xsl:when test="$accessibilitymode='true'">21</xsl:when>
  <xsl:otherwise>3792</xsl:otherwise>
  </xsl:choose>
  </xsl:attribute>
- <xsl:attribute name="value">
  <xsl:value-of select="''" />
  </xsl:attribute>
- <xsl:attribute name="readonly">true</xsl:attribute>
  </input>
  </xsl:when>
- <xsl:otherwise>
- <input name="location" size="30" type="text" tabindex="3792" class="urEdfTxtEnbl" id="field_1157467268006">
- <xsl:attribute name="value">
  <xsl:value-of select="''" />
  </xsl:attribute>
- <xsl:attribute name="readonly">true</xsl:attribute>
  </input>
  </xsl:otherwise>
  </xsl:choose>[/code]
I put the <xsl:attribute name="readonly"> in both places (when test, and when not test).  I'm not entirely sure if that's necessary, but that worked for me.
Hope this helps,
Fallon

Similar Messages

  • XML form field should be read only.

    Hi All,
    Can we have a field in a XML form which is read only and the number in field should be incremented every time a new form is created.
    Is this possible.If yes can someone please guide me how.
    Thanks,
    Nikhil Pai

    Hi Nikhil,
    Do u want this property to come in the Edit form also, or only on the show form?
    If its only on show form,
    1. Keep a text file in KM with a starting number say 1000.
    2. While creating the XML form, a KM Service listening to resource creation only in the folders,
    will update a property and also edit the text file and replace the number by 1001.
    So in the show form u will have a unique number for each XML form.
    Regards
    BP

  • How to make read only field in Task list?

    Hi All,
    How to make read only field in Task list?

    This can be done one of two ways:
    1. Customize the form in Infopath, right click your field and disable the control.
    2. Use JavaScript/jQuery on the page to disable the element.
    Andy Wessendorf SharePoint Developer II | Rackspace [email protected]

  • SP2013 and Project 2013 - project files open in read-only mode with no options to edit only Save As

    Hi all,
    Environment:
    SharePoint 2013 (15.0.4420.1017)  RTM
    Windows 8 - Project 2013 (15.0.4433.1506) 32Bit
    Issue details:
    When opening .mpp files stored within SharePoint they are opened successfully within Project 2013 however they are opened in Read-Only mode with no options to edit/check out only Save As.  The
    same outcome is experienced if you click the document link within SharePoint or you chose to edit from the document menu. 
    Opening the file through windows explorer also opens only in read-only mode.
    To date we’ve tested the following
    Windows 7 – Office 2010 = working as expected
    Windows 8 – Office 2010 = working as expected
    Windows 7 – Office 2013 = opening as read only, no prompt to edit
    Windows 8 – Office 2013 – opening as read only, no prompt to edit
    Current thinking is that it is an issue with either the SharePoint Office Documents Class ActiveX control or Project 2013 itself interacting with SharePoint 2013.
    We have tested this in multiple SP2013 environments with the same outcomes.
    The workaround therefore is to save locally and then upload again which is not ideal.
    Unable to find an exact issue match to this.
    Any help with this appreciated.

    Hi Dan,
    For us after investigating this further it was found that using the document menu to edit or checkout and then edit results in the project file being opened in read-only mode. 
    The same issue was present for Visio files.
    Using the FILES ribbon menu results in the document being opened in edit mode successfully in both Project and Visio.
    Please note that we found that this issue only exists within document libraries where checkout is required to edit which was our case.  If checkout is not required the document
    menu can also be used as expected.
    Cheers,
    Dan

  • Read-only radiogroup with default doesn't save state in 2.0

    Hi,
    I upgraded to HTMLDB 2.0 and noticed a change in behavior. Namely, when I have a read-only radio group with a default value and a not-null validation, the validation claims fails although a radio button is selected from the disabled radio group.
    Here's a small app I generated to demonstrate the issue:
    http://htmldb.oracle.com/pls/otn/f?p=34464
    Go there and try to create a new EMP.
    The only things added after the generation are:
    1. Not-null validations on several of the fields
    2. Changed MGR to a "Select List"
    3. Changed DEPTNO to a radio group with these properties:
    a) default value type: static; default value: 20
    b) read-only when: P2_EMPNO is Null
    This used to work fine in 1.6 - namely, the default value got it to the session state and consequently the validation succeeded and the new record was created with the default value.
    It also works fine if the Radio Group is not read-only.
    I was able to fix the problem by adding a calculation to the P2_DEPTNO item to set the default value there. This of course does not show the default on the form for the new record, so I had to keep the default on the item level as well - which is a potential source of bugs when those two defaults somehow get different values (e.g., when I change only one of them and forget about the other) - the user will see one thing displayed while another will be saved. So any solutions involving keeping the default value on only one place AND visible to the end user when creating new records are welcome.
    I haven't had time yet to test with other item types - maybe next week...
    Have a nice weekend!
    Flado

    Scott,
    Yes, in 1.6 this used to work fine - the radiogroup was displayed as disabled, and the default value was selected, and the not-null validation succeeded, and all I did was set the default value of the radiogroup. I have no 1.6 environment anymore to test it, but I'm sure it was working, because after I upgraded to 2.0, it stopped working and I got a bug report from a user very, very quickly :-(.
    By "adding a calculation to the P2_DEPTNO item" I mean "adding a computation of the P2_DEPTNO item to the page". Sorry about me being lazy here. It was (still is, in my production application) a conditional after-submit computation (if <primary key item> is null, set <radiogroup item> to <default value>)
    Thank you for the suggestion. I implemented it in the demo app. What I did was:
    1. remove the default value from P2_DEPTNO
    2. Add an unconditional after-header computation that assigns P2_DEPTNO with the static value 20
    I am able to create new EMPs now, but nothing is selected in the disabled radiogroup on the create page, although the value 20 is saved in the session state before the items are rendered, according to the debug info (you can try it out and see).
    To recap, I still need to keep the default value in two places: default of the radiogroup (to get it displayed on the create form), and in a computation (to set the session state).
    Cheers,
    Flado

  • How to change read only folders into normal ones...i can't get any filed from my harddrive

    how to change read only folders into normal ones...i can't get any filed from my hard drive..it shows read only

    Which HDD are you referring to, an external one, or the internal SSD?
    If external, which format is it in?

  • I am trying to figure out how to save/share only a clip out of an entire project.

    I am trying to figure out how to save/share only a clip out of an entire project. I do not want to delete the rest of the timeline as I want to cut/copy out several smaller clips and save/share them as their own files.  I am working on a copy of my original video, and I know I can just bring the project timeline down repeatedly to isolate this clip by deleting all else, but feel there must surely be a simple way to do this.

    Sirole11
    What version of Premiere Elements are you using and on what computer operating system is it running?
    For now I will generalize the principles involved. If more details needed then, please supply the details of your situation and Timeline track placement.
    You would place the gray tabs of the WorkArea Bar to span just the area to be exported.
    The tabs are set...
    Move the Timeline Indicator to the start of the segment, hold down the Alt key of the computer main keyboard as you hit the left bracket key [
    then
    Move the Timeline Indicator to the end of the segment, hold down the Alt key of the computer main keyboard as you hit the right bracket key ]
    The critical step is to make sure that you have a check mark next to the "Share Work Area Bar Only" option in the export dialog (if the dialog has that option).
    Please review and remember that the answers are in the details.
    Thanks.
    ATR

  • Can someone please tell me how to save a snapsnot taken with Adobe Reader X?

    Could someone please tell me how to save a snapshot taken with Adobe Reader X ?

    After taking the snapshot, you need to open a new document in an application that allows you to paste images.

  • BUG: ADF BC read-only VO with no Key attrs + af:table

    Hello all,
    I've got a bug to report - quite easily reproducable with the HR demo schema. To see it:
    1). Create a new application from the ADF BC + Faces template
    2). Create a read-only VO, use "SELECT employee_id, first_name from employees" and order by "employee_id" - take the defaults for everything - do not set any key attributes.
    3). Create an AM, add the VO to it's data model. Turn off AM pooling in the configuration.
    4). Create a JSPX page. Drag-drop the VO from the data control palette as an ADF read-only table - with selection
    5). Bind the actionlistener of the "submit" button to a backing bean method that just system.out.println's something.
    Now, run the app. Try selecting an employee from the first page (records 1-10) and clicking submit - it works. Now, scroll to the second set of records, select one and click submit - no message appears - the action listener is never called. No errors are thrown.
    Workaround: ensure the VO has employee_id selected as a key attribute.
    My code is at the bottom for reference.
    Cheers,
    John
    untitled1.jspx:
    <?xml version='1.0' encoding='windows-1252'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0"
              xmlns:h="http://java.sun.com/jsf/html"
              xmlns:f="http://java.sun.com/jsf/core"
              xmlns:af="http://xmlns.oracle.com/adf/faces"
              xmlns:afh="http://xmlns.oracle.com/adf/faces/html">
      <jsp:output omit-xml-declaration="true" doctype-root-element="HTML"
                  doctype-system="http://www.w3.org/TR/html4/loose.dtd"
                  doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN"/>
      <jsp:directive.page contentType="text/html;charset=windows-1252"/>
      <f:view>
        <afh:html>
          <afh:head title="untitled1">
            <meta http-equiv="Content-Type"
                  content="text/html; charset=windows-1252"/>
          </afh:head>
          <afh:body>
            <af:messages/>
            <h:form>
              <af:table value="#{bindings.emp1.collectionModel}" var="row"
                        rows="#{bindings.emp1.rangeSize}"
                        first="#{bindings.emp1.rangeStart}"
                        emptyText="#{bindings.emp1.viewable ? 'No rows yet.' : 'Access Denied.'}"
                        selectionState="#{bindings.emp1.collectionModel.selectedRow}"
                        selectionListener="#{bindings.emp1.collectionModel.makeCurrent}">
                <af:column sortProperty="EmployeeId" sortable="false"
                           headerText="#{bindings.emp1.labels.EmployeeId}">
                  <af:outputText value="#{row.EmployeeId}">
                    <f:convertNumber groupingUsed="false"
                                     pattern="#{bindings.emp1.formats.EmployeeId}"/>
                  </af:outputText>
                </af:column>
                <af:column sortProperty="FirstName" sortable="false"
                           headerText="#{bindings.emp1.labels.FirstName}">
                  <af:outputText value="#{row.FirstName}"/>
                </af:column>
                <f:facet name="selection">
                  <af:tableSelectOne text="Select and">
                    <af:commandButton text="Submit" actionListener="#{abc.click}"/>
                  </af:tableSelectOne>
                </f:facet>
              </af:table>
            </h:form>
          </afh:body>
        </afh:html>
      </f:view>
    </jsp:root>abc.java:
    import javax.faces.event.ActionEvent;
    public class abc
      public abc()
      public void click(ActionEvent actionEvent)
        System.out.println("click");
    }emp.xml (View Object):
    <?xml version='1.0' encoding='windows-1252' ?>
    <!DOCTYPE ViewObject SYSTEM "jbo_03_01.dtd">
    <ViewObject
       Name="emp"
       OrderBy="employee_id"
       BindingStyle="OracleName"
       CustomQuery="true"
       ComponentClass="model.empImpl"
       UseGlueCode="false" >
       <SQLQuery><![CDATA[
    select employee_id, first_name
    from employees
       ]]></SQLQuery>
       <DesignTime>
          <Attr Name="_isExpertMode" Value="true" />
          <Attr Name="_version" Value="10.1.3.39.84" />
          <Attr Name="_codeGenFlag2" Value="Access|Coll|VarAccess" />
       </DesignTime>
       <ViewAttribute
          Name="EmployeeId"
          IsUpdateable="false"
          IsPersistent="false"
          IsNotNull="true"
          Precision="6"
          Scale="0"
          Type="oracle.jbo.domain.Number"
          ColumnType="NUMBER"
          AliasName="EMPLOYEE_ID"
          Expression="EMPLOYEE_ID"
          SQLType="NUMERIC" >
          <DesignTime>
             <Attr Name="_DisplaySize" Value="22" />
          </DesignTime>
       </ViewAttribute>
       <ViewAttribute
          Name="FirstName"
          IsUpdateable="false"
          IsPersistent="false"
          Precision="20"
          Type="java.lang.String"
          ColumnType="VARCHAR2"
          AliasName="FIRST_NAME"
          Expression="FIRST_NAME"
          SQLType="VARCHAR" >
          <DesignTime>
             <Attr Name="_DisplaySize" Value="20" />
          </DesignTime>
       </ViewAttribute>
    </ViewObject>appModule.xml:
    <?xml version='1.0' encoding='windows-1252' ?>
    <!DOCTYPE AppModule SYSTEM "jbo_03_01.dtd">
    <AppModule
       Name="AppModule"
       ComponentClass="model.AppModuleImpl" >
       <DesignTime>
          <Attr Name="_isCodegen" Value="true" />
          <Attr Name="_version" Value="10.1.3.39.84" />
          <Attr Name="_deployType" Value="0" />
       </DesignTime>
       <ViewUsage
          Name="emp1"
          ViewObjectName="model.emp" >
       </ViewUsage>
    </AppModule>bc4j.xcfg:
    <?xml version = '1.0' encoding = 'UTF-8'?>
    <BC4JConfig>
       <AppModuleConfigBag>
          <AppModuleConfig name="AppModuleLocal">
             <DeployPlatform>LOCAL</DeployPlatform>
             <JDBCName>local_hr</JDBCName>
             <jbo.ampool.doampooling>false</jbo.ampool.doampooling>
             <jbo.project>Model</jbo.project>
             <jbo.ampool.dynamicjdbccredentials>false</jbo.ampool.dynamicjdbccredentials>
             <AppModuleJndiName>model.AppModule</AppModuleJndiName>
             <ApplicationName>model.AppModule</ApplicationName>
          </AppModuleConfig>
       </AppModuleConfigBag>
       <ConnectionDefinition name="local_hr">
          <ENTRY name="JDBC_PORT" value="1521"/>
          <ENTRY name="ConnectionType" value="JDBC"/>
          <ENTRY name="HOSTNAME" value="localhost"/>
          <ENTRY name="DeployPassword" value="true"/>
          <ENTRY name="user" value="hr"/>
          <ENTRY name="ConnectionName" value="local_hr"/>
          <ENTRY name="SID" value="STGY"/>
          <ENTRY name="password">
             <![CDATA[{904}05DB46A9C39F51D1A4814423FFD9297C71]]>
          </ENTRY>
          <ENTRY name="JdbcDriver" value="oracle.jdbc.OracleDriver"/>
          <ENTRY name="ORACLE_JDBC_TYPE" value="thin"/>
          <ENTRY name="DeployPassword" value="true"/>
       </ConnectionDefinition>
    </BC4JConfig>

    Hi,
    reproduces for me. It appears that the parameter is not applied properly when executing the query.
    Frank

  • Error when opening XLSX file with Excel 2003 SP3, file does open but in read only mode with temporary name

    I am using Excel 2003 SP3 and have the Office 2007 compatibility pack installed.  When I open Office 2007 formatted Excel files (XSLX) directly in Windows Explorer, I receive the following error if I do not have Excel already opened:
    "Windows cannot find '<path to file>'.  Make sure you typed the name correctly, and then try again.  To search for a file, click the Start button, and then click Search."
    Even though I receive the error, the file does open; however, it opens in Read Only mode with a name such as "Xl0000024.xls".  The number seems to increment up each time it happens.
    Now here is the strange part.  If I have Excel already open and try to open the file in Windows Explorer, the file opens fine in Modify mode with no error and with the correct file name.
    I Googled the error I was getting and found KB211494.  It says I should uncheck the box in Options on the General tab that says "Ignore other applications", but this box is already unchecked in my case.  Any other ideas?  This is
    really frustrating as a small percentage of our company has upgraded to Office 2007 with the rest still on Office 2003.

    This may be a file association problem.  To solve that:
    In Windows 7:
    1. Right-click the file,
    2. Select "Open With" 
    select [Your Program Here]
    3. Check always use this program. 
    In Windows XP:
    1. Locate the file as you have described above
    2. Right click the file
    3. Select Open with from the pop-up menu
    4. Click Choose default program…
    5. Select Excel in the Recommended Programs box
    6. Check Always use the selected program to open this kind of file
    7. Click on OK.
    1.  Make Excel not available from Office 2007 listed under Programs and Features in Control Panel.
    2. Take a registry backup using the steps given here
    3. In the registry editor window expand HKEY_CLASSES_ROOT and navigate to .xls right and delete it.
    4. Exit Registry Editor
    5. Undo Step 1 to make Excel available.
    6.  Restart the computer and verify it the issue is fixed.
    If this answer solves your problem, please check Mark as Answered. If this answer helps, please click the Vote as Helpful button. Cheers, Shane Devenshire

  • How can one use Mission Control with two monitors?  Please bring Spaces back

    How can one use Mission Control with two monitors.  With Spaces I could treat each space as a single desktop.
    SyBB

    I use two monitors at work and have no issue. I have my mail set to use Desktop 1 and iTunes set to the second monitor of Desktop 1. I have browsers set to Desktop 2 and Fusion and RDC set to Desktop 3.
    Two things that may help you. In System Preferences > Mission Control, disable the setting "Automatically rearrange spaces...". This screwed with assigning applications to certain spaces. And the other thing is don't use full screen on apps that support it. This just makes your second monitor superfluous.

  • HT204382 How do you read AVI sequences with Quick Time Player ?

    How do you read AVI sequences with Quick Time Player ? H2OT

    Hope somebody will help, I downloaded Flip4MacWMV 2.4.4.2dmg as recommended but it did not work. can I get HELP? Thanks

  • How do I read an attachment with Adobe Acrobat in my e-mail ?

    how do I read an attachment with Adobe Acrobat in my e-mail ?

    Hi file hunter,
    If you have PDF document attached with your email and you are using windows.
    First try right click on any PDF document and choose option Openwith --> Choose default Program.. browse for Reader/ Acrobat. That should help.
    Or click the attachment and once you try open it that should ask you to choose application open with if you haven't opened PDF document before.
    Regards,
    Ajlan Huda.

  • How to create a procedure function with a return value of ref cursor?

    Can anybody provide a sample about how to create a procedure function with a return value of REF CURSOR?
    I heard if I can create a function to return a ref cursor, I can use VB to read its recordset.
    Thanks a lot.

    http://osi.oracle.com/~tkyte/ResultSets/index.html

  • Read Table ITAB with key Dynamic Value = Value

    Here is sample Intenral table
    Columnname-C01 / C02 / C03
    Value-123 / 456 /789
    I would like to search value of the internal table according to dynamic value given by the code.
    i.e.
    read table ITAB with key <Dynamic Value> index 1.

    Hi Rupesh,
    Just try the following piece of code:
    TYPES: BEGIN OF str,
            A TYPE C,
            B TYPE I,
            C(2) TYPE C,
           END OF STR.
    DATA itab TYPE TABLE OF str WITH HEADER LINE.
    itab-A = 'X'.
    itab-B = '100'.
    itab-C = 'YZ'.
    APPEND itab.
    PERFORM c_itab_read USING 'A' 'X'.
    PERFORM c_itab_read USING 'B' '100'.
    PERFORM c_itab_read USING 'C' 'YZ'.
    FORM c_itab_read USING key TYPE ANY val TYPE ANY.
      READ TABLE itab WITH KEY (KEY) = val.
      IF SY-SUBRC IS INITIAL.
        WRITE: 'Hurray!'.
      ENDIF.
    ENDFORM.
    Hope this helps.
    Reqard points if query answered.
    Cheers,
    ~i1

Maybe you are looking for

  • Problem :ALV:Deletion Flags not showing in output

    hi all ! I have a alv program which displays customer data.there are three deletion flags columns in the output. First deletion flag will be: KNA1-LOEVM Second deletion flag will be: KNB1-LOEVM Third deletion flag will be: KNVV-LOEVM earlier all thre

  • How to find out maximum number of login users?

    Hi all, Is there anyway to find out what is the maximum number of login users since a database is started? Maybe I should ask, what's the largest number of sessions has been opened in a busy time of a database since it is started? I know v$session is

  • Java XMl parsing problems

    i have an xml sturcture as shown below: <cnv:conversion xmlns:cnv="urn:ssis-conv" xmlns:xsql="urn:oracle-xsql"> <cnv:roottag support="yes" destag="xfw:script"> <cnv:addattr name="debug" value="no" /> <cnv:addattr name="xmlns:xfw" value="urn:scb-xfw-v

  • Post 2010-005 security update freshclam now complains

    I applied the 2010-005 security update to 3 of our Xserves. These invoke freshclam via a cronjob (/usr/bin/freshclam --no-dns --quiet). Post security update we now get this output mailed to us after the cronjob runs: LibClamAV Warning: Cannot dlopen

  • Is there any good categorization/tagging software?

    I want to make a list of movies, tag them based on genre, and be able to search the tags (like in iTunes). I make a lot of lists, and being able to tag them all would help a lot in schoolwork and so on. Does anyone know of a good user-friendly progra