The curious custom panel caper!

Greetings all, before you instantly dismiss this question as too long/noobish, please read it, it's really quite strange. If a couple of you could at least copy the code I have given and let me know if you get the same results that would be great, as I have access to only one machine to program on at the moment.
Anyway, back to the story. I have a curious mystery which is somewhat bizzare. I created a very simple program which features a JButton in a frame which is attached to a JFileChooser. Above the button is a custom JPanel which is basically a fancy text box and is supposed to give the filename of the file selected by the JFileChooser. The weird part comes when you click the button... the component (which is already initialized and has had it's value set) seems to have vanished, its still visible, but trying to change it's value or print any of its attributes results in a NPE. Any ideas you can come up with would be of great help. It's probably something really obvious that my tired eyes just can't spot.
Here is the code... I've stripped it down to the bare minimum to highlight the problem.
import java.io.*;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.border.*;
public class Experiment extends JFrame implements ActionListener{
     private File in_file;
     private JFileChooser fc;
     private JButton button;
     private CustomPanel fileField;
     public Experiment(){
          super("Experiment");
          fc = new JFileChooser();
          JPanel box = new JPanel();
          box.setLayout(new BoxLayout(box,BoxLayout.Y_AXIS));
          box.setBorder(BorderFactory.createTitledBorder(
                           BorderFactory.createEtchedBorder(EtchedBorder.LOWERED),
                           "Form Details"));
          CustomPanel fileLabel = new CustomPanel(CustomPanel.LABEL,"File",250,"file","file");
          fileLabel.setObject("no file selected");
          box.add(fileLabel);
          button = new JButton("Select File");
          button.addActionListener(this);
          button.setActionCommand("select");
          box.add(button);
          getContentPane().add(box, BorderLayout.NORTH);
          setSize(new Dimension(300,120));
          setResizable(false);
          /* this println is successful */
          System.out.println("fileLabel = "+fileLabel.getText());
     public void actionPerformed(ActionEvent e){
          /* this one is unsuccessful! why?! */
          System.out.println("fileField = "+fileField.getText());
          String command = e.getActionCommand();
          if(command.equals("select")){
               selectTemplate();
     public void selectTemplate(){
          int returnVal = fc.showDialog(this, "Select");
        if (returnVal == JFileChooser.APPROVE_OPTION) {
            in_file = fc.getSelectedFile();
               fileField.setObject(in_file.getName());
     public static void main(String [] args) throws IOException{
          Experiment s = new Experiment();
          s.show();
}You will also require the code for the CustomPanel
import java.io.*;
import java.awt.*;
import java.text.*;
import java.util.*;
import javax.swing.*;
public class CustomPanel extends JPanel {
    public static final int TEXT=0;
    public static final int LABEL=1;
    private JPanel spacer;
    private JLabel label,label2;
    private JTextField textField;
    private DisabledCustomPanel disabledField;
    private String entity,labelTxt,toolTip;
    private int type,labelWidth,fieldWidth,maxSize=1024;
    private boolean notNull = false;
     * Creates a new CustomPanel object
     * @param type the type of component to be generated
      * @param labelTxt the text for the label
      * @param labelWidth the width of the label
      * @param fieldWidth the width of the editable field
      * @param entity the entity that this component corresponds to
      * @param toolTip The tool tip text for this component
    public CustomPanel(int type,String labelTxt,int labelWidth,int fieldWidth,String entity,String toolTip){
          this.type=type;
          this.labelTxt=labelTxt;
          this.entity=entity;
          this.toolTip=toolTip;
          this.labelWidth=labelWidth;
          this.fieldWidth=fieldWidth;
          init();
     * Creates a new CustomPanel object
     * @param type the type of component to be generated
      * @param labelTxt the text for the label
      * @param width the width of the entire component (label/field are balanced 3/7)
      * @param entity the entity that this component corresponds to
      * @param toolTip the tool tip text for this component
    public CustomPanel(int type,String labelTxt,int width,String entity,String toolTip){
          this.type=type;
          this.labelTxt=labelTxt;
          this.entity=entity;
          this.toolTip=toolTip;
          labelWidth=(int)((float)width*0.3);
          fieldWidth=(int)((float)width*0.7);
          init();
    private void init() {
          label=new JLabel(labelTxt,SwingConstants.RIGHT);
          setLayout(new FlowLayout(FlowLayout.LEFT,1,3));
          add(label);
          spacer=new JPanel();
          spacer.setPreferredSize(new Dimension(7,7));
          add(spacer);
          disabledField=new DisabledCustomPanel();
          add(disabledField);
          label.setToolTipText(toolTip);
          disabledField.setToolTipText(toolTip);
          switch(type) {
               case TEXT:
                   textField=new JTextField();
                   add(textField);
                   textField.setPreferredSize(new Dimension(fieldWidth,25));
                   break;
               case LABEL:
                   label2=new JLabel("");
                   add(label2);
                   break;
          label.setPreferredSize(new Dimension(labelWidth,25));
          disabledField.setPreferredSize(new Dimension(fieldWidth,25));
          setPreferredSize(new Dimension(labelWidth+fieldWidth,30));
          getActiveComponent().setToolTipText(toolTip);
          setEnabled(false);
     * Returns the contents of the component as a string.
     * @return the String representation of the value held by this component.
    public String getText() {
          Object tmpObj;
          switch(type) {
               case TEXT:
                   return textField.getText().trim();
               case LABEL:
                   return label2.getText().trim();
          return "";
     * Sets the contents of the component.
      * @param obj the object to set.
    public void setObject(Object obj) {
          if (obj == null) {
               clear();
               return;
          String txt=obj.toString();
          switch(type) {
               case TEXT:
                   textField.setText(txt);
                   break;
               case LABEL:
                   label2.setText(txt);
                   break;
          updateDisabled();
     * Updates the field of the component displayed when it is uneditable.
    public void updateDisabled(){
          String txt=getText();
          switch(type){
               case TEXT: case LABEL:
                   disabledField.setText(txt);
                   break;
     * Clears the component's contents.
    public void clear() {
          disabledField.setText("");
          switch(type){
               case TEXT:
                   textField.setText("");break;
               case LABEL:
                   label2.setText("");break;
     * Gets the string you would need to use with an UPDATE statement to
     * represent this component.
     * @return a String consisting of the encapsulated field name and value of
     *         this component in the form <code>field='value'</code> for use
     *         with SQL UPDATE statements.
    public String getUpdateText() {
          switch(type) {
               case LABEL: return "";
          return entity+"='"+formatSQL(getText())+"'";
     * Gets the string you would need to use with an INSERT statement to
     * represent this component.
     * @return a String consisting of the encapsulated value of this component
     *         in the form <code>'value'</code> for use with SQL INSERT
     *         statements.
    public String getInsertText(){
         return "'"+formatSQL(getText())+"'";
     * Gets the type of this CustomPanel.
     * @return the type of this CustomPanel.
    public int getType() {
          return type;
     * Gets the entity currently associated with this CustomPanel.
     * @return the entity currently associated with this CustomPanel.
    public String getEntity() {
          return entity;
     * Creates part of an UPDATE statement given an array of CustomPanel objects.
      * @param v The array of CustomPanel objects to join.
      * @return a textual representation of the set of CustomPanels of the form
      *         <code>field1='value1', field2='value2'</code> used for UPDATE
      *         statements.
    public static String joinForUpdate(CustomPanel [] v) {
          String vStr="";
          int i;
          for (i=0;i<v.length;i++) {
              if (vStr.length() > 0 && v.getType() != LABEL) vStr+=", ";
          vStr+=v[i].getUpdateText();
          return vStr;
* Creates part of an INSERT statement given an array of CustomPanel objects.
     * @param v The array of CustomPanel objects to join.
     * @return a textual representation of the set of CustomPanels of the form
     * <code>'value1', 'value2'</code> used for INSERT statements.
public static String joinForInsert(CustomPanel [] v){
     String vStr="";
     int i;
     for (i=0;i<v.length;i++) {
          if (vStr.length() >0 && v[i].getType() !=LABEL) vStr+=", ";
          vStr+=v[i].getInsertText();
     return vStr;
* Fills in multiple components at once using data from an SQLResult
* object. NB - only the first row from the SQLResult is used.
     * @param v The array of CustomPanel objects
     * @param r The SQLResult containing the destination data
     * @see SQLResult
public static void fill(CustomPanel [] v,SQLResult r) {
          Object tmpObj;
          int i,col;
          for (i=0;i<v.length;i++) {
          col=r.getNamedColumn(v[i].getEntity());
          if (col != -1) {
                    tmpObj=r.getValueAt(0,col);
               if (tmpObj != null) v[i].setObject(tmpObj);
* Sets whether this component may be edited or not.
* @param enabled whether or not you want the component enabled or not.
public void setEnabled(boolean enabled) {
          if (!enabled) updateDisabled();
          getActiveComponent().setVisible(enabled);
          disabledField.setVisible(!enabled);
* Gets the JComponent used by the this CustomPanel to hold data.
* NB - if you change the contents of the component, you will have to
* call updateDisabled().
* @return the JComponent used by this CustomPanel to hold data.
public JComponent getActiveComponent() {
          switch(type) {
          case TEXT:
          return textField;
          case LABEL:
          return label2;
          return null;
* Registers whether this component may be allowed to be NULL (empty).
public void setNotNull(boolean notNull) {
          this.notNull=notNull;
* Registers the maximum number of characters allowed by the component.
* @param maxSize the maximum number of characters allowed by the component.
public void setMaxSize(int maxSize) {
          this.maxSize=maxSize;
* Verifies the integrity constraints of the component.
     * @param usePopup whether to display a popup if there's a problem or not.
     * @return <code>false</code> if the component has a problem,
     * <code>true</code> otherwise.
public boolean verify(boolean usePopup) {
          Object tmpObj;
          switch(type) {
               case TEXT:
               if (notNull && textField.getText().length()==0) {
                    if (usePopup) popup("Please complete the '"+labelTxt+"' field.");
                    return false;
               if (textField.getText().length() > maxSize) {
                    if (usePopup) popup("'"+labelTxt+"' may only contain up to "+
                              maxSize+" characters.");
                    return false;
               break;
          return true;
* Verifies an entire array of components, stopping and popping up an
* error if there's a problem.
     * @param v the target array of CustomPanels to check for validity.
     * @return <code>false</code> if there's a problem, <code>true</code>
     * otherwise.
public static boolean sanityCheck(CustomPanel [] v) {
          int i;
          for (i=0;i<v.length;i++)
          if (!v[i].verify(true)) return false;
          return true;
     * Conveniance method to popup JOptionDialog targeted at this CustomPanel.
     * @param message the message to popup.
     private void popup(String message) {
          JOptionPane.showMessageDialog((JPanel)this,message,"Warning",JOptionPane.WARNING_MESSAGE);
     * Method to format Strings for SQL queries and statements, uses character
     * stuffing to protect special characters.
     * @param txt the String to format.
     * @return the formatted String.
     private static String formatSQL(String txt) {
          String out="";
          String chr;
          int i;
          for (i=0;i<txt.length();i++) {
          chr=""+txt.charAt(i);
          if (chr.equals("'")) chr="''";
          out+=chr;
          return out;
* An easily-readable, un-editable field of text. Used by CustomPanel, but may
* be used alone if necessary.
* @see CustomPanel
public class DisabledCustomPanel extends JPanel{
private JLabel label;
* Creates a new DisabledCustomPanel
public DisabledCustomPanel() {
          super(new GridLayout());
          setBackground(Color.WHITE);
          setForeground(Color.BLACK);
          label=new JLabel();
          label.setFont(new Font("dialog",Font.PLAIN,12));
          add(label);
          setBorder(BorderFactory.createLineBorder(Color.GRAY));
* Sets the text shown by this component.
     * @param txt the text to be shown.
public void setText(String txt) {
          label.setText(" "+txt);
* Sets the tool tip text for this component.
     * @param toolTip the tool tip text for this component.
public void setToolTipText(String toolTip) {
          label.setToolTipText(toolTip);

You are referencing an uninitalized component.
I changed the code below to use the class member var fileField
import java.io.*;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.border.*;
public class Experiment extends JFrame implements ActionListener
    private File in_file;
    private JFileChooser fc;
    private JButton button;
    private CustomPanel fileField;
    public Experiment()
        super("Experiment");
          setDefaultCloseOperation( EXIT_ON_CLOSE );
        fc = new JFileChooser();
        JPanel box = new JPanel();
        box.setLayout(new BoxLayout(box,BoxLayout.Y_AXIS));
        box.setBorder(BorderFactory.createTitledBorder(
                                                      BorderFactory.createEtchedBorder(EtchedBorder.LOWERED),
                                                      "Form Details"));
        //This was a local var that you were using.
       //CustomPanel fileLabel = new CustomPanel(CustomPanel.LABEL,"File",250,"file","file");          
         //You needed to initalize the member var.
        fileField = new CustomPanel(CustomPanel.LABEL,"File",250,"file","file");
        fileField.setObject("no file selected");
        box.add(fileField);
        button = new JButton("Select File");
        button.addActionListener(this);
        button.setActionCommand("select");
        box.add(button);
        getContentPane().add(box, BorderLayout.NORTH);
        setSize(new Dimension(300,120));
        setResizable(false);
        /* this println is successful */
        System.out.println("fileLabel = "+fileField.getText());
    public void actionPerformed(ActionEvent e)
        /* this one is unsuccessful! why?! */
        System.out.println("fileField = "+fileField.getText());
        String command = e.getActionCommand();
        if( command.equals("select") )
            selectTemplate();
    public void selectTemplate()
        int returnVal = fc.showDialog(this, "Select");
        if( returnVal == JFileChooser.APPROVE_OPTION )
            in_file = fc.getSelectedFile();
            fileField.setObject(in_file.getName());
    public static void main(String [] args) throws IOException{
        Experiment s = new Experiment();
        s.show();

Similar Messages

  • How to create a custom panel in the right way (without having an empty panel in the file info) ?

    Hi Everyone
    My name is Daté.
    I'm working in the fashion industry as a designer and Design consultant to help fashion brands improving the design workflow by using Adobe softwares and especially Illustrator.
    I'm not a developper, but i'm very interested about the possibility to introduce xmp technology to provide more DAM workflows in the fashion industry.
    Fashion designers produce a lot of graphical objects in illustrator or Photoshop. Unfortunately they are faced to a big challenge which is about how to manage, search, classify and get this files faster. Of course PDM system or PLM system are used in the Fashion industry to manage data, but for many companies, implemanting this kind of database is very complex.
    When i look at what you can do with xmp, it seems to be an interesting way of managing design files, then i started to follow Adobe instruction to try to build a custom panel.
    The main idea is to (Theory) :
    create custom panels used by fashion designers to classify their design files.
    Use Adobe Bridge to search files, create smart collection to make basic reports in pdf and slideshows
    Find someone to make a script able to export metadata in xml files
    Use indesign and the xml file to generate automatically catalogues or technical sheets based on xmp values
    I have created a custom panel by using the generic panel provided by Adobe and i have modified the fields to feet with the terms used in the fashion industry and it works well.
    But unfortunately, when i try to create my own custom panel from scratch with Flashbuilder (4.6) and the Adobe CSExtensionBuilder_2 (Trial version), it doesn't work!
    Here is the process :
    I have installed flashbuilder 4.6
    I have download the XMP Fileinfo SDK 5.1 and placed the com.adobe.xmp.sdk.fileinfo_fb4_1.1.0.jar in C:\Program Files (x86)\Adobe\Adobe Flash Builder 4.6\eclipse\plugins
    In Flashbuilder, i have created a new project and select xmp Custom panel
    The new project is created in flashbuilder with a field with A BASIC Description Field
    To generate the panel, right click the project folder and select xmp / Publish Custom Panel
    The panel is automatically generated in the following folder : C:\Users\AppData\Roaming\Adobe\XMP\custom file info panels\3.0\panels
      Go to illustrator, Open the file Info
    The panel appears empty
    The others panel are also empty
    The panel is created and automatically placed in the right folder, but when you open it in Illustrator by selecting the File Info option in the File Menu, this custom panel appears empty!!! (only the title of the tab is displayed). This panel also prevent the other panels to be displayed.
    When you delete this custom panels from the folder C:\Users\AppData\Roaming\Adobe\XMP\custom file info panels\3.0\panels and go back to the File Info, the other panels display their content properly.
    I also try to use the plugin XMP Namespace designer to create my own namespace. this plugin is also able to generate a custom panel, but this one also appears empty in AI or Photoshop.
    I try to follow the process described in Adobe xmp documentation many times, but it didn't works.
    It seems that many peaople have this issue, but i dodn't find a solution in the forum.
    I try to create a trust file (cfg), but it didn't work.
    It would be so kind if you can help me to understand why i can't create a custom panel normally and how to do it in the right way.
    Thanks a lot for your help,
    Best regards,
    Daté 

    Hi Sunil,
    After many trial, i realize the problem was not coming from the trust file, but from the way i have created the custom panel.
    There is 2 different ways, the first described below is not working whereas the second is fine :
    METHOD 1 :
    I have downloaded the XMP-Fileinfo-SDK-CS6
    In the XMP-Fileinfo-SDK-CS6 folder, i copied the com.adobe.xmp.sdk.fileinfo_fb4x_1.2.0.jar plugin from the Tools folder and i pasted it in the plugind folder of Flashbuilder 4.6
    The plugin install an XMP project
    In Flashbuilder 4.6 i have created a new project (File / New /Project /XMP/XMP Custom Panel)
    A new xmp project is created in flashbuilder.
    You can publish this project by right clicking the root folder and selecting XMP / Publish Custom Panel
    The custom file info panel is automatically published in the right location which is on Mac : /Users/UserName/Library/Application Support/Adobe/XMP/Custom File Info Panels/3.0 or /Users/UserName/Library/Application Support/Adobe/XMP/Custom File Info Panels/4.0
    Despite the publication of the custom file info panel and the creation of a trust file in the following location : "/Library/Application Support/Macromedia/FlashPlayerTrust", the panel is blank in Illustrator.
    I try this way several times, with no good results.
    METHOD 2 :
    I have installed Adobe CSExtensionBuilder 2.1 in Flash Builder
    In FlashBuilder i have created a new project (File / New /Project /Adobe Creative Suite Extension Builder/XMP Fileinfo Panel Project)
    As the system display a warning about the version of the sdk to use to create correctly a custom file info, I changed the sdk to sdk3.5A
    The warning message is : "XMP FileInfo Panel Projects must be built with Flex 3.3, 3.4 or 3.5 SDK. Building with Flex 4.6.0 SDK may result in runtime errors"
    When i publish this File info panel project (right click the root folder and select Run as / Adobe illustrator), the panel is published correctly.
    The last step is to create the trust file to display the fields in the panel and everything is working fine in Illustrator.
    The second method seems to be the right way.
    For sure something is missing in the first method, and i don't understand the difference between the XMP Custom Panel Project and the XMP Fileinfo Panel Project. Maybe you can explain it to me.
    So what is the best solution ? the right sdk to use acording to the creative suite (the system asks to use 3.3 or 3.5 sdk for custom panels, so why ?)
    I'm agree with Pedro, a step by step tutorial about this will help a lot of peaople, because it's not so easy to understand!!!
    Sunil, as you belong to the staff team, can you tell me if there is  :
    A plugin or a software capable to extract the XMP from llustrator files to generate XML workflows in Indesign to create catalogues
    A plugin to allow indesign to get custom XMP in live caption
    A plugin to allow Bridge to get custom XMP in the Outputmode to make pdf or web galeries from a smart collection
    How can you print the XMP data with the thumbnail of the file ?
    Thanks a lot for your reply.
    Best Regards
    Daté

  • How can I find my custom panel in CS5 using java script

    -I made an empty panel using Adobe Configurator 2 and then exported it to /Panels folder.
    -My custom panel is now in photoshop and works.
    -I added a simple code to onPanelInit():
    function onPanelInit()
        var myWindow = new Window ("dialog");
        var myMessage = myWindow.add ("statictext");
        myMessage.text = "Hello, world!";
        myWindow.show ( );
    so far so good.
    Now instead of creating a new window like I did above, I want to use the new custom panel and add a text to it.
    The problem is, how do I do that in java? Where can I find the panel that I should assign the text to?
    I know that you can add the text in Configurator, or you can edit the .xml file and add the button there, but my
    plan is to create a panel where i can add and remove buttons dynamically and that's why I have to do that in java.
    Any help would be appreciated!
    Cheers,
    Petri J

    Use Runtime.exec() to run a OS specific command which retrieves OS specific info.
    Or use JNI to access a OS specific API which returns the info you want.

  • XML Custom Panels: Samples With Doc are Not Well Formed XML

    The custom panel samples in the XMP Custom Panels document (and the accompanying sample file) is not well formed XML (which means that CS3 can't be parsing the file as XML, which would explain how this error made it publication). In particular, the XML declaration is missing the closing "?".
    <br />
    <br />As published it is:
    <br />
    <br /><?xml version="1.0"?>
    <br />
    <br />It should be:
    <br />
    <br /><?xml version="1.0"?>
    <br />
    <br />Note the "?&gt;" rather than "&gt;".
    <br />
    <br />This is in addition to the DOCTYPE SYSTEM URL not resolving to an actual DTD declaration set (which would be:
    <br />
    <br />
    <br /> title CDATA #REQUIRED
    <br /> type NMTOKEN #REQUIRED
    <br />&gt;
    <br />
    <br />Cheers,
    <br />
    <br />Eliot

    You'll have to do something to prevent your logger from appending to old logs that have been closed. Sorry if that is not very helpful, but I'm not familiar with the logging features in SDK 1.4. For your interest, though, Log4J (which you can get from Apache) also features XML logging, and it solved that rather obvious problem thus:
    "The output of the XMLLayout consists of a series of log4j:event elements as defined in the log4j.dtd. It does not output a complete well-formed XML file. The output is designed to be included as an external entity in a separate file to form a correct XML file."
    In other words, you would have to wrap the output in an XML header and a root node to be able to use it, which is not difficult to do.

  • How Can I Create a Custom Panel With the InDesign ToolBar's Look and Feel

    I am trying to create a custom panel that looks as close as possible to InDesign's native floating menu bar (with the Frame, Text, etc, icons on it). ToggleBarButtons doesn't look like, although it does contain the functinoality of the button which is pressed stayting pressed.
    Any ideas?
    TIA,
    mlavie

    Hi mlavie,
    I found a nice post on this topic at:
    http://blog.flexexamples.com/2007/08/20/creating-toggle-and-emphasized-button-controls-in- flex/
    Hope this helps!
    Thanks,
    Ole

  • Adobe InDesign CC 2014 Custom Panel Built With Extension Builder - Problem: Can't tab from one entry field to the next; Hitting tab instead hides all palettes; Is there a fix? This didn't happen in Adobe Indesign CC

    Adobe InDesign CC 2014 Custom Panel Built With Extension Builder - Problem: Can't tab from one entry field to the next; Hitting tab instead hides all palettes; Is there a fix? This didn't happen in Adobe Indesign CC

    This is planned to be fixed in the next release.

  • When I click on Apps in the Creative Cloud panel is days Download Error contact customer support

    When I click on Apps in the Creative Cloud panel is days Download Error contact customer support
    OS X 10.9.4
    3.4 GHz Intel Core i7
    16GB RAM 1333 MHz DDR3
    237" iMac

    I wish. Just this ambiguous msg.
    I've gone round and round their online support. Seems like it's all for specific apps. Can't find anything for the CC window itself.  Screen capture attached.
    Many thanks for your time!

  • Question about the custom panel language

    I have a question about the custom panel language...
    The document you provide seems to lack details on some features. Namely the icon and picture widgets. I see from looking at the examples and other vendor's web pages that these features exist, but I don't find any detailed descriptions of them in the documentation. Is there a more complete document describing these and other features...
    http://www.adobe.com/products/xmp/custompanel.html
    Alternatively, can someone fill me in on the syntax and options for at least the icon and picture widget. For instance, how do you load external icons or pictures...
    Tom

    Gunar,
    It could be interesting to have something like
    icon(url: 'http://www.adobe.com/Images/logo.gif', width: 20, height: 20);
    or better
    picture(url: 'http://www.adobe.com/Images/logo.gif', width: 20, height: 20);
    for the pictures and
    include(url: 'http://www.adobe.com/xml/custompanel/camera1.txt');
    for include the cusmtom panel's dynamic portions
    Juan Pablo

  • Make us better - Join the Windows DNS Customer Panel

    Windows DNS server team is looking for
    Network Administrators who can provide feedback on pain points, preferences, and feedback regarding DNS troubleshooting, security, traffic management, and operational insights.
    We are starting a customer panel for DNS server to help influence the future of the DNS area at Microsoft.
    What are my commitments as a panel member?
    Completing questionnaires or taking part in surveys
    Actively share your views constructively on the conference calls
     What do I get out of it?
    Ability to influence the future of Windows DNS solutions
    Direct access to the product team
    The goal is to actively engage with administrators to improve DNS solutions from Microsoft.
    If you are interested, please fill out the information here:
    https://www.surveymonkey.com/s/WinDNSCustomerPanel1504
    Thank you,
    Windows DNS Server Team
    Microsoft

    It would be great to get SpringPad, Flipbook and Instapaper on board. Also having Pulse, PopCap games and Zynga would make this device shine.

  • Google map inside the spry collapsible panel

    So this time I've bumped into interesting 'bug'. I've placed the google map inside the spry collapsible panel. Panel is set to the closed mode on load of page. When I open the tab, map appears, but address marker is hidden behind the top left corner. If I place the same map outside the collapsiple panel it renders all well.
    So my  question is whether there is any way around this issue. When I know where the marker is hidden I can simply move the map and see it, but customer who's not aware of the problem will see only blank map with not marked address which is not acceptable.
    cheers,
    Simon

    Sure mate. Here you go:
    <div id="CollapsiblePanel1" class="CollapsiblePanel">
                  <div class="CollapsiblePanelTab" tabindex="0">SHOW MAP</div>
                  <div class="CollapsiblePanelContent">
                  <cfmap  width="242" height="200" zoomlevel="12" name="mainMap" markercolor="333444" showscale="false"
    typecontrol="none"  showcentermarker="true" centeraddress="#get_event.event_address1#, #get_event.event_address2#, #get_event.event_city#,#get_event.event_county#, #get_event.event_postcode#, #get_event.event_country#  "
    ></cfmap>
                  </div>
                </div>
    And this bit goes at the bottom of the code :
    <script type="text/javascript">
    var CollapsiblePanel1 = new Spry.Widget.CollapsiblePanel("CollapsiblePanel1", {contentIsOpen:false});
      </script>
    And that would be the preview that I get once the panel is open:
    And that is the preview of how it should look:
    As you can see the map marker sticks to the top left corner. I was wondering whether there is any way to re-focus it once the panel is open.
    cheers,
    Simon

  • The document information panel was unable to load. the document will continue to open. For more information, contact your system adminsitrator.

    Hi Guys,
    I am creating the library using object model with custom content type.  When i am opening document from custom content type, the meta data fields are not displaying in the document and throwing below error.
    The document information panel was unable to load. the document will continue to open. For more information, contact your system adminsitrator.
    Document Information Panel cannot open a new form.
    The form contains schema validation errors.
    Content for element '{http://schemas.microsoft.com/office/2006/metadata/propertiesRoot}properties' is incomplete according to the DTD/Schema.
    Expecting: {http://schemas.microsoft.com/office/2006/metadata/properties}properties.
    But after saving the document, then meta data is enabled.
    Thanks in advance for suggested solutions.
    thanks
    Santhosh G

    Hi,
    For a better troubleshooting, I suggest to do as follows:
    1. Please try to update the Location column's schema by following the steps below.
     1) Go to Site Settings -> "Site Columns"
     2) Click on "Location", after the page is opened. Don't modify any settings, click "OK"  to forcibly update the field's schema.
    2. Re-edit the document information panel template to see if the issue still occurs.
    Please go to the Library setting > click the corresponding content type(need to enable managed of content types in Advanced settings) > click Document Information Panel settings.
    3. Here are some similar links about your issue, please take some time to look at them:
    http://social.msdn.microsoft.com/Forums/en-US/sharepointcustomizationlegacy/thread/243b4852-3f17-4a3a-b6d7-187d65a5f088/
    http://blogs.msdn.com/b/raresm/archive/2010/03/30/document-information-panel-cannot-open-the-form.aspx
    https://joranmarkx.wordpress.com/2012/02/10/sharepoint-document-information-panel-cannot-create-a-new-blank-form/
    If the issue still occurs, please check if the command below can help(change the site URL and the library name in the code):
    Apply-Fix -siteUrl "http://your site URL "
    function Apply-Fix($siteUrl)
    clear
    Add-PSSnapin "Microsoft.SharePoint.Powershell" -ErrorAction SilentlyContinue # -EA 0
    [Environment]::CurrentDirectory=(Get-Location -PSProvider FileSystem).ProviderPath
    foreach ($spwTarget in (Get-SPSite $siteUrl).RootWeb.Webs) {
    Write-Host "Checking Web: " $spwTarget.Url
    $list = $spwTarget.Lists["your library name"]
    $fields = $list.fields
    foreach($field in $fields)
    if($field.SourceId -eq '{$ListId:your library name;}')
    $schemaxml = $field.SchemaXML
    $schemaxmldata = [xml]$schemaxml
    $schemaxmldata.Field.SetAttribute("SourceID", $list.ID)
    $schemaxml = $schemaxmldata.get_InnerXml()
    $field.SchemaXML = $schemaxml
    $field.Update()
    Write-Host "Fixed" $field.Title "field in the library"
    Write-Host "Done."
    More information:
    SharePoint 2010: Creating a Custom Content Type using Visual Studio
    http://www.codeproject.com/Articles/410880/SharePoint-Creating-a-Custom-Content-Type-usi
    Thanks,
    Dennis Guo
    TechNet Community Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected].
    Dennis Guo
    TechNet Community Support

  • Error: "The document information panel was unable to load"

    Hello,
    I have created a custom document content type that uses a specified word template for a sharepoint document library for contracts and offers, and added a few custom columns in the document library as well. The word template launches succesfully when creating a new item in the document library, but the problem arises when I add custom columns to the word template content type. When the document loads in Word, I get the following error: "The Document Information Panel was unable to load. The document will continue to open. For more information, contact your system administrator." And in details:
    "Document Information Panel cannot create a new, blank form.
    Document Information Panel cannot open the form. To fix this problem, contact your system administrator.
    Form template: http://servername/sitename/proppanel.xsn
    The following DataObject either cannot be created or cannot be initialized: list_033AA217-8906-447E-A604-A300F51D4030
    Document Information Panel cannot add the following object to the DataObjects collection: list_033AA217-8906-447E-A604-A300F51D4030
    list_033AA217-8906-447E-A604-A300F51D4030 could not be added to the DataObjects collection.
    The following item already exists in the collection: list_033AA217-8906-447E-A604-A300F51D4030"
    Interestingly enough, I have two web applications running on the same server that I have tried to implement this on, and on the other it works flawlessly, meaning that the Document Information Panel launches successfully and I can edit the columns associated with that content type and store the values in a document library. I have also tried to save the DIP template from the working web application and use it as the default DIP template on the other application, but that doesn't work either.
    I have also tried to browse through all options and configurations in the application settings in CA and SSP, but to no avail. Any suggestions about what might be causing this problem or how to fix it would be greatly appreciated.
    - Sebastian Eriksson

    Hi All,
    I have the same problem with my DIP in already two of my document libraries. Please see below:
    Document Information Panel cannot create a new, blank form.
    Document Information Panel cannot open the form. To fix this problem, contact your system administrator.
    Form template: http://servername/sitename/proppanel.xsn
    The following DataObject either cannot be created or cannot be initialized: list_295E77CD-1C08-4DDC-A188-F86107F9BF60
    Document Information Panel cannot add the following object to the DataObjects collection: list_295E77CD-1C08-4DDC-A188-F86107F9BF60
    list_295E77CD-1C08-4DDC-A188-F86107F9BF60 could not be added to the DataObjects collection.
    The following item already exists in the collection: list_295E77CD-1C08-4DDC-A188-F86107F9BF60
    I have made the same thing that Kirikou has suggested and I was able to recreate the broken library. The problem is that Kirikou's way has failed on my Share Point staging installation:
    [COMException (0x80020009): Exception occurred. (Exception from HRESULT: 0x80020009 (DISP_E_EXCEPTION))]
       Microsoft.SharePoint.Library.SPRequestInternalClass.RenderViewAsHtml(String bstrUrl, String bstrListName, String bstrViewID, String bstrViewXml, String bstrQualifier, ISPDataCallback pDataCallback, Boolean& pbSharedList) +0
       Microsoft.SharePoint.Library.SPRequest.RenderViewAsHtml(String bstrUrl, String bstrListName, String bstrViewID, String bstrViewXml, String bstrQualifier, ISPDataCallback pDataCallback, Boolean& pbSharedList) +125
    [SPException: Exception occurred. (Exception from HRESULT: 0x80020009 (DISP_E_EXCEPTION))]
       Microsoft.SharePoint.Library.SPRequest.RenderViewAsHtml(String bstrUrl, String bstrListName, String bstrViewID, String bstrViewXml, String bstrQualifier, ISPDataCallback pDataCallback, Boolean& pbSharedList) +166
       Microsoft.SharePoint.WebPartPages.ListViewWebPart.RenderView() +4239
       Microsoft.SharePoint.WebPartPages.ListViewWebPart.EnsureData(Int32 token) +658
       Microsoft.SharePoint.WebPartPages.SharePointDataProvider.Execute() +254
       Microsoft.SharePoint.WebPartPages.SPWebPartManager.ActivateV2ConnectionsAndSharePointDataFetch() +139
       Microsoft.SharePoint.WebPartPages.SPWebPartManager.ActivateConnections() +85
       System.Web.UI.WebControls.WebParts.WebPartManager.OnPageLoadComplete(Object sender, EventArgs e) +52
       System.EventHandler.Invoke(Object sender, EventArgs e) +0
       System.Web.UI.Page.OnLoadComplete(EventArgs e) +2063076
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1875
    I will be very appreciated if somebody knows what is the reason for this problem.
    Best regards,
    Yordan Nikolov

  • The Document Information Panel was unable to load.

    Platform: SharePoint 2013, Office 2013.
    Background: When you open an Office document from SharePoint users get this error:
    The Document Information Panel was unable to load. The document will continue to load. For more information, contact your system administrator."
    "The form cannot be opened. To fix this problem, contact the form designer. Form template:
    http://<site address>/../proppanel.xsn. The XML Schema for the form template has an invalid value for the following attribute: location." 
    I tried running this fix: http://www.cb-net.co.uk/microsoft-articles/2063-sharepoint-2010-templates-and-document-information-panel-errors, but it kept saying that it couldn’t see the url that
    I specified (I did check this carefully); think it might only apply to SharePoint 2010 – perhaps the shell syntax is different in 2013.
    Can anyone help me out?

    Hi Alex,
    According to your description, my understanding is that the error occurred when opening a document from SharePoint.
    Is this document information panel customized?
    I recommend to re-edit the document information panel template to see if the issue still occurs.
    Please go to the Library setting > click the corresponding content type(need to enable managed of content types in Advanced settings) > click Document Information Panel settings.
    If the issue still occurs, please check if the command below can help(change the site URL and the library name in the code):
    Apply-Fix -siteUrl "http://your site URL "
    function Apply-Fix($siteUrl)
    clear
    Add-PSSnapin "Microsoft.SharePoint.Powershell" -ErrorAction SilentlyContinue # -EA 0
    [Environment]::CurrentDirectory=(Get-Location -PSProvider FileSystem).ProviderPath
    foreach ($spwTarget in (Get-SPSite $siteUrl).RootWeb.Webs) {
    Write-Host "Checking Web: " $spwTarget.Url
    $list = $spwTarget.Lists["your library name"]
    $fields = $list.fields
    foreach($field in $fields)
    if($field.SourceId -eq '{$ListId:your library name;}')
    $schemaxml = $field.SchemaXML
    $schemaxmldata = [xml]$schemaxml
    $schemaxmldata.Field.SetAttribute("SourceID", $list.ID)
    $schemaxml = $schemaxmldata.get_InnerXml()
    $field.SchemaXML = $schemaxml
    $field.Update()
    Write-Host "Fixed" $field.Title "field in the library"
    Write-Host "Done."
    Best regards.
    Thanks
    Victoria Xia
    TechNet Community Support

  • The Document Information Panel Was unable to load. Please Help

    Hello all,
    I just recently created my own custom Document Panel in InfoPath. I uploaded it into a custom content type. I applied this to a document library and it is the standard document panel for creating a new document within that document library. When I click
    "New document" I get this error..
    The Document Information Panel was unable to load. THe document will continue to open. For more information, contact your system administrator.
    Details:
    Document Information Panel cannot open a new form.
    The form cannot be opened. To fix this problem, contact the form designer.
    Form template: http://Mysite/_cts/DIPTestContentType/Myfirstform.xsn
    The SOAP response indicates that an error occurred on the server:
    Exception of type 'Microsoft.SharePoint.SoapServer.SoapServerException' was thrown.
    <detail><errorstring xmlns="http://schemas.microsoft.com/sharepoint/soap/">No item exists at http://Mysite/My DIP Test.docx.  It may have been deleted or renamed by another user.</errorstring><errorcode xmlns="(html
    for the error code..had to delete it because my body text cannot contain images or links until my account is verified but it is a link to Microsoft support)
    ...It appears that it is not locating the custom Document Panel.
    Could anyone point me in the right direction?
    Thanks

    Hi Alex,
    According to your description, my understanding is that the error occurred when opening a document from SharePoint.
    Is this document information panel customized?
    I recommend to re-edit the document information panel template to see if the issue still occurs.
    Please go to the Library setting > click the corresponding content type(need to enable managed of content types in Advanced settings) > click Document Information Panel settings.
    If the issue still occurs, please check if the command below can help(change the site URL and the library name in the code):
    Apply-Fix -siteUrl "http://your site URL "
    function Apply-Fix($siteUrl)
    clear
    Add-PSSnapin "Microsoft.SharePoint.Powershell" -ErrorAction SilentlyContinue # -EA 0
    [Environment]::CurrentDirectory=(Get-Location -PSProvider FileSystem).ProviderPath
    foreach ($spwTarget in (Get-SPSite $siteUrl).RootWeb.Webs) {
    Write-Host "Checking Web: " $spwTarget.Url
    $list = $spwTarget.Lists["your library name"]
    $fields = $list.fields
    foreach($field in $fields)
    if($field.SourceId -eq '{$ListId:your library name;}')
    $schemaxml = $field.SchemaXML
    $schemaxmldata = [xml]$schemaxml
    $schemaxmldata.Field.SetAttribute("SourceID", $list.ID)
    $schemaxml = $schemaxmldata.get_InnerXml()
    $field.SchemaXML = $schemaxml
    $field.Update()
    Write-Host "Fixed" $field.Title "field in the library"
    Write-Host "Done."
    Best regards.
    Thanks
    Victoria Xia
    TechNet Community Support

  • Catastrophic failure -- The Document Information Panel was unable to load

    I have a content type that has a document template and a custom document information panel associstaed with it. For most users, these work without issues.
    Some users are reporting, however, that they receive the following series of messages when trying to create a new document from the content type:
    You are currently working offline.
    Here, the user can choose either Try to Connect or Stay Offline.
    If the user clicks Try to Connect, the following error message is displayed:
    Clicking OK results in the document loading. The DIP loads, but two fields that pull values from a SharePoint list are blank.
    Again, this happens for only a handful of users, so it seems like it's an issue with either their local PC or their connection to SharePoint.
    So far, I have tried the following:
    Repair Office 2010 installation
    Removed all locally cached versions of both the document template (.dotx) and the custom DIP (.xsn)
    Verified user permissions for the SharePoint site and the SharePoint lookup list
    Based on some other posts I've seen, checked to make sure that InfoPath is installed and that IPEDINTL.DLL
    is present at
    C:\Program Files\Microsoft Office\Office14\1033

    Hi,
    According to your post, my understanding is that the Document Information Panel was unable to load.
    I recommend to go to the
    Document Type Advanced Settings, click Edit template, go to
    File, click on Inspect, click on Remove All behind
    Custom XML Data.
    Here is a similar blog for your reference:
    Document Information Panel | Joran Markx
    If your list contains lookup columns, you can refer to:
    SharePoint:
    Document Information Panel fails to load when office documents are opened in a library that contains lookup columns
    Document Information Panel cannot open the form
    Thanks,
    Linda Li                
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Linda Li
    TechNet Community Support

Maybe you are looking for