rem
stringlengths 0
477k
| add
stringlengths 0
313k
| context
stringlengths 6
599k
| meta
stringlengths 141
403
|
---|---|---|---|
fixnumClass.defineMethod("+", callbackFactory.getMethod("op_plus", RubyNumeric.class)); | fixnumClass.defineMethod("+", callbackFactory.getMethod("op_plus", IRubyObject.class)); | public static RubyClass createFixnumClass(Ruby runtime) { RubyClass fixnumClass = runtime.defineClass("Fixnum", runtime.getClasses().getIntegerClass()); CallbackFactory callbackFactory = runtime.callbackFactory(RubyFixnum.class); fixnumClass.defineMethod("quo", callbackFactory.getMethod("quo", RubyNumeric.class)); fixnumClass.defineMethod("to_f", callbackFactory.getMethod("to_f")); fixnumClass.defineMethod("to_i", callbackFactory.getMethod("to_i")); fixnumClass.defineMethod("to_s", callbackFactory.getMethod("to_s")); fixnumClass.defineMethod("to_str", callbackFactory.getMethod("to_s")); fixnumClass.defineMethod("taint", callbackFactory.getMethod("taint")); fixnumClass.defineMethod("freeze", callbackFactory.getMethod("freeze")); fixnumClass.defineMethod("<<", callbackFactory.getMethod("op_lshift", RubyNumeric.class)); fixnumClass.defineMethod(">>", callbackFactory.getMethod("op_rshift", RubyNumeric.class)); fixnumClass.defineMethod("+", callbackFactory.getMethod("op_plus", RubyNumeric.class)); fixnumClass.defineMethod("-", callbackFactory.getMethod("op_minus", RubyNumeric.class)); fixnumClass.defineMethod("*", callbackFactory.getMethod("op_mul", RubyNumeric.class)); fixnumClass.defineMethod("/", callbackFactory.getMethod("op_div", RubyNumeric.class)); fixnumClass.defineMethod("%", callbackFactory.getMethod("op_mod", RubyNumeric.class)); fixnumClass.defineMethod("**", callbackFactory.getMethod("op_pow", RubyNumeric.class)); fixnumClass.defineMethod("&", callbackFactory.getMethod("op_and", RubyNumeric.class)); fixnumClass.defineMethod("|", callbackFactory.getMethod("op_or", RubyNumeric.class)); fixnumClass.defineMethod("^", callbackFactory.getMethod("op_xor", RubyNumeric.class)); fixnumClass.defineMethod("size", callbackFactory.getMethod("size")); fixnumClass.defineMethod("[]", callbackFactory.getMethod("aref", RubyNumeric.class)); fixnumClass.defineMethod("hash", callbackFactory.getMethod("hash")); fixnumClass.defineMethod("id2name", callbackFactory.getMethod("id2name")); fixnumClass.defineMethod("~", callbackFactory.getMethod("invert")); fixnumClass.defineMethod("id", callbackFactory.getMethod("id")); fixnumClass.defineSingletonMethod("induced_from", callbackFactory.getSingletonMethod("induced_from", IRubyObject.class)); return fixnumClass; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/81d863f72452a85654d8e0c299b8251df8b8922a/RubyFixnum.java/clean/src/org/jruby/RubyFixnum.java |
public RubyNumeric op_plus(RubyNumeric other) { | public IRubyObject op_plus(IRubyObject other) { | public RubyNumeric op_plus(RubyNumeric other) { if (other instanceof RubyFloat) { return ((RubyFloat)other).op_plus(this); } else if (other instanceof RubyBignum) { return ((RubyBignum)other).op_plus(this); } else { long otherValue = other.getLongValue(); long result = value + otherValue; if ((value < 0 && otherValue < 0 && (result > 0 || result < -MAX)) || (value > 0 && otherValue > 0 && (result < 0 || result > MAX))) { return RubyBignum.newBignum(getRuntime(), value).op_plus(other); } return newFixnum(result); } } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/81d863f72452a85654d8e0c299b8251df8b8922a/RubyFixnum.java/clean/src/org/jruby/RubyFixnum.java |
return ((RubyFloat)other).op_plus(this); } else if (other instanceof RubyBignum) { return ((RubyBignum)other).op_plus(this); } else { long otherValue = other.getLongValue(); | return getRuntime().newFloat(getDoubleValue() + ((RubyFloat)other).getDoubleValue()); } else if (other instanceof RubyFixnum) { long otherValue = ((RubyFixnum)other).getLongValue(); | public RubyNumeric op_plus(RubyNumeric other) { if (other instanceof RubyFloat) { return ((RubyFloat)other).op_plus(this); } else if (other instanceof RubyBignum) { return ((RubyBignum)other).op_plus(this); } else { long otherValue = other.getLongValue(); long result = value + otherValue; if ((value < 0 && otherValue < 0 && (result > 0 || result < -MAX)) || (value > 0 && otherValue > 0 && (result < 0 || result > MAX))) { return RubyBignum.newBignum(getRuntime(), value).op_plus(other); } return newFixnum(result); } } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/81d863f72452a85654d8e0c299b8251df8b8922a/RubyFixnum.java/clean/src/org/jruby/RubyFixnum.java |
if ((value < 0 && otherValue < 0 && (result > 0 || result < -MAX)) || | if (other instanceof RubyBignum || (value < 0 && otherValue < 0 && (result > 0 || result < -MAX)) || | public RubyNumeric op_plus(RubyNumeric other) { if (other instanceof RubyFloat) { return ((RubyFloat)other).op_plus(this); } else if (other instanceof RubyBignum) { return ((RubyBignum)other).op_plus(this); } else { long otherValue = other.getLongValue(); long result = value + otherValue; if ((value < 0 && otherValue < 0 && (result > 0 || result < -MAX)) || (value > 0 && otherValue > 0 && (result < 0 || result > MAX))) { return RubyBignum.newBignum(getRuntime(), value).op_plus(other); } return newFixnum(result); } } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/81d863f72452a85654d8e0c299b8251df8b8922a/RubyFixnum.java/clean/src/org/jruby/RubyFixnum.java |
return RubyBignum.newBignum(getRuntime(), value).op_plus(other); | return RubyBignum.newBignum(getRuntime(), value).op_plus((RubyFixnum)other); | public RubyNumeric op_plus(RubyNumeric other) { if (other instanceof RubyFloat) { return ((RubyFloat)other).op_plus(this); } else if (other instanceof RubyBignum) { return ((RubyBignum)other).op_plus(this); } else { long otherValue = other.getLongValue(); long result = value + otherValue; if ((value < 0 && otherValue < 0 && (result > 0 || result < -MAX)) || (value > 0 && otherValue > 0 && (result < 0 || result > MAX))) { return RubyBignum.newBignum(getRuntime(), value).op_plus(other); } return newFixnum(result); } } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/81d863f72452a85654d8e0c299b8251df8b8922a/RubyFixnum.java/clean/src/org/jruby/RubyFixnum.java |
return callCoerced("+", other); | public RubyNumeric op_plus(RubyNumeric other) { if (other instanceof RubyFloat) { return ((RubyFloat)other).op_plus(this); } else if (other instanceof RubyBignum) { return ((RubyBignum)other).op_plus(this); } else { long otherValue = other.getLongValue(); long result = value + otherValue; if ((value < 0 && otherValue < 0 && (result > 0 || result < -MAX)) || (value > 0 && otherValue > 0 && (result < 0 || result > MAX))) { return RubyBignum.newBignum(getRuntime(), value).op_plus(other); } return newFixnum(result); } } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/81d863f72452a85654d8e0c299b8251df8b8922a/RubyFixnum.java/clean/src/org/jruby/RubyFixnum.java |
|
camera.addChild(palette); | public void addPalette(BPalette palette) { if(palette == null) { return; } palettes.add(palette); camera.addChild(palette); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/913e45a73e803bf6a97dca24496a64546a51c9d5/BrowserCamera.java/buggy/SRC/org/openmicroscopy/shoola/agents/browser/ui/BrowserCamera.java |
|
annotate = new JMenuItem("Annotate", im.getIcon(IconManager.ANNOTATE)), | private ThumbWinPopupMenu() { IconManager im = IconManager.getInstance(); JMenuItem properties = new JMenuItem("Properties", im.getIcon(IconManager.PROPERTIES)), annotate = new JMenuItem("Annotate", im.getIcon(IconManager.ANNOTATE)), classify = new JMenuItem("Add to category"), declassify = new JMenuItem("Remove from category"), view = new JMenuItem("View", im.getIcon(IconManager.VIEWER)); setBorder(BorderFactory.createBevelBorder(BevelBorder.RAISED)); add(properties); add(annotate); add(createClassifySubMenu(classify, declassify)); add(new JSeparator(SwingConstants.HORIZONTAL)); add(view); properties.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent ae) { new PropertiesCmd(currentWin.getDataObject()).execute(); } }); annotate.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent ae) { new AnnotateCmd(currentWin.getDataObject()).execute(); } }); classify.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent ae) { ClassifyCmd cmd = new ClassifyCmd( (ImageData) currentWin.getDataObject(), Classifier.CLASSIFICATION_MODE, currentWin.getParentFrame()); cmd.execute(); } }); declassify.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent ae) { ClassifyCmd cmd = new ClassifyCmd( (ImageData) currentWin.getDataObject(), Classifier.DECLASSIFICATION_MODE, currentWin.getParentFrame()); cmd.execute(); } }); view.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent ae) { new ViewCmd(currentWin.getDataObject()).execute(); } }); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/b4992016524102ee0a5c7465d4cc7a94e9ffce2d/ThumbWinPopupMenu.java/clean/SRC/org/openmicroscopy/shoola/agents/hiviewer/view/ThumbWinPopupMenu.java |
|
view = new JMenuItem("View", im.getIcon(IconManager.VIEWER)); | view = new JMenuItem("View", im.getIcon(IconManager.VIEWER)), annotate = new JMenuItem("Annotate", im.getIcon(IconManager.ANNOTATE)); | private ThumbWinPopupMenu() { IconManager im = IconManager.getInstance(); JMenuItem properties = new JMenuItem("Properties", im.getIcon(IconManager.PROPERTIES)), annotate = new JMenuItem("Annotate", im.getIcon(IconManager.ANNOTATE)), classify = new JMenuItem("Add to category"), declassify = new JMenuItem("Remove from category"), view = new JMenuItem("View", im.getIcon(IconManager.VIEWER)); setBorder(BorderFactory.createBevelBorder(BevelBorder.RAISED)); add(properties); add(annotate); add(createClassifySubMenu(classify, declassify)); add(new JSeparator(SwingConstants.HORIZONTAL)); add(view); properties.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent ae) { new PropertiesCmd(currentWin.getDataObject()).execute(); } }); annotate.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent ae) { new AnnotateCmd(currentWin.getDataObject()).execute(); } }); classify.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent ae) { ClassifyCmd cmd = new ClassifyCmd( (ImageData) currentWin.getDataObject(), Classifier.CLASSIFICATION_MODE, currentWin.getParentFrame()); cmd.execute(); } }); declassify.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent ae) { ClassifyCmd cmd = new ClassifyCmd( (ImageData) currentWin.getDataObject(), Classifier.DECLASSIFICATION_MODE, currentWin.getParentFrame()); cmd.execute(); } }); view.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent ae) { new ViewCmd(currentWin.getDataObject()).execute(); } }); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/b4992016524102ee0a5c7465d4cc7a94e9ffce2d/ThumbWinPopupMenu.java/clean/SRC/org/openmicroscopy/shoola/agents/hiviewer/view/ThumbWinPopupMenu.java |
new AnnotateCmd(currentWin.getDataObject()).execute(); | new AnnotateCmd(currentWin.getModel(), currentWin.getSelectedNode()).execute(); | private ThumbWinPopupMenu() { IconManager im = IconManager.getInstance(); JMenuItem properties = new JMenuItem("Properties", im.getIcon(IconManager.PROPERTIES)), annotate = new JMenuItem("Annotate", im.getIcon(IconManager.ANNOTATE)), classify = new JMenuItem("Add to category"), declassify = new JMenuItem("Remove from category"), view = new JMenuItem("View", im.getIcon(IconManager.VIEWER)); setBorder(BorderFactory.createBevelBorder(BevelBorder.RAISED)); add(properties); add(annotate); add(createClassifySubMenu(classify, declassify)); add(new JSeparator(SwingConstants.HORIZONTAL)); add(view); properties.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent ae) { new PropertiesCmd(currentWin.getDataObject()).execute(); } }); annotate.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent ae) { new AnnotateCmd(currentWin.getDataObject()).execute(); } }); classify.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent ae) { ClassifyCmd cmd = new ClassifyCmd( (ImageData) currentWin.getDataObject(), Classifier.CLASSIFICATION_MODE, currentWin.getParentFrame()); cmd.execute(); } }); declassify.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent ae) { ClassifyCmd cmd = new ClassifyCmd( (ImageData) currentWin.getDataObject(), Classifier.DECLASSIFICATION_MODE, currentWin.getParentFrame()); cmd.execute(); } }); view.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent ae) { new ViewCmd(currentWin.getDataObject()).execute(); } }); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/b4992016524102ee0a5c7465d4cc7a94e9ffce2d/ThumbWinPopupMenu.java/clean/SRC/org/openmicroscopy/shoola/agents/hiviewer/view/ThumbWinPopupMenu.java |
private ThumbWinPopupMenu() { IconManager im = IconManager.getInstance(); JMenuItem properties = new JMenuItem("Properties", im.getIcon(IconManager.PROPERTIES)), annotate = new JMenuItem("Annotate", im.getIcon(IconManager.ANNOTATE)), classify = new JMenuItem("Add to category"), declassify = new JMenuItem("Remove from category"), view = new JMenuItem("View", im.getIcon(IconManager.VIEWER)); setBorder(BorderFactory.createBevelBorder(BevelBorder.RAISED)); add(properties); add(annotate); add(createClassifySubMenu(classify, declassify)); add(new JSeparator(SwingConstants.HORIZONTAL)); add(view); properties.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent ae) { new PropertiesCmd(currentWin.getDataObject()).execute(); } }); annotate.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent ae) { new AnnotateCmd(currentWin.getDataObject()).execute(); } }); classify.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent ae) { ClassifyCmd cmd = new ClassifyCmd( (ImageData) currentWin.getDataObject(), Classifier.CLASSIFICATION_MODE, currentWin.getParentFrame()); cmd.execute(); } }); declassify.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent ae) { ClassifyCmd cmd = new ClassifyCmd( (ImageData) currentWin.getDataObject(), Classifier.DECLASSIFICATION_MODE, currentWin.getParentFrame()); cmd.execute(); } }); view.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent ae) { new ViewCmd(currentWin.getDataObject()).execute(); } }); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/b4992016524102ee0a5c7465d4cc7a94e9ffce2d/ThumbWinPopupMenu.java/clean/SRC/org/openmicroscopy/shoola/agents/hiviewer/view/ThumbWinPopupMenu.java |
||
new AnnotateCmd(currentWin.getDataObject()).execute(); | new AnnotateCmd(currentWin.getModel(), currentWin.getSelectedNode()).execute(); | public void actionPerformed(ActionEvent ae) { new AnnotateCmd(currentWin.getDataObject()).execute(); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/b4992016524102ee0a5c7465d4cc7a94e9ffce2d/ThumbWinPopupMenu.java/clean/SRC/org/openmicroscopy/shoola/agents/hiviewer/view/ThumbWinPopupMenu.java |
private void showMenu() { Point p = currentWin.getPopupPoint(); Point pNew = SwingUtilities.convertPoint(currentWin, p.x, p.y, null); show(currentWin.getParent(), pNew.x, pNew.y); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/b4992016524102ee0a5c7465d4cc7a94e9ffce2d/ThumbWinPopupMenu.java/clean/SRC/org/openmicroscopy/shoola/agents/hiviewer/view/ThumbWinPopupMenu.java |
||
log.info("Using root path: '" + path + "'"); | if ( log.isDebugEnabled() ) { log.debug("Using root path: '" + path + "'"); } | public AbstractFileSystemService(String path) { log.info("Using root path: '" + path + "'"); this.root = path; File rootDirectory = new File(this.root); if ( ! rootDirectory.isDirectory() || ! rootDirectory.canRead() || ! rootDirectory.canWrite() ) throw new IllegalArgumentException("Invalid directory specified for file system service."); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/9c735beaf7566accca575d2206f57f51b950ee15/AbstractFileSystemService.java/clean/components/romio/src/ome/io/nio/AbstractFileSystemService.java |
rethrow("Can't parse OMERODS entry.", dex); | rethrow("Can't parse OMERO entry.", dex); | protected void setContent(Node node) throws ConfigException { try { if (node.hasChildNodes()) value = parseTag(node); } catch (DOMException dex) { rethrow("Can't parse OMERODS entry.", dex); } } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/bbd964029121f2811ba2b7cf47a392087032888c/OMEROEntry.java/clean/SRC/org/openmicroscopy/shoola/env/config/OMEROEntry.java |
setDatasets( new HashSet( p.collectFromDatasetLinks( block ))); | setDatasets( new HashSet( p.eachLinkedDataset( block ))); | public void copy(IObject model, ModelMapper mapper) { if (model instanceof Project) { Project p = (Project) model; super.copy(model,mapper); // Details if (p.getDetails() != null){ this.setOwner((ExperimenterData) mapper.findTarget(p.getDetails().getOwner())); } // Fields this.setName(p.getName()); this.setDescription(p.getDescription()); // Collections MapperBlock block = new MapperBlock( mapper ); setDatasets( new HashSet( p.collectFromDatasetLinks( block ))); } else { throw new IllegalArgumentException( "ProjectData copies only from Project"); } } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/7b5c704279f82fa929138305f70f2f5e6b462c69/ProjectData.java/clean/components/shoola-adapter/src/pojos/ProjectData.java |
public RubyModule(Ruby ruby, RubyModule rubyClass, RubyModule superClass) { super(ruby, rubyClass); this.superClass = superClass; | public RubyModule(Ruby ruby) { this(ruby, null); | public RubyModule(Ruby ruby, RubyModule rubyClass, RubyModule superClass) { super(ruby, rubyClass); this.superClass = superClass; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/03950522a75c28f406bd4cb011cb1916a662366d/RubyModule.java/buggy/org/jruby/RubyModule.java |
System.err.println("exited"); | public void respondMouseExit(PInputEvent e) { System.err.println("exited"); getParent().removeChild(this); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/a1f87afb3571b02f52d0f463a29be7fc2083f1d4/SemanticZoomNode.java/buggy/SRC/org/openmicroscopy/shoola/agents/browser/ui/SemanticZoomNode.java |
|
ImagePaintingFactory.paintScaleBar(g2D, width-size-10, | if(viewRect.width >= size) ImagePaintingFactory.paintScaleBar(g2D, width-size-10, | public void paintComponent(Graphics g) { super.paintComponent(g); BufferedImage img = model.getDisplayedImage(); if (img == null) return; Graphics2D g2D = (Graphics2D) g; ImagePaintingFactory.setGraphicRenderingSettings(g2D); g2D.drawImage(img, null, 0, 0); if (model.isUnitBar()) { String value = model.getUnitBarValue(); if (value != null) { int size = (int) (model.getUnitBarSize()); // Position scalebar in the bottom left of the viewport or // the image which ever is viewable. Rectangle imgRect = new Rectangle(0, 0, img.getWidth(), img.getHeight()); Rectangle viewRect = view.getViewport().getBounds(); int x = (int) view.getViewport().getViewPosition().getX(); int y = (int) view.getViewport().getViewPosition().getY(); int width = Math.min(x+viewRect.width, img.getWidth()); int height = Math.min(y+viewRect.height, img.getHeight()); if (imgRect.contains(viewRect)) { width = x+viewRect.width; height = y+viewRect.height; } ImagePaintingFactory.paintScaleBar(g2D, width-size-10, height-10, size, value); } } } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/70af2b53ede1e70eb3573db44238cd870bea85cd/BrowserCanvas.java/buggy/SRC/org/openmicroscopy/shoola/agents/imviewer/browser/BrowserCanvas.java |
if (value.equals("0")) return null; | String getUnitBarValue(double factor) { double v = getPixelsSizeX()/factor; v *= getUnitBarSize(); String value; double c = v; if (v < 0) return null; if ((c-Math.floor(c)) > 0) value = ""+Math.round(c*100)/100f; else value = ""+(int) c; return value; } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/5caa05ab93022edbd6aaba0c505784dcbed59934/BrowserModel.java/buggy/SRC/org/openmicroscopy/shoola/agents/imviewer/browser/BrowserModel.java |
|
return "ImagePixel"+(attributeId==null ? ":Hash"+this.hashCode() : ":"+attributeId); | return "ImagePixel"+(attributeId==null ? ":Hash_"+this.hashCode() : ":Id_"+attributeId); | public String toString(){ return "ImagePixel"+(attributeId==null ? ":Hash"+this.hashCode() : ":"+attributeId); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/51a3c546dfc7a7a98b29771a459df19094fc5b51/ImagePixel.java/buggy/components/common/src/ome/model/ImagePixel.java |
} else if (name.equals(DOEditor.CANCEL_EDITION_PROPERTY) || | } else if (name.equals(EditorUI.CANCEL_EDITION_PROPERTY) || | public void propertyChange(PropertyChangeEvent pce) { String name = pce.getPropertyName(); if (name.equals(Browser.CANCEL_PROPERTY)) { Browser browser = model.getSelectedBrowser(); if (browser != null) browser.cancel(); } else if (name.equals(Browser.POPUP_MENU_PROPERTY)) { Component c = (Component) pce.getNewValue(); Browser browser = model.getSelectedBrowser(); if (browser != null && c != null) view.showPopup(c, browser.getClickPoint()); } else if (name.equals(Browser.CLOSE_PROPERTY)) { Browser browser = (Browser) pce.getNewValue(); if (browser != null) view.removeBrowser(browser); } else if (name.equals(DOEditor.CANCEL_EDITION_PROPERTY) || name.equals(Classifier.CANCEL_CLASSIFICATION_PROPERTY) || name.equals(Browser.SELECTED_DISPLAY_PROPERTY)) { model.removeEditor(); } else if (name.equals(Finder.CLOSE_FINDER_PROPERTY)) { clearFind(); model.showFinder(false); } else if (name.equals(TreeViewer.SELECTED_BROWSER_PROPERTY)) { Browser b = model.getSelectedBrowser(); Iterator i = model.getBrowsers().values().iterator(); Browser browser; while (i.hasNext()) { browser = (Browser) i.next(); browser.setSelected(browser.equals(b)); } } else if (name.equals(TreeViewer.REMOVE_EDITOR_PROPERTY)) { model.cancel(); } else if (name.equals(Classifier.CLASSIFY_PROPERTY)) { model.classifyImage((Map) pce.getNewValue()); } else if (name.equals(Classifier.DECLASSIFY_PROPERTY)) { model.declassifyImage((Map) pce.getNewValue()); } else if (name.equals(Classifier.BROWSE_PROPERTY)) { model.browse((DataObject) pce.getNewValue()); } } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/87529caa0141a437103c7c854aeb743ee032cbac/TreeViewerControl.java/buggy/SRC/org/openmicroscopy/shoola/agents/treeviewer/view/TreeViewerControl.java |
public org.openmicroscopy.omero.model.Image getImage() { | public Image getImage() { | public org.openmicroscopy.omero.model.Image getImage() { return this.image; } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/9570ef74198a070d72e77c417c9d25244a942de2/ImagePlate.java/buggy/components/common/src/org/openmicroscopy/omero/model/ImagePlate.java |
public void setImage(org.openmicroscopy.omero.model.Image image) { | public void setImage(Image image) { | public void setImage(org.openmicroscopy.omero.model.Image image) { this.image = image; } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/9570ef74198a070d72e77c417c9d25244a942de2/ImagePlate.java/buggy/components/common/src/org/openmicroscopy/omero/model/ImagePlate.java |
public org.openmicroscopy.omero.model.ModuleExecution getModuleExecution() { | public ModuleExecution getModuleExecution() { | public org.openmicroscopy.omero.model.ModuleExecution getModuleExecution() { return this.moduleExecution; } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/9570ef74198a070d72e77c417c9d25244a942de2/ImagePlate.java/buggy/components/common/src/org/openmicroscopy/omero/model/ImagePlate.java |
public void setModuleExecution(org.openmicroscopy.omero.model.ModuleExecution moduleExecution) { | public void setModuleExecution(ModuleExecution moduleExecution) { | public void setModuleExecution(org.openmicroscopy.omero.model.ModuleExecution moduleExecution) { this.moduleExecution = moduleExecution; } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/9570ef74198a070d72e77c417c9d25244a942de2/ImagePlate.java/buggy/components/common/src/org/openmicroscopy/omero/model/ImagePlate.java |
if (!(value instanceof RubyArray)) { value = RubyArray.newArray(runtime, value); } | public void visitMultipleAsgnNode(MultipleAsgnNode iVisited) { result = threadContext.mAssign(self, iVisited, (RubyArray)value, check); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/bf125d5fbc0df90b3725b8aa6ba61235c796f18e/AssignmentVisitor.java/clean/src/org/jruby/evaluator/AssignmentVisitor.java |
|
public TwoKnobsSlider(int min, int max, int start, int end) | public TwoKnobsSlider() | public TwoKnobsSlider(int min, int max, int start, int end) { model = new TwoKnobsSliderModel(max, min, start, end); uiDelegate = new TwoKnobsSliderUI(this, model); attachListeners(); setDefault(); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/43f8c678f03aa7cac6a19865461c28a00cf7eb2b/TwoKnobsSlider.java/buggy/SRC/org/openmicroscopy/shoola/util/ui/slider/TwoKnobsSlider.java |
model = new TwoKnobsSliderModel(max, min, start, end); uiDelegate = new TwoKnobsSliderUI(this, model); attachListeners(); setDefault(); | this(TwoKnobsSliderModel.DEFAULT_MIN, TwoKnobsSliderModel.DEFAULT_MAX, TwoKnobsSliderModel.DEFAULT_MIN, TwoKnobsSliderModel.DEFAULT_MAX); | public TwoKnobsSlider(int min, int max, int start, int end) { model = new TwoKnobsSliderModel(max, min, start, end); uiDelegate = new TwoKnobsSliderUI(this, model); attachListeners(); setDefault(); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/43f8c678f03aa7cac6a19865461c28a00cf7eb2b/TwoKnobsSlider.java/buggy/SRC/org/openmicroscopy/shoola/util/ui/slider/TwoKnobsSlider.java |
this.ruby = ruby; | this.runtime = ruby; | public MarshalStream(Ruby ruby, OutputStream out, int depthLimit) throws IOException { super(out); this.ruby = ruby; this.depthLimit = (depthLimit >= 0 ? depthLimit : Integer.MAX_VALUE); out.write(Constants.MARSHAL_MAJOR); out.write(Constants.MARSHAL_MINOR); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/034747585fcabe56272dd07acab0ab42ce8450d5/MarshalStream.java/buggy/org/jruby/runtime/marshal/MarshalStream.java |
this.cache = new MarshalCache(ruby); | public MarshalStream(Ruby ruby, OutputStream out, int depthLimit) throws IOException { super(out); this.ruby = ruby; this.depthLimit = (depthLimit >= 0 ? depthLimit : Integer.MAX_VALUE); out.write(Constants.MARSHAL_MAJOR); out.write(Constants.MARSHAL_MINOR); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/034747585fcabe56272dd07acab0ab42ce8450d5/MarshalStream.java/buggy/org/jruby/runtime/marshal/MarshalStream.java |
|
return (! value.isNil() && ! (value instanceof RubyBoolean)); | if (value.isNil()) { return false; } else if (value instanceof RubyBoolean) { return false; } else if (value instanceof RubyFixnum) { return false; } return true; | private boolean shouldBeRegistered(IRubyObject value) { return (! value.isNil() && ! (value instanceof RubyBoolean)); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/034747585fcabe56272dd07acab0ab42ce8450d5/MarshalStream.java/buggy/org/jruby/runtime/marshal/MarshalStream.java |
dumpObject(RubySymbol.newSymbol(ruby, value.getInternalClass().getClassname())); | dumpObject(RubySymbol.newSymbol(runtime, value.getInternalClass().getClassname())); | private void userMarshal(IRubyObject value) throws IOException { out.write('u'); dumpObject(RubySymbol.newSymbol(ruby, value.getInternalClass().getClassname())); RubyInteger depth = RubyFixnum.newFixnum(ruby, depthLimit); RubyString marshaled = (RubyString) value.callMethod("_dump", depth); dumpString(marshaled.getValue()); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/034747585fcabe56272dd07acab0ab42ce8450d5/MarshalStream.java/buggy/org/jruby/runtime/marshal/MarshalStream.java |
RubyInteger depth = RubyFixnum.newFixnum(ruby, depthLimit); | RubyInteger depth = RubyFixnum.newFixnum(runtime, depthLimit); | private void userMarshal(IRubyObject value) throws IOException { out.write('u'); dumpObject(RubySymbol.newSymbol(ruby, value.getInternalClass().getClassname())); RubyInteger depth = RubyFixnum.newFixnum(ruby, depthLimit); RubyString marshaled = (RubyString) value.callMethod("_dump", depth); dumpString(marshaled.getValue()); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/034747585fcabe56272dd07acab0ab42ce8450d5/MarshalStream.java/buggy/org/jruby/runtime/marshal/MarshalStream.java |
writeAndRegister(dumpedObjects, '@', value); | if (cache.isRegistered(value)) { out.write(linkType(value)); dumpInt(cache.registeredIndex(value)); } else { cache.register(value); value.marshalTo(this); } | private void writeAndRegister(IRubyObject value) throws IOException { writeAndRegister(dumpedObjects, '@', value); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/034747585fcabe56272dd07acab0ab42ce8450d5/MarshalStream.java/buggy/org/jruby/runtime/marshal/MarshalStream.java |
throw new RubyBugException("unsupported encoding " + e); | Asserts.assertNotReached("unsupported encoding " + e); return null; | public static byte[] stringToBytes(String string) { try { return string.getBytes(encoding); } catch (java.io.UnsupportedEncodingException e) { throw new RubyBugException("unsupported encoding " + e); } } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/071973606d94103b2d5cb6c793aa1e8809fc7b2a/RubyString.java/buggy/org/jruby/RubyString.java |
public boolean isDefaultGroup(long groupID) throws IAdminException, UnknownException, PermissionsException | public boolean isDefaultGroup(String name) throws IAdminException, UnknownException, PermissionsException | public boolean isDefaultGroup(long groupID) throws IAdminException, UnknownException, PermissionsException { try { return (iAdmin.getDefaultGroup(currentUser).getId() == groupID); } catch(ome.conditions.ApiUsageException e) { ExceptionHandler.get().catchException(e); } return false; } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/c24ebf508ce40c35b2c509bdba29698588ce1204/Model.java/buggy/components/tools/admin/src/adminTool/model/Model.java |
return (iAdmin.getDefaultGroup(currentUser).getId() == groupID); | return (iAdmin.getDefaultGroup(currentUser).getId() == getGroupID(name)); | public boolean isDefaultGroup(long groupID) throws IAdminException, UnknownException, PermissionsException { try { return (iAdmin.getDefaultGroup(currentUser).getId() == groupID); } catch(ome.conditions.ApiUsageException e) { ExceptionHandler.get().catchException(e); } return false; } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/c24ebf508ce40c35b2c509bdba29698588ce1204/Model.java/buggy/components/tools/admin/src/adminTool/model/Model.java |
public Repository(Integer attributeId, String imageServerUrl, String path, Boolean isLocal, org.openmicroscopy.omero.model.ModuleExecution moduleExecution, Set thumbnails, Set imagePixels) { this.attributeId = attributeId; this.imageServerUrl = imageServerUrl; this.path = path; this.isLocal = isLocal; this.moduleExecution = moduleExecution; this.thumbnails = thumbnails; this.imagePixels = imagePixels; | public Repository() { | public Repository(Integer attributeId, String imageServerUrl, String path, Boolean isLocal, org.openmicroscopy.omero.model.ModuleExecution moduleExecution, Set thumbnails, Set imagePixels) { this.attributeId = attributeId; this.imageServerUrl = imageServerUrl; this.path = path; this.isLocal = isLocal; this.moduleExecution = moduleExecution; this.thumbnails = thumbnails; this.imagePixels = imagePixels; } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/9570ef74198a070d72e77c417c9d25244a942de2/Repository.java/buggy/components/common/src/org/openmicroscopy/omero/model/Repository.java |
public org.openmicroscopy.omero.model.ModuleExecution getModuleExecution() { | public ModuleExecution getModuleExecution() { | public org.openmicroscopy.omero.model.ModuleExecution getModuleExecution() { return this.moduleExecution; } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/9570ef74198a070d72e77c417c9d25244a942de2/Repository.java/buggy/components/common/src/org/openmicroscopy/omero/model/Repository.java |
public void setModuleExecution(org.openmicroscopy.omero.model.ModuleExecution moduleExecution) { | public void setModuleExecution(ModuleExecution moduleExecution) { | public void setModuleExecution(org.openmicroscopy.omero.model.ModuleExecution moduleExecution) { this.moduleExecution = moduleExecution; } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/9570ef74198a070d72e77c417c9d25244a942de2/Repository.java/buggy/components/common/src/org/openmicroscopy/omero/model/Repository.java |
super.encodeBegin(context); | public void encodeBegin(FacesContext context) throws IOException { if(clearOnInit) { //WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "clear"); ArticleItemBean bean = getArticleItemBean(); if(bean!=null){ bean.clear(); } } // WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "updateLocale");// updateEditButtons(); super.encodeBegin(context); IWContext iwc = IWContext.getIWContext(context); String resourcePath = iwc.getParameter(ContentViewer.PARAMETER_CONTENT_RESOURCE); String baseFolderPath = iwc.getParameter(ContentItemToolbar.PARAMETER_BASE_FOLDER_PATH); if(resourcePath!=null){ getArticleItemBean().setResourcePath(resourcePath); } if(baseFolderPath!=null){ getArticleItemBean().setBaseFolderLocation(baseFolderPath); } if(isInCreateMode()){ //if("create".equals(iwc.getParameter(ContentViewer.PARAMETER_ACTION))){ //WFUtil.invoke(ARTICLE_ITEM_BEAN_ID,"setFolderLocation",resourcePath,String.class); //getArticleItemBean().setFolderLocation(resourcePath); WebDAVCategories categoriesUI = (WebDAVCategories)getCategoryEditor(); categoriesUI.reset(); } else { //We are in edit mode and an article already exits //WFUtil.invoke(ARTICLE_ITEM_BEAN_ID,"load",resourcePath,String.class); try { //getArticleItemBean().load(resourcePath); getArticleItemBean().load(); WebDAVCategories categoriesUI = (WebDAVCategories)getCategoryEditor(); //Update the categoriesUI with the resourcePath given: if(categoriesUI!=null){ //there is no resourcepath set for the article if it's about to be created categoriesUI.setResourcePath(resourcePath); } } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); } } //} //else{ //}// if(((Boolean)WFUtil.invoke(ARTICLE_ITEM_BEAN_ID,"getLanguageChange")).booleanValue()) { //String languageChange=(String)WFUtil.invoke(ARTICLE_ITEM_BEAN_ID,"getLanguageChange"); String languageChange = getArticleItemBean().getLanguageChange(); if(languageChange!=null) { /*String articlePath = (String)WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "getArticlePath"); if(null!=articlePath && articlePath.length()>0) { boolean result = ((Boolean)WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "load",articlePath+"/"+languageChange+ArticleItemBean.ARTICLE_FILE_SUFFIX)).booleanValue(); if(!result) { System.out.println("Warning loading new language did not work!"); } } WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "setLanguageChange",""); */ getArticleItemBean().setLanguageChange(languageChange); } } | 57000 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57000/5db26355cf68616cbd8859fa37cd6aa73d783808/EditArticleView.java/buggy/src/java/com/idega/block/article/component/EditArticleView.java |
|
if(isInDeleteMode()){ try { getArticleItemBean().load(); } catch (Exception e) { e.printStackTrace(); } } super.encodeBegin(context); | public void encodeBegin(FacesContext context) throws IOException { if(clearOnInit) { //WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "clear"); ArticleItemBean bean = getArticleItemBean(); if(bean!=null){ bean.clear(); } } // WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "updateLocale");// updateEditButtons(); super.encodeBegin(context); IWContext iwc = IWContext.getIWContext(context); String resourcePath = iwc.getParameter(ContentViewer.PARAMETER_CONTENT_RESOURCE); String baseFolderPath = iwc.getParameter(ContentItemToolbar.PARAMETER_BASE_FOLDER_PATH); if(resourcePath!=null){ getArticleItemBean().setResourcePath(resourcePath); } if(baseFolderPath!=null){ getArticleItemBean().setBaseFolderLocation(baseFolderPath); } if(isInCreateMode()){ //if("create".equals(iwc.getParameter(ContentViewer.PARAMETER_ACTION))){ //WFUtil.invoke(ARTICLE_ITEM_BEAN_ID,"setFolderLocation",resourcePath,String.class); //getArticleItemBean().setFolderLocation(resourcePath); WebDAVCategories categoriesUI = (WebDAVCategories)getCategoryEditor(); categoriesUI.reset(); } else { //We are in edit mode and an article already exits //WFUtil.invoke(ARTICLE_ITEM_BEAN_ID,"load",resourcePath,String.class); try { //getArticleItemBean().load(resourcePath); getArticleItemBean().load(); WebDAVCategories categoriesUI = (WebDAVCategories)getCategoryEditor(); //Update the categoriesUI with the resourcePath given: if(categoriesUI!=null){ //there is no resourcepath set for the article if it's about to be created categoriesUI.setResourcePath(resourcePath); } } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); } } //} //else{ //}// if(((Boolean)WFUtil.invoke(ARTICLE_ITEM_BEAN_ID,"getLanguageChange")).booleanValue()) { //String languageChange=(String)WFUtil.invoke(ARTICLE_ITEM_BEAN_ID,"getLanguageChange"); String languageChange = getArticleItemBean().getLanguageChange(); if(languageChange!=null) { /*String articlePath = (String)WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "getArticlePath"); if(null!=articlePath && articlePath.length()>0) { boolean result = ((Boolean)WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "load",articlePath+"/"+languageChange+ArticleItemBean.ARTICLE_FILE_SUFFIX)).booleanValue(); if(!result) { System.out.println("Warning loading new language did not work!"); } } WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "setLanguageChange",""); */ getArticleItemBean().setLanguageChange(languageChange); } } | 57000 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57000/5db26355cf68616cbd8859fa37cd6aa73d783808/EditArticleView.java/buggy/src/java/com/idega/block/article/component/EditArticleView.java |
|
UIComponent categoriesUi = findComponent(WebDAVCategories.CATEGORIES_BLOCK_ID); return categoriesUi; | WebDAVCategories categoriesUI = (WebDAVCategories)findComponent(WebDAVCategories.CATEGORIES_BLOCK_ID); if(categoriesUI==null){ categoriesUI=new WebDAVCategories(); categoriesUI.setCategoriesOnParent(true); categoriesUI.setDisplaySaveButton(false); categoriesUI.setDisplayHeader(false); FacesContext context = getFacesContext(); String setCategories = (String) context.getExternalContext().getRequestParameterMap().get(ContentItemToolbar.PARAMETER_CATEGORIES); if(setCategories!=null){ categoriesUI.setCategories(setCategories); } } return categoriesUI; | private UIComponent getCategoryEditor() { UIComponent categoriesUi = findComponent(WebDAVCategories.CATEGORIES_BLOCK_ID); return categoriesUi; } | 57000 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57000/5db26355cf68616cbd8859fa37cd6aa73d783808/EditArticleView.java/buggy/src/java/com/idega/block/article/component/EditArticleView.java |
IWContext iwc = IWContext.getInstance(); | FacesContext context = FacesContext.getCurrentInstance(); IWContext iwc = IWContext.getIWContext(context); | public UIComponent getEditContainer() { IWContext iwc = IWContext.getInstance(); WFResourceUtil localizer = WFResourceUtil.getResourceUtilArticle();// String bref = WFPage.CONTENT_BUNDLE + "."; WFContainer mainContainer = new WFContainer(); mainContainer.setId(ARTICLE_EDITOR_ID); WFErrorMessages em = new WFErrorMessages(); em.addErrorMessage(HEADLINE_ID); em.addErrorMessage(TEASER_ID);// em.addErrorMessage(PUBLISHED_FROM_DATE_ID);// em.addErrorMessage(PUBLISHED_TO_DATE_ID); em.addErrorMessage(SAVE_ID); mainContainer.add(em); //Saving the state of the articleItemBean specially because the scpoe //of this bean now is 'request' not 'session' UISaveState beanSaveState = new UISaveState(); ValueBinding binding = WFUtil.createValueBinding("#{"+ARTICLE_ITEM_BEAN_ID+"}"); beanSaveState.setId("articleItemBeanSaveState"); beanSaveState.setValueBinding("value",binding); mainContainer.add(beanSaveState); HtmlPanelGrid p = WFPanelUtil.getPlainFormPanel(2); //Language dropdown p.getChildren().add(WFUtil.group(localizer.getTextVB("language"), WFUtil.getText(":"))); UIComponent langDropdown = getLanguageDropdownMenu(); p.getChildren().add(langDropdown); p.getChildren().add(WFUtil.group(localizer.getTextVB("headline"), WFUtil.getText(":")));// p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "language"), WFUtil.getText(":"))); HtmlInputText headlineInput = WFUtil.getInputText(HEADLINE_ID, ref + "headline"); headlineInput.setSize(70); p.getChildren().add(headlineInput); //HtmlSelectOneMenu localeMenu = WFUtil.getSelectOneMenu(LOCALE_ID, ref + "allLocales", ref + "pendingLocaleId"); //localeMenu.setOnchange("document.forms[0].submit();"); //p.getChildren().add(localeMenu); p.getChildren().add(WFUtil.group(localizer.getTextVB("author"), WFUtil.getText(":"))); HtmlInputText authorInput = WFUtil.getInputText(AUTHOR_ID, ref + "author"); authorInput.setSize(70); User user = iwc.getCurrentUser(); if(user!=null){ String userName = user.getName(); getArticleItemBean().setAuthor(userName); } p.getChildren().add(authorInput); //Article body p.getChildren().add(WFUtil.group(localizer.getTextVB("body"), WFUtil.getText(":"))); HTMLArea bodyArea = WFUtil.getHtmlAreaTextArea(BODY_ID, ref + "body", "500px", "400px"); //HTMLArea bodyArea = WFUtil.getHtmlAreaTextArea(BODY_ID, ref + "body"); /*bodyArea.addPlugin(HTMLArea.PLUGIN_TABLE_OPERATIONS); bodyArea.addPlugin(HTMLArea.PLUGIN_DYNAMIC_CSS, "3"); bodyArea.addPlugin(HTMLArea.PLUGIN_CSS, "3"); bodyArea.addPlugin(HTMLArea.PLUGIN_CONTEXT_MENU); bodyArea.addPlugin(HTMLArea.PLUGIN_LIST_TYPE); bodyArea.addPlugin(HTMLArea.PLUGIN_CHARACTER_MAP); */ bodyArea.setAllowFontSelection(false); //bodyArea.addPlugin("TableOperations"); //bodyArea.addPlugin("Template"); //bodyArea.addPlugin("Forms"); //bodyArea.addPlugin("FormOperations"); //bodyArea.addPlugin("EditTag"); //bodyArea.addPlugin("Stylist"); //bodyArea.addPlugin("CSS"); //bodyArea.addPlugin("DynamicCSS"); //bodyArea.addPlugin("FullPage"); //bodyArea.addPlugin("NoteServer"); //bodyArea.addPlugin("QuickTag"); //bodyArea.addPlugin("InsertSmiley"); //bodyArea.addPlugin("InsertWords"); //bodyArea.addPlugin("ContextMenu"); //bodyArea.addPlugin("LangMarks"); //bodyArea.addPlugin("DoubleClick"); //bodyArea.addPlugin("ListType"); //bodyArea.addPlugin("ImageManager"); p.getChildren().add(WFUtil.group(bodyArea, WFUtil.getBreak())); p.getChildren().add(WFUtil.group(localizer.getTextVB("teaser"), WFUtil.getText(":"))); HtmlInputTextarea teaserArea = WFUtil.getTextArea(TEASER_ID, ref + "teaser", "500px", "60px"); p.getChildren().add(teaserArea); p.getChildren().add(WFUtil.group(localizer.getTextVB("source"), WFUtil.getText(":"))); HtmlInputText sourceArea = WFUtil.getInputText(SOURCE_ID, ref + "source"); sourceArea.setSize(70); p.getChildren().add(sourceArea); p.getChildren().add(WFUtil.getBreak()); p.getChildren().add(WFUtil.getBreak()); // p = WFPanelUtil.getPlainFormPanel(1);/* p.getChildren().add(WFUtil.group(WFUtil.getHeaderTextVB(bref + "created"), WFUtil.getTextVB(ref + "creationDate") ));*/// p.getChildren().add(WFUtil.getText(" "));// UIComponent t = WFUtil.group(localizer.getHeaderTextVB("status"), WFUtil.getText(": "));// t.getChildren().add(WFUtil.getTextVB(ref + "status"));// p.getChildren().add(t); p.getChildren().add(WFUtil.group(localizer.getTextVB("status"), WFUtil.getText(":"))); p.getChildren().add(WFUtil.getTextVB(ref + "status")); p.getChildren().add(WFUtil.group(localizer.getTextVB("current_version"), WFUtil.getText(":"))); p.getChildren().add(WFUtil.getTextVB(ref + "versionName")); p.getChildren().add(WFUtil.getBreak()); p.getChildren().add(WFUtil.getBreak()); // p = WFPanelUtil.getFormPanel(2); p.getChildren().add(WFUtil.group(localizer.getTextVB("comment"), WFUtil.getText(":")));// p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "attachments"), WFUtil.getText(":"))); HtmlInputTextarea commentArea = WFUtil.getTextArea(COMMENT_ID, ref + "comment", "500px", "60px"); p.getChildren().add(commentArea);// WFContainer attachmentContainer = new WFContainer();// attachmentContainer.add(WFUtil.getButtonVB(ADD_ATTACHMENT_ID, bref + "add_attachment", this));// attachmentContainer.add(WFUtil.getBreak());// attachmentContainer.add(getAttachmentList());// p.getChildren().add(attachmentContainer); // mainContainer.add(p); // p = WFPanelUtil.getFormPanel(1);// p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "related_content_items"), WFUtil.getText(":"))); // WFContainer contentItemContainer = new WFContainer(); // contentItemContainer.add(WFUtil.getButtonVB(ADD_RELATED_CONTENT_ITEM_ID, bref + "add_content_item", this));// contentItemContainer.add(WFUtil.getBreak());// contentItemContainer.add(getRelatedContentItemsList());// p.getChildren().add(contentItemContainer);// p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "publishing_date"), WFUtil.getText(":"))); // WFDateInput publishedFromInput = WFUtil.getDateInput(PUBLISHED_FROM_DATE_ID, ref + "case.publishedFromDate");// publishedFromInput.setShowTime(true);// p.getChildren().add(publishedFromInput);// p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "expiration_date"), WFUtil.getText(":"))); // WFDateInput publishedToInput = WFUtil.getDateInput(PUBLISHED_TO_DATE_ID, ref + "case.publishedToDate");// publishedToInput.setShowTime(true);// p.getChildren().add(publishedToInput); // mainContainer.add(p); p.getChildren().add(WFUtil.getBreak()); p.getChildren().add(WFUtil.getBreak());// mainContainer.add(WFUtil.getBreak());// p = WFPanelUtil.getPlainFormPanel(1);// HtmlCommandButton editCategoriesButton = WFUtil.getButtonVB(EDIT_CATEGORIES_ID, bref + "edit_categories", this);// p.getChildren().add(editCategoriesButton); //Temporary taking away folderr location/* p.getChildren().add(WFUtil.group(localizer.getTextVB("folder"), WFUtil.getText(":"))); HtmlInputText folderInput = WFUtil.getInputText(FOLDER_ID, ref + "folderLocation"); if(null==folderInput.getValue() || "".equals(folderInput.getValue())) { String FolderString = ArticleUtil.getArticleYearMonthPath();// System.out.println("Folder "+FolderString); folderInput.setValue(FolderString); } else { File file = new File(folderInput.getValue().toString()); folderInput.setValue(file.getParentFile().getParent()); } folderInput.setSize(70); p.getChildren().add(folderInput); */ p.getChildren().add(WFUtil.getBreak()); //Categories// WebDAVCategories categoriesUI = new WebDAVCategories(); //ArticleItemBean articleItemBean = (ArticleItemBean) getArticleItemBean(); //String resourcePath = articleItemBean.getArticleResourcePath(); addCategoryEditor(p); p.getChildren().add(WFUtil.getBreak()); p.getChildren().add(WFUtil.getBreak()); p.getChildren().add(WFUtil.getBreak());// WFComponentSelector cs = new WFComponentSelector();// cs.setId(BUTTON_SELECTOR_ID);// cs.setDividerText(" "); HtmlCommandButton saveButton = localizer.getButtonVB(SAVE_ID, "save", this);// HtmlCommandButton saveButton = WFUtil.getButtonVB(SAVE_ID, WFPage.CONTENT_BUNDLE + "save", this);// cs.add(saveButton);// cs.add(WFUtil.getButtonVB(FOR_REVIEW_ID, bref + "for_review", this));// cs.add(WFUtil.getButtonVB(PUBLISH_ID, bref + "publish", this));// cs.add(WFUtil.getButtonVB(REWRITE_ID, bref + "rewrite", this));// cs.add(WFUtil.getButtonVB(REJECT_ID, bref + "reject", this));// cs.add(WFUtil.getButtonVB(DELETE_ID, bref + "delete", this));// cs.add(WFUtil.getButtonVB(CANCEL_ID, bref + "cancel", this));// cs.setSelectedId(CANCEL_ID, true);// p.getChildren().add(cs); p.getChildren().add(saveButton); mainContainer.add(p); //WFComponentSelector editorSelector = new WFComponentSelector(); //editorSelector.setId(EDITOR_SELECTOR_ID); //editorSelector.add(mainContainer); //editorSelector.add(getCategoryEditContainer());// FileUploadForm f = new FileUploadForm(this, FILE_UPLOAD_ID, FILE_UPLOAD_CANCEL_ID); //editorSelector.add(getRelatedContentItemsContainer()); //editorSelector.setSelectedId(ARTICLE_EDITOR_ID, true); //return editorSelector; return mainContainer; } | 57000 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57000/5db26355cf68616cbd8859fa37cd6aa73d783808/EditArticleView.java/buggy/src/java/com/idega/block/article/component/EditArticleView.java |
WFContainer mainContainer = new WFContainer(); mainContainer.setId(ARTICLE_EDITOR_ID); WFErrorMessages em = new WFErrorMessages(); em.addErrorMessage(HEADLINE_ID); em.addErrorMessage(TEASER_ID); em.addErrorMessage(SAVE_ID); mainContainer.add(em); UISaveState beanSaveState = new UISaveState(); ValueBinding binding = WFUtil.createValueBinding("#{"+ARTICLE_ITEM_BEAN_ID+"}"); beanSaveState.setId("articleItemBeanSaveState"); beanSaveState.setValueBinding("value",binding); mainContainer.add(beanSaveState); HtmlPanelGrid p = WFPanelUtil.getPlainFormPanel(2); | WFContainer mainContainer = getMainContainer(); | public UIComponent getEditContainer() { IWContext iwc = IWContext.getInstance(); WFResourceUtil localizer = WFResourceUtil.getResourceUtilArticle();// String bref = WFPage.CONTENT_BUNDLE + "."; WFContainer mainContainer = new WFContainer(); mainContainer.setId(ARTICLE_EDITOR_ID); WFErrorMessages em = new WFErrorMessages(); em.addErrorMessage(HEADLINE_ID); em.addErrorMessage(TEASER_ID);// em.addErrorMessage(PUBLISHED_FROM_DATE_ID);// em.addErrorMessage(PUBLISHED_TO_DATE_ID); em.addErrorMessage(SAVE_ID); mainContainer.add(em); //Saving the state of the articleItemBean specially because the scpoe //of this bean now is 'request' not 'session' UISaveState beanSaveState = new UISaveState(); ValueBinding binding = WFUtil.createValueBinding("#{"+ARTICLE_ITEM_BEAN_ID+"}"); beanSaveState.setId("articleItemBeanSaveState"); beanSaveState.setValueBinding("value",binding); mainContainer.add(beanSaveState); HtmlPanelGrid p = WFPanelUtil.getPlainFormPanel(2); //Language dropdown p.getChildren().add(WFUtil.group(localizer.getTextVB("language"), WFUtil.getText(":"))); UIComponent langDropdown = getLanguageDropdownMenu(); p.getChildren().add(langDropdown); p.getChildren().add(WFUtil.group(localizer.getTextVB("headline"), WFUtil.getText(":")));// p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "language"), WFUtil.getText(":"))); HtmlInputText headlineInput = WFUtil.getInputText(HEADLINE_ID, ref + "headline"); headlineInput.setSize(70); p.getChildren().add(headlineInput); //HtmlSelectOneMenu localeMenu = WFUtil.getSelectOneMenu(LOCALE_ID, ref + "allLocales", ref + "pendingLocaleId"); //localeMenu.setOnchange("document.forms[0].submit();"); //p.getChildren().add(localeMenu); p.getChildren().add(WFUtil.group(localizer.getTextVB("author"), WFUtil.getText(":"))); HtmlInputText authorInput = WFUtil.getInputText(AUTHOR_ID, ref + "author"); authorInput.setSize(70); User user = iwc.getCurrentUser(); if(user!=null){ String userName = user.getName(); getArticleItemBean().setAuthor(userName); } p.getChildren().add(authorInput); //Article body p.getChildren().add(WFUtil.group(localizer.getTextVB("body"), WFUtil.getText(":"))); HTMLArea bodyArea = WFUtil.getHtmlAreaTextArea(BODY_ID, ref + "body", "500px", "400px"); //HTMLArea bodyArea = WFUtil.getHtmlAreaTextArea(BODY_ID, ref + "body"); /*bodyArea.addPlugin(HTMLArea.PLUGIN_TABLE_OPERATIONS); bodyArea.addPlugin(HTMLArea.PLUGIN_DYNAMIC_CSS, "3"); bodyArea.addPlugin(HTMLArea.PLUGIN_CSS, "3"); bodyArea.addPlugin(HTMLArea.PLUGIN_CONTEXT_MENU); bodyArea.addPlugin(HTMLArea.PLUGIN_LIST_TYPE); bodyArea.addPlugin(HTMLArea.PLUGIN_CHARACTER_MAP); */ bodyArea.setAllowFontSelection(false); //bodyArea.addPlugin("TableOperations"); //bodyArea.addPlugin("Template"); //bodyArea.addPlugin("Forms"); //bodyArea.addPlugin("FormOperations"); //bodyArea.addPlugin("EditTag"); //bodyArea.addPlugin("Stylist"); //bodyArea.addPlugin("CSS"); //bodyArea.addPlugin("DynamicCSS"); //bodyArea.addPlugin("FullPage"); //bodyArea.addPlugin("NoteServer"); //bodyArea.addPlugin("QuickTag"); //bodyArea.addPlugin("InsertSmiley"); //bodyArea.addPlugin("InsertWords"); //bodyArea.addPlugin("ContextMenu"); //bodyArea.addPlugin("LangMarks"); //bodyArea.addPlugin("DoubleClick"); //bodyArea.addPlugin("ListType"); //bodyArea.addPlugin("ImageManager"); p.getChildren().add(WFUtil.group(bodyArea, WFUtil.getBreak())); p.getChildren().add(WFUtil.group(localizer.getTextVB("teaser"), WFUtil.getText(":"))); HtmlInputTextarea teaserArea = WFUtil.getTextArea(TEASER_ID, ref + "teaser", "500px", "60px"); p.getChildren().add(teaserArea); p.getChildren().add(WFUtil.group(localizer.getTextVB("source"), WFUtil.getText(":"))); HtmlInputText sourceArea = WFUtil.getInputText(SOURCE_ID, ref + "source"); sourceArea.setSize(70); p.getChildren().add(sourceArea); p.getChildren().add(WFUtil.getBreak()); p.getChildren().add(WFUtil.getBreak()); // p = WFPanelUtil.getPlainFormPanel(1);/* p.getChildren().add(WFUtil.group(WFUtil.getHeaderTextVB(bref + "created"), WFUtil.getTextVB(ref + "creationDate") ));*/// p.getChildren().add(WFUtil.getText(" "));// UIComponent t = WFUtil.group(localizer.getHeaderTextVB("status"), WFUtil.getText(": "));// t.getChildren().add(WFUtil.getTextVB(ref + "status"));// p.getChildren().add(t); p.getChildren().add(WFUtil.group(localizer.getTextVB("status"), WFUtil.getText(":"))); p.getChildren().add(WFUtil.getTextVB(ref + "status")); p.getChildren().add(WFUtil.group(localizer.getTextVB("current_version"), WFUtil.getText(":"))); p.getChildren().add(WFUtil.getTextVB(ref + "versionName")); p.getChildren().add(WFUtil.getBreak()); p.getChildren().add(WFUtil.getBreak()); // p = WFPanelUtil.getFormPanel(2); p.getChildren().add(WFUtil.group(localizer.getTextVB("comment"), WFUtil.getText(":")));// p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "attachments"), WFUtil.getText(":"))); HtmlInputTextarea commentArea = WFUtil.getTextArea(COMMENT_ID, ref + "comment", "500px", "60px"); p.getChildren().add(commentArea);// WFContainer attachmentContainer = new WFContainer();// attachmentContainer.add(WFUtil.getButtonVB(ADD_ATTACHMENT_ID, bref + "add_attachment", this));// attachmentContainer.add(WFUtil.getBreak());// attachmentContainer.add(getAttachmentList());// p.getChildren().add(attachmentContainer); // mainContainer.add(p); // p = WFPanelUtil.getFormPanel(1);// p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "related_content_items"), WFUtil.getText(":"))); // WFContainer contentItemContainer = new WFContainer(); // contentItemContainer.add(WFUtil.getButtonVB(ADD_RELATED_CONTENT_ITEM_ID, bref + "add_content_item", this));// contentItemContainer.add(WFUtil.getBreak());// contentItemContainer.add(getRelatedContentItemsList());// p.getChildren().add(contentItemContainer);// p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "publishing_date"), WFUtil.getText(":"))); // WFDateInput publishedFromInput = WFUtil.getDateInput(PUBLISHED_FROM_DATE_ID, ref + "case.publishedFromDate");// publishedFromInput.setShowTime(true);// p.getChildren().add(publishedFromInput);// p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "expiration_date"), WFUtil.getText(":"))); // WFDateInput publishedToInput = WFUtil.getDateInput(PUBLISHED_TO_DATE_ID, ref + "case.publishedToDate");// publishedToInput.setShowTime(true);// p.getChildren().add(publishedToInput); // mainContainer.add(p); p.getChildren().add(WFUtil.getBreak()); p.getChildren().add(WFUtil.getBreak());// mainContainer.add(WFUtil.getBreak());// p = WFPanelUtil.getPlainFormPanel(1);// HtmlCommandButton editCategoriesButton = WFUtil.getButtonVB(EDIT_CATEGORIES_ID, bref + "edit_categories", this);// p.getChildren().add(editCategoriesButton); //Temporary taking away folderr location/* p.getChildren().add(WFUtil.group(localizer.getTextVB("folder"), WFUtil.getText(":"))); HtmlInputText folderInput = WFUtil.getInputText(FOLDER_ID, ref + "folderLocation"); if(null==folderInput.getValue() || "".equals(folderInput.getValue())) { String FolderString = ArticleUtil.getArticleYearMonthPath();// System.out.println("Folder "+FolderString); folderInput.setValue(FolderString); } else { File file = new File(folderInput.getValue().toString()); folderInput.setValue(file.getParentFile().getParent()); } folderInput.setSize(70); p.getChildren().add(folderInput); */ p.getChildren().add(WFUtil.getBreak()); //Categories// WebDAVCategories categoriesUI = new WebDAVCategories(); //ArticleItemBean articleItemBean = (ArticleItemBean) getArticleItemBean(); //String resourcePath = articleItemBean.getArticleResourcePath(); addCategoryEditor(p); p.getChildren().add(WFUtil.getBreak()); p.getChildren().add(WFUtil.getBreak()); p.getChildren().add(WFUtil.getBreak());// WFComponentSelector cs = new WFComponentSelector();// cs.setId(BUTTON_SELECTOR_ID);// cs.setDividerText(" "); HtmlCommandButton saveButton = localizer.getButtonVB(SAVE_ID, "save", this);// HtmlCommandButton saveButton = WFUtil.getButtonVB(SAVE_ID, WFPage.CONTENT_BUNDLE + "save", this);// cs.add(saveButton);// cs.add(WFUtil.getButtonVB(FOR_REVIEW_ID, bref + "for_review", this));// cs.add(WFUtil.getButtonVB(PUBLISH_ID, bref + "publish", this));// cs.add(WFUtil.getButtonVB(REWRITE_ID, bref + "rewrite", this));// cs.add(WFUtil.getButtonVB(REJECT_ID, bref + "reject", this));// cs.add(WFUtil.getButtonVB(DELETE_ID, bref + "delete", this));// cs.add(WFUtil.getButtonVB(CANCEL_ID, bref + "cancel", this));// cs.setSelectedId(CANCEL_ID, true);// p.getChildren().add(cs); p.getChildren().add(saveButton); mainContainer.add(p); //WFComponentSelector editorSelector = new WFComponentSelector(); //editorSelector.setId(EDITOR_SELECTOR_ID); //editorSelector.add(mainContainer); //editorSelector.add(getCategoryEditContainer());// FileUploadForm f = new FileUploadForm(this, FILE_UPLOAD_ID, FILE_UPLOAD_CANCEL_ID); //editorSelector.add(getRelatedContentItemsContainer()); //editorSelector.setSelectedId(ARTICLE_EDITOR_ID, true); //return editorSelector; return mainContainer; } | 57000 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57000/5db26355cf68616cbd8859fa37cd6aa73d783808/EditArticleView.java/buggy/src/java/com/idega/block/article/component/EditArticleView.java |
p.getChildren().add(WFUtil.group(localizer.getTextVB("language"), WFUtil.getText(":"))); | public UIComponent getEditContainer() { IWContext iwc = IWContext.getInstance(); WFResourceUtil localizer = WFResourceUtil.getResourceUtilArticle();// String bref = WFPage.CONTENT_BUNDLE + "."; WFContainer mainContainer = new WFContainer(); mainContainer.setId(ARTICLE_EDITOR_ID); WFErrorMessages em = new WFErrorMessages(); em.addErrorMessage(HEADLINE_ID); em.addErrorMessage(TEASER_ID);// em.addErrorMessage(PUBLISHED_FROM_DATE_ID);// em.addErrorMessage(PUBLISHED_TO_DATE_ID); em.addErrorMessage(SAVE_ID); mainContainer.add(em); //Saving the state of the articleItemBean specially because the scpoe //of this bean now is 'request' not 'session' UISaveState beanSaveState = new UISaveState(); ValueBinding binding = WFUtil.createValueBinding("#{"+ARTICLE_ITEM_BEAN_ID+"}"); beanSaveState.setId("articleItemBeanSaveState"); beanSaveState.setValueBinding("value",binding); mainContainer.add(beanSaveState); HtmlPanelGrid p = WFPanelUtil.getPlainFormPanel(2); //Language dropdown p.getChildren().add(WFUtil.group(localizer.getTextVB("language"), WFUtil.getText(":"))); UIComponent langDropdown = getLanguageDropdownMenu(); p.getChildren().add(langDropdown); p.getChildren().add(WFUtil.group(localizer.getTextVB("headline"), WFUtil.getText(":")));// p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "language"), WFUtil.getText(":"))); HtmlInputText headlineInput = WFUtil.getInputText(HEADLINE_ID, ref + "headline"); headlineInput.setSize(70); p.getChildren().add(headlineInput); //HtmlSelectOneMenu localeMenu = WFUtil.getSelectOneMenu(LOCALE_ID, ref + "allLocales", ref + "pendingLocaleId"); //localeMenu.setOnchange("document.forms[0].submit();"); //p.getChildren().add(localeMenu); p.getChildren().add(WFUtil.group(localizer.getTextVB("author"), WFUtil.getText(":"))); HtmlInputText authorInput = WFUtil.getInputText(AUTHOR_ID, ref + "author"); authorInput.setSize(70); User user = iwc.getCurrentUser(); if(user!=null){ String userName = user.getName(); getArticleItemBean().setAuthor(userName); } p.getChildren().add(authorInput); //Article body p.getChildren().add(WFUtil.group(localizer.getTextVB("body"), WFUtil.getText(":"))); HTMLArea bodyArea = WFUtil.getHtmlAreaTextArea(BODY_ID, ref + "body", "500px", "400px"); //HTMLArea bodyArea = WFUtil.getHtmlAreaTextArea(BODY_ID, ref + "body"); /*bodyArea.addPlugin(HTMLArea.PLUGIN_TABLE_OPERATIONS); bodyArea.addPlugin(HTMLArea.PLUGIN_DYNAMIC_CSS, "3"); bodyArea.addPlugin(HTMLArea.PLUGIN_CSS, "3"); bodyArea.addPlugin(HTMLArea.PLUGIN_CONTEXT_MENU); bodyArea.addPlugin(HTMLArea.PLUGIN_LIST_TYPE); bodyArea.addPlugin(HTMLArea.PLUGIN_CHARACTER_MAP); */ bodyArea.setAllowFontSelection(false); //bodyArea.addPlugin("TableOperations"); //bodyArea.addPlugin("Template"); //bodyArea.addPlugin("Forms"); //bodyArea.addPlugin("FormOperations"); //bodyArea.addPlugin("EditTag"); //bodyArea.addPlugin("Stylist"); //bodyArea.addPlugin("CSS"); //bodyArea.addPlugin("DynamicCSS"); //bodyArea.addPlugin("FullPage"); //bodyArea.addPlugin("NoteServer"); //bodyArea.addPlugin("QuickTag"); //bodyArea.addPlugin("InsertSmiley"); //bodyArea.addPlugin("InsertWords"); //bodyArea.addPlugin("ContextMenu"); //bodyArea.addPlugin("LangMarks"); //bodyArea.addPlugin("DoubleClick"); //bodyArea.addPlugin("ListType"); //bodyArea.addPlugin("ImageManager"); p.getChildren().add(WFUtil.group(bodyArea, WFUtil.getBreak())); p.getChildren().add(WFUtil.group(localizer.getTextVB("teaser"), WFUtil.getText(":"))); HtmlInputTextarea teaserArea = WFUtil.getTextArea(TEASER_ID, ref + "teaser", "500px", "60px"); p.getChildren().add(teaserArea); p.getChildren().add(WFUtil.group(localizer.getTextVB("source"), WFUtil.getText(":"))); HtmlInputText sourceArea = WFUtil.getInputText(SOURCE_ID, ref + "source"); sourceArea.setSize(70); p.getChildren().add(sourceArea); p.getChildren().add(WFUtil.getBreak()); p.getChildren().add(WFUtil.getBreak()); // p = WFPanelUtil.getPlainFormPanel(1);/* p.getChildren().add(WFUtil.group(WFUtil.getHeaderTextVB(bref + "created"), WFUtil.getTextVB(ref + "creationDate") ));*/// p.getChildren().add(WFUtil.getText(" "));// UIComponent t = WFUtil.group(localizer.getHeaderTextVB("status"), WFUtil.getText(": "));// t.getChildren().add(WFUtil.getTextVB(ref + "status"));// p.getChildren().add(t); p.getChildren().add(WFUtil.group(localizer.getTextVB("status"), WFUtil.getText(":"))); p.getChildren().add(WFUtil.getTextVB(ref + "status")); p.getChildren().add(WFUtil.group(localizer.getTextVB("current_version"), WFUtil.getText(":"))); p.getChildren().add(WFUtil.getTextVB(ref + "versionName")); p.getChildren().add(WFUtil.getBreak()); p.getChildren().add(WFUtil.getBreak()); // p = WFPanelUtil.getFormPanel(2); p.getChildren().add(WFUtil.group(localizer.getTextVB("comment"), WFUtil.getText(":")));// p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "attachments"), WFUtil.getText(":"))); HtmlInputTextarea commentArea = WFUtil.getTextArea(COMMENT_ID, ref + "comment", "500px", "60px"); p.getChildren().add(commentArea);// WFContainer attachmentContainer = new WFContainer();// attachmentContainer.add(WFUtil.getButtonVB(ADD_ATTACHMENT_ID, bref + "add_attachment", this));// attachmentContainer.add(WFUtil.getBreak());// attachmentContainer.add(getAttachmentList());// p.getChildren().add(attachmentContainer); // mainContainer.add(p); // p = WFPanelUtil.getFormPanel(1);// p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "related_content_items"), WFUtil.getText(":"))); // WFContainer contentItemContainer = new WFContainer(); // contentItemContainer.add(WFUtil.getButtonVB(ADD_RELATED_CONTENT_ITEM_ID, bref + "add_content_item", this));// contentItemContainer.add(WFUtil.getBreak());// contentItemContainer.add(getRelatedContentItemsList());// p.getChildren().add(contentItemContainer);// p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "publishing_date"), WFUtil.getText(":"))); // WFDateInput publishedFromInput = WFUtil.getDateInput(PUBLISHED_FROM_DATE_ID, ref + "case.publishedFromDate");// publishedFromInput.setShowTime(true);// p.getChildren().add(publishedFromInput);// p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "expiration_date"), WFUtil.getText(":"))); // WFDateInput publishedToInput = WFUtil.getDateInput(PUBLISHED_TO_DATE_ID, ref + "case.publishedToDate");// publishedToInput.setShowTime(true);// p.getChildren().add(publishedToInput); // mainContainer.add(p); p.getChildren().add(WFUtil.getBreak()); p.getChildren().add(WFUtil.getBreak());// mainContainer.add(WFUtil.getBreak());// p = WFPanelUtil.getPlainFormPanel(1);// HtmlCommandButton editCategoriesButton = WFUtil.getButtonVB(EDIT_CATEGORIES_ID, bref + "edit_categories", this);// p.getChildren().add(editCategoriesButton); //Temporary taking away folderr location/* p.getChildren().add(WFUtil.group(localizer.getTextVB("folder"), WFUtil.getText(":"))); HtmlInputText folderInput = WFUtil.getInputText(FOLDER_ID, ref + "folderLocation"); if(null==folderInput.getValue() || "".equals(folderInput.getValue())) { String FolderString = ArticleUtil.getArticleYearMonthPath();// System.out.println("Folder "+FolderString); folderInput.setValue(FolderString); } else { File file = new File(folderInput.getValue().toString()); folderInput.setValue(file.getParentFile().getParent()); } folderInput.setSize(70); p.getChildren().add(folderInput); */ p.getChildren().add(WFUtil.getBreak()); //Categories// WebDAVCategories categoriesUI = new WebDAVCategories(); //ArticleItemBean articleItemBean = (ArticleItemBean) getArticleItemBean(); //String resourcePath = articleItemBean.getArticleResourcePath(); addCategoryEditor(p); p.getChildren().add(WFUtil.getBreak()); p.getChildren().add(WFUtil.getBreak()); p.getChildren().add(WFUtil.getBreak());// WFComponentSelector cs = new WFComponentSelector();// cs.setId(BUTTON_SELECTOR_ID);// cs.setDividerText(" "); HtmlCommandButton saveButton = localizer.getButtonVB(SAVE_ID, "save", this);// HtmlCommandButton saveButton = WFUtil.getButtonVB(SAVE_ID, WFPage.CONTENT_BUNDLE + "save", this);// cs.add(saveButton);// cs.add(WFUtil.getButtonVB(FOR_REVIEW_ID, bref + "for_review", this));// cs.add(WFUtil.getButtonVB(PUBLISH_ID, bref + "publish", this));// cs.add(WFUtil.getButtonVB(REWRITE_ID, bref + "rewrite", this));// cs.add(WFUtil.getButtonVB(REJECT_ID, bref + "reject", this));// cs.add(WFUtil.getButtonVB(DELETE_ID, bref + "delete", this));// cs.add(WFUtil.getButtonVB(CANCEL_ID, bref + "cancel", this));// cs.setSelectedId(CANCEL_ID, true);// p.getChildren().add(cs); p.getChildren().add(saveButton); mainContainer.add(p); //WFComponentSelector editorSelector = new WFComponentSelector(); //editorSelector.setId(EDITOR_SELECTOR_ID); //editorSelector.add(mainContainer); //editorSelector.add(getCategoryEditContainer());// FileUploadForm f = new FileUploadForm(this, FILE_UPLOAD_ID, FILE_UPLOAD_CANCEL_ID); //editorSelector.add(getRelatedContentItemsContainer()); //editorSelector.setSelectedId(ARTICLE_EDITOR_ID, true); //return editorSelector; return mainContainer; } | 57000 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57000/5db26355cf68616cbd8859fa37cd6aa73d783808/EditArticleView.java/buggy/src/java/com/idega/block/article/component/EditArticleView.java |
|
p.getChildren().add(langDropdown); p.getChildren().add(WFUtil.group(localizer.getTextVB("headline"), WFUtil.getText(":"))); | UIComponent languageText = WFUtil.group(localizer.getTextVB("language"), WFUtil.getText(":")); HtmlOutputLabel languageLabel = new HtmlOutputLabel(); languageLabel.getChildren().add(languageText); languageLabel.setFor(langDropdown.getClientId(context)); WFFormItem languageItem = new WFFormItem(); languageItem.add(languageLabel); languageItem.add(langDropdown); mainContainer.add(languageItem); | public UIComponent getEditContainer() { IWContext iwc = IWContext.getInstance(); WFResourceUtil localizer = WFResourceUtil.getResourceUtilArticle();// String bref = WFPage.CONTENT_BUNDLE + "."; WFContainer mainContainer = new WFContainer(); mainContainer.setId(ARTICLE_EDITOR_ID); WFErrorMessages em = new WFErrorMessages(); em.addErrorMessage(HEADLINE_ID); em.addErrorMessage(TEASER_ID);// em.addErrorMessage(PUBLISHED_FROM_DATE_ID);// em.addErrorMessage(PUBLISHED_TO_DATE_ID); em.addErrorMessage(SAVE_ID); mainContainer.add(em); //Saving the state of the articleItemBean specially because the scpoe //of this bean now is 'request' not 'session' UISaveState beanSaveState = new UISaveState(); ValueBinding binding = WFUtil.createValueBinding("#{"+ARTICLE_ITEM_BEAN_ID+"}"); beanSaveState.setId("articleItemBeanSaveState"); beanSaveState.setValueBinding("value",binding); mainContainer.add(beanSaveState); HtmlPanelGrid p = WFPanelUtil.getPlainFormPanel(2); //Language dropdown p.getChildren().add(WFUtil.group(localizer.getTextVB("language"), WFUtil.getText(":"))); UIComponent langDropdown = getLanguageDropdownMenu(); p.getChildren().add(langDropdown); p.getChildren().add(WFUtil.group(localizer.getTextVB("headline"), WFUtil.getText(":")));// p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "language"), WFUtil.getText(":"))); HtmlInputText headlineInput = WFUtil.getInputText(HEADLINE_ID, ref + "headline"); headlineInput.setSize(70); p.getChildren().add(headlineInput); //HtmlSelectOneMenu localeMenu = WFUtil.getSelectOneMenu(LOCALE_ID, ref + "allLocales", ref + "pendingLocaleId"); //localeMenu.setOnchange("document.forms[0].submit();"); //p.getChildren().add(localeMenu); p.getChildren().add(WFUtil.group(localizer.getTextVB("author"), WFUtil.getText(":"))); HtmlInputText authorInput = WFUtil.getInputText(AUTHOR_ID, ref + "author"); authorInput.setSize(70); User user = iwc.getCurrentUser(); if(user!=null){ String userName = user.getName(); getArticleItemBean().setAuthor(userName); } p.getChildren().add(authorInput); //Article body p.getChildren().add(WFUtil.group(localizer.getTextVB("body"), WFUtil.getText(":"))); HTMLArea bodyArea = WFUtil.getHtmlAreaTextArea(BODY_ID, ref + "body", "500px", "400px"); //HTMLArea bodyArea = WFUtil.getHtmlAreaTextArea(BODY_ID, ref + "body"); /*bodyArea.addPlugin(HTMLArea.PLUGIN_TABLE_OPERATIONS); bodyArea.addPlugin(HTMLArea.PLUGIN_DYNAMIC_CSS, "3"); bodyArea.addPlugin(HTMLArea.PLUGIN_CSS, "3"); bodyArea.addPlugin(HTMLArea.PLUGIN_CONTEXT_MENU); bodyArea.addPlugin(HTMLArea.PLUGIN_LIST_TYPE); bodyArea.addPlugin(HTMLArea.PLUGIN_CHARACTER_MAP); */ bodyArea.setAllowFontSelection(false); //bodyArea.addPlugin("TableOperations"); //bodyArea.addPlugin("Template"); //bodyArea.addPlugin("Forms"); //bodyArea.addPlugin("FormOperations"); //bodyArea.addPlugin("EditTag"); //bodyArea.addPlugin("Stylist"); //bodyArea.addPlugin("CSS"); //bodyArea.addPlugin("DynamicCSS"); //bodyArea.addPlugin("FullPage"); //bodyArea.addPlugin("NoteServer"); //bodyArea.addPlugin("QuickTag"); //bodyArea.addPlugin("InsertSmiley"); //bodyArea.addPlugin("InsertWords"); //bodyArea.addPlugin("ContextMenu"); //bodyArea.addPlugin("LangMarks"); //bodyArea.addPlugin("DoubleClick"); //bodyArea.addPlugin("ListType"); //bodyArea.addPlugin("ImageManager"); p.getChildren().add(WFUtil.group(bodyArea, WFUtil.getBreak())); p.getChildren().add(WFUtil.group(localizer.getTextVB("teaser"), WFUtil.getText(":"))); HtmlInputTextarea teaserArea = WFUtil.getTextArea(TEASER_ID, ref + "teaser", "500px", "60px"); p.getChildren().add(teaserArea); p.getChildren().add(WFUtil.group(localizer.getTextVB("source"), WFUtil.getText(":"))); HtmlInputText sourceArea = WFUtil.getInputText(SOURCE_ID, ref + "source"); sourceArea.setSize(70); p.getChildren().add(sourceArea); p.getChildren().add(WFUtil.getBreak()); p.getChildren().add(WFUtil.getBreak()); // p = WFPanelUtil.getPlainFormPanel(1);/* p.getChildren().add(WFUtil.group(WFUtil.getHeaderTextVB(bref + "created"), WFUtil.getTextVB(ref + "creationDate") ));*/// p.getChildren().add(WFUtil.getText(" "));// UIComponent t = WFUtil.group(localizer.getHeaderTextVB("status"), WFUtil.getText(": "));// t.getChildren().add(WFUtil.getTextVB(ref + "status"));// p.getChildren().add(t); p.getChildren().add(WFUtil.group(localizer.getTextVB("status"), WFUtil.getText(":"))); p.getChildren().add(WFUtil.getTextVB(ref + "status")); p.getChildren().add(WFUtil.group(localizer.getTextVB("current_version"), WFUtil.getText(":"))); p.getChildren().add(WFUtil.getTextVB(ref + "versionName")); p.getChildren().add(WFUtil.getBreak()); p.getChildren().add(WFUtil.getBreak()); // p = WFPanelUtil.getFormPanel(2); p.getChildren().add(WFUtil.group(localizer.getTextVB("comment"), WFUtil.getText(":")));// p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "attachments"), WFUtil.getText(":"))); HtmlInputTextarea commentArea = WFUtil.getTextArea(COMMENT_ID, ref + "comment", "500px", "60px"); p.getChildren().add(commentArea);// WFContainer attachmentContainer = new WFContainer();// attachmentContainer.add(WFUtil.getButtonVB(ADD_ATTACHMENT_ID, bref + "add_attachment", this));// attachmentContainer.add(WFUtil.getBreak());// attachmentContainer.add(getAttachmentList());// p.getChildren().add(attachmentContainer); // mainContainer.add(p); // p = WFPanelUtil.getFormPanel(1);// p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "related_content_items"), WFUtil.getText(":"))); // WFContainer contentItemContainer = new WFContainer(); // contentItemContainer.add(WFUtil.getButtonVB(ADD_RELATED_CONTENT_ITEM_ID, bref + "add_content_item", this));// contentItemContainer.add(WFUtil.getBreak());// contentItemContainer.add(getRelatedContentItemsList());// p.getChildren().add(contentItemContainer);// p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "publishing_date"), WFUtil.getText(":"))); // WFDateInput publishedFromInput = WFUtil.getDateInput(PUBLISHED_FROM_DATE_ID, ref + "case.publishedFromDate");// publishedFromInput.setShowTime(true);// p.getChildren().add(publishedFromInput);// p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "expiration_date"), WFUtil.getText(":"))); // WFDateInput publishedToInput = WFUtil.getDateInput(PUBLISHED_TO_DATE_ID, ref + "case.publishedToDate");// publishedToInput.setShowTime(true);// p.getChildren().add(publishedToInput); // mainContainer.add(p); p.getChildren().add(WFUtil.getBreak()); p.getChildren().add(WFUtil.getBreak());// mainContainer.add(WFUtil.getBreak());// p = WFPanelUtil.getPlainFormPanel(1);// HtmlCommandButton editCategoriesButton = WFUtil.getButtonVB(EDIT_CATEGORIES_ID, bref + "edit_categories", this);// p.getChildren().add(editCategoriesButton); //Temporary taking away folderr location/* p.getChildren().add(WFUtil.group(localizer.getTextVB("folder"), WFUtil.getText(":"))); HtmlInputText folderInput = WFUtil.getInputText(FOLDER_ID, ref + "folderLocation"); if(null==folderInput.getValue() || "".equals(folderInput.getValue())) { String FolderString = ArticleUtil.getArticleYearMonthPath();// System.out.println("Folder "+FolderString); folderInput.setValue(FolderString); } else { File file = new File(folderInput.getValue().toString()); folderInput.setValue(file.getParentFile().getParent()); } folderInput.setSize(70); p.getChildren().add(folderInput); */ p.getChildren().add(WFUtil.getBreak()); //Categories// WebDAVCategories categoriesUI = new WebDAVCategories(); //ArticleItemBean articleItemBean = (ArticleItemBean) getArticleItemBean(); //String resourcePath = articleItemBean.getArticleResourcePath(); addCategoryEditor(p); p.getChildren().add(WFUtil.getBreak()); p.getChildren().add(WFUtil.getBreak()); p.getChildren().add(WFUtil.getBreak());// WFComponentSelector cs = new WFComponentSelector();// cs.setId(BUTTON_SELECTOR_ID);// cs.setDividerText(" "); HtmlCommandButton saveButton = localizer.getButtonVB(SAVE_ID, "save", this);// HtmlCommandButton saveButton = WFUtil.getButtonVB(SAVE_ID, WFPage.CONTENT_BUNDLE + "save", this);// cs.add(saveButton);// cs.add(WFUtil.getButtonVB(FOR_REVIEW_ID, bref + "for_review", this));// cs.add(WFUtil.getButtonVB(PUBLISH_ID, bref + "publish", this));// cs.add(WFUtil.getButtonVB(REWRITE_ID, bref + "rewrite", this));// cs.add(WFUtil.getButtonVB(REJECT_ID, bref + "reject", this));// cs.add(WFUtil.getButtonVB(DELETE_ID, bref + "delete", this));// cs.add(WFUtil.getButtonVB(CANCEL_ID, bref + "cancel", this));// cs.setSelectedId(CANCEL_ID, true);// p.getChildren().add(cs); p.getChildren().add(saveButton); mainContainer.add(p); //WFComponentSelector editorSelector = new WFComponentSelector(); //editorSelector.setId(EDITOR_SELECTOR_ID); //editorSelector.add(mainContainer); //editorSelector.add(getCategoryEditContainer());// FileUploadForm f = new FileUploadForm(this, FILE_UPLOAD_ID, FILE_UPLOAD_CANCEL_ID); //editorSelector.add(getRelatedContentItemsContainer()); //editorSelector.setSelectedId(ARTICLE_EDITOR_ID, true); //return editorSelector; return mainContainer; } | 57000 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57000/5db26355cf68616cbd8859fa37cd6aa73d783808/EditArticleView.java/buggy/src/java/com/idega/block/article/component/EditArticleView.java |
p.getChildren().add(headlineInput); | UIComponent headlineText = WFUtil.group(localizer.getTextVB("headline"), WFUtil.getText(":")); HtmlOutputLabel headlineLabel = new HtmlOutputLabel(); headlineLabel.getChildren().add(headlineText); headlineLabel.setFor(headlineInput.getClientId(context)); WFFormItem headlineItem = new WFFormItem(); headlineItem.add(headlineLabel); headlineItem.add(headlineInput); mainContainer.add(headlineItem); | public UIComponent getEditContainer() { IWContext iwc = IWContext.getInstance(); WFResourceUtil localizer = WFResourceUtil.getResourceUtilArticle();// String bref = WFPage.CONTENT_BUNDLE + "."; WFContainer mainContainer = new WFContainer(); mainContainer.setId(ARTICLE_EDITOR_ID); WFErrorMessages em = new WFErrorMessages(); em.addErrorMessage(HEADLINE_ID); em.addErrorMessage(TEASER_ID);// em.addErrorMessage(PUBLISHED_FROM_DATE_ID);// em.addErrorMessage(PUBLISHED_TO_DATE_ID); em.addErrorMessage(SAVE_ID); mainContainer.add(em); //Saving the state of the articleItemBean specially because the scpoe //of this bean now is 'request' not 'session' UISaveState beanSaveState = new UISaveState(); ValueBinding binding = WFUtil.createValueBinding("#{"+ARTICLE_ITEM_BEAN_ID+"}"); beanSaveState.setId("articleItemBeanSaveState"); beanSaveState.setValueBinding("value",binding); mainContainer.add(beanSaveState); HtmlPanelGrid p = WFPanelUtil.getPlainFormPanel(2); //Language dropdown p.getChildren().add(WFUtil.group(localizer.getTextVB("language"), WFUtil.getText(":"))); UIComponent langDropdown = getLanguageDropdownMenu(); p.getChildren().add(langDropdown); p.getChildren().add(WFUtil.group(localizer.getTextVB("headline"), WFUtil.getText(":")));// p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "language"), WFUtil.getText(":"))); HtmlInputText headlineInput = WFUtil.getInputText(HEADLINE_ID, ref + "headline"); headlineInput.setSize(70); p.getChildren().add(headlineInput); //HtmlSelectOneMenu localeMenu = WFUtil.getSelectOneMenu(LOCALE_ID, ref + "allLocales", ref + "pendingLocaleId"); //localeMenu.setOnchange("document.forms[0].submit();"); //p.getChildren().add(localeMenu); p.getChildren().add(WFUtil.group(localizer.getTextVB("author"), WFUtil.getText(":"))); HtmlInputText authorInput = WFUtil.getInputText(AUTHOR_ID, ref + "author"); authorInput.setSize(70); User user = iwc.getCurrentUser(); if(user!=null){ String userName = user.getName(); getArticleItemBean().setAuthor(userName); } p.getChildren().add(authorInput); //Article body p.getChildren().add(WFUtil.group(localizer.getTextVB("body"), WFUtil.getText(":"))); HTMLArea bodyArea = WFUtil.getHtmlAreaTextArea(BODY_ID, ref + "body", "500px", "400px"); //HTMLArea bodyArea = WFUtil.getHtmlAreaTextArea(BODY_ID, ref + "body"); /*bodyArea.addPlugin(HTMLArea.PLUGIN_TABLE_OPERATIONS); bodyArea.addPlugin(HTMLArea.PLUGIN_DYNAMIC_CSS, "3"); bodyArea.addPlugin(HTMLArea.PLUGIN_CSS, "3"); bodyArea.addPlugin(HTMLArea.PLUGIN_CONTEXT_MENU); bodyArea.addPlugin(HTMLArea.PLUGIN_LIST_TYPE); bodyArea.addPlugin(HTMLArea.PLUGIN_CHARACTER_MAP); */ bodyArea.setAllowFontSelection(false); //bodyArea.addPlugin("TableOperations"); //bodyArea.addPlugin("Template"); //bodyArea.addPlugin("Forms"); //bodyArea.addPlugin("FormOperations"); //bodyArea.addPlugin("EditTag"); //bodyArea.addPlugin("Stylist"); //bodyArea.addPlugin("CSS"); //bodyArea.addPlugin("DynamicCSS"); //bodyArea.addPlugin("FullPage"); //bodyArea.addPlugin("NoteServer"); //bodyArea.addPlugin("QuickTag"); //bodyArea.addPlugin("InsertSmiley"); //bodyArea.addPlugin("InsertWords"); //bodyArea.addPlugin("ContextMenu"); //bodyArea.addPlugin("LangMarks"); //bodyArea.addPlugin("DoubleClick"); //bodyArea.addPlugin("ListType"); //bodyArea.addPlugin("ImageManager"); p.getChildren().add(WFUtil.group(bodyArea, WFUtil.getBreak())); p.getChildren().add(WFUtil.group(localizer.getTextVB("teaser"), WFUtil.getText(":"))); HtmlInputTextarea teaserArea = WFUtil.getTextArea(TEASER_ID, ref + "teaser", "500px", "60px"); p.getChildren().add(teaserArea); p.getChildren().add(WFUtil.group(localizer.getTextVB("source"), WFUtil.getText(":"))); HtmlInputText sourceArea = WFUtil.getInputText(SOURCE_ID, ref + "source"); sourceArea.setSize(70); p.getChildren().add(sourceArea); p.getChildren().add(WFUtil.getBreak()); p.getChildren().add(WFUtil.getBreak()); // p = WFPanelUtil.getPlainFormPanel(1);/* p.getChildren().add(WFUtil.group(WFUtil.getHeaderTextVB(bref + "created"), WFUtil.getTextVB(ref + "creationDate") ));*/// p.getChildren().add(WFUtil.getText(" "));// UIComponent t = WFUtil.group(localizer.getHeaderTextVB("status"), WFUtil.getText(": "));// t.getChildren().add(WFUtil.getTextVB(ref + "status"));// p.getChildren().add(t); p.getChildren().add(WFUtil.group(localizer.getTextVB("status"), WFUtil.getText(":"))); p.getChildren().add(WFUtil.getTextVB(ref + "status")); p.getChildren().add(WFUtil.group(localizer.getTextVB("current_version"), WFUtil.getText(":"))); p.getChildren().add(WFUtil.getTextVB(ref + "versionName")); p.getChildren().add(WFUtil.getBreak()); p.getChildren().add(WFUtil.getBreak()); // p = WFPanelUtil.getFormPanel(2); p.getChildren().add(WFUtil.group(localizer.getTextVB("comment"), WFUtil.getText(":")));// p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "attachments"), WFUtil.getText(":"))); HtmlInputTextarea commentArea = WFUtil.getTextArea(COMMENT_ID, ref + "comment", "500px", "60px"); p.getChildren().add(commentArea);// WFContainer attachmentContainer = new WFContainer();// attachmentContainer.add(WFUtil.getButtonVB(ADD_ATTACHMENT_ID, bref + "add_attachment", this));// attachmentContainer.add(WFUtil.getBreak());// attachmentContainer.add(getAttachmentList());// p.getChildren().add(attachmentContainer); // mainContainer.add(p); // p = WFPanelUtil.getFormPanel(1);// p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "related_content_items"), WFUtil.getText(":"))); // WFContainer contentItemContainer = new WFContainer(); // contentItemContainer.add(WFUtil.getButtonVB(ADD_RELATED_CONTENT_ITEM_ID, bref + "add_content_item", this));// contentItemContainer.add(WFUtil.getBreak());// contentItemContainer.add(getRelatedContentItemsList());// p.getChildren().add(contentItemContainer);// p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "publishing_date"), WFUtil.getText(":"))); // WFDateInput publishedFromInput = WFUtil.getDateInput(PUBLISHED_FROM_DATE_ID, ref + "case.publishedFromDate");// publishedFromInput.setShowTime(true);// p.getChildren().add(publishedFromInput);// p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "expiration_date"), WFUtil.getText(":"))); // WFDateInput publishedToInput = WFUtil.getDateInput(PUBLISHED_TO_DATE_ID, ref + "case.publishedToDate");// publishedToInput.setShowTime(true);// p.getChildren().add(publishedToInput); // mainContainer.add(p); p.getChildren().add(WFUtil.getBreak()); p.getChildren().add(WFUtil.getBreak());// mainContainer.add(WFUtil.getBreak());// p = WFPanelUtil.getPlainFormPanel(1);// HtmlCommandButton editCategoriesButton = WFUtil.getButtonVB(EDIT_CATEGORIES_ID, bref + "edit_categories", this);// p.getChildren().add(editCategoriesButton); //Temporary taking away folderr location/* p.getChildren().add(WFUtil.group(localizer.getTextVB("folder"), WFUtil.getText(":"))); HtmlInputText folderInput = WFUtil.getInputText(FOLDER_ID, ref + "folderLocation"); if(null==folderInput.getValue() || "".equals(folderInput.getValue())) { String FolderString = ArticleUtil.getArticleYearMonthPath();// System.out.println("Folder "+FolderString); folderInput.setValue(FolderString); } else { File file = new File(folderInput.getValue().toString()); folderInput.setValue(file.getParentFile().getParent()); } folderInput.setSize(70); p.getChildren().add(folderInput); */ p.getChildren().add(WFUtil.getBreak()); //Categories// WebDAVCategories categoriesUI = new WebDAVCategories(); //ArticleItemBean articleItemBean = (ArticleItemBean) getArticleItemBean(); //String resourcePath = articleItemBean.getArticleResourcePath(); addCategoryEditor(p); p.getChildren().add(WFUtil.getBreak()); p.getChildren().add(WFUtil.getBreak()); p.getChildren().add(WFUtil.getBreak());// WFComponentSelector cs = new WFComponentSelector();// cs.setId(BUTTON_SELECTOR_ID);// cs.setDividerText(" "); HtmlCommandButton saveButton = localizer.getButtonVB(SAVE_ID, "save", this);// HtmlCommandButton saveButton = WFUtil.getButtonVB(SAVE_ID, WFPage.CONTENT_BUNDLE + "save", this);// cs.add(saveButton);// cs.add(WFUtil.getButtonVB(FOR_REVIEW_ID, bref + "for_review", this));// cs.add(WFUtil.getButtonVB(PUBLISH_ID, bref + "publish", this));// cs.add(WFUtil.getButtonVB(REWRITE_ID, bref + "rewrite", this));// cs.add(WFUtil.getButtonVB(REJECT_ID, bref + "reject", this));// cs.add(WFUtil.getButtonVB(DELETE_ID, bref + "delete", this));// cs.add(WFUtil.getButtonVB(CANCEL_ID, bref + "cancel", this));// cs.setSelectedId(CANCEL_ID, true);// p.getChildren().add(cs); p.getChildren().add(saveButton); mainContainer.add(p); //WFComponentSelector editorSelector = new WFComponentSelector(); //editorSelector.setId(EDITOR_SELECTOR_ID); //editorSelector.add(mainContainer); //editorSelector.add(getCategoryEditContainer());// FileUploadForm f = new FileUploadForm(this, FILE_UPLOAD_ID, FILE_UPLOAD_CANCEL_ID); //editorSelector.add(getRelatedContentItemsContainer()); //editorSelector.setSelectedId(ARTICLE_EDITOR_ID, true); //return editorSelector; return mainContainer; } | 57000 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57000/5db26355cf68616cbd8859fa37cd6aa73d783808/EditArticleView.java/buggy/src/java/com/idega/block/article/component/EditArticleView.java |
p.getChildren().add(WFUtil.group(localizer.getTextVB("author"), WFUtil.getText(":"))); | public UIComponent getEditContainer() { IWContext iwc = IWContext.getInstance(); WFResourceUtil localizer = WFResourceUtil.getResourceUtilArticle();// String bref = WFPage.CONTENT_BUNDLE + "."; WFContainer mainContainer = new WFContainer(); mainContainer.setId(ARTICLE_EDITOR_ID); WFErrorMessages em = new WFErrorMessages(); em.addErrorMessage(HEADLINE_ID); em.addErrorMessage(TEASER_ID);// em.addErrorMessage(PUBLISHED_FROM_DATE_ID);// em.addErrorMessage(PUBLISHED_TO_DATE_ID); em.addErrorMessage(SAVE_ID); mainContainer.add(em); //Saving the state of the articleItemBean specially because the scpoe //of this bean now is 'request' not 'session' UISaveState beanSaveState = new UISaveState(); ValueBinding binding = WFUtil.createValueBinding("#{"+ARTICLE_ITEM_BEAN_ID+"}"); beanSaveState.setId("articleItemBeanSaveState"); beanSaveState.setValueBinding("value",binding); mainContainer.add(beanSaveState); HtmlPanelGrid p = WFPanelUtil.getPlainFormPanel(2); //Language dropdown p.getChildren().add(WFUtil.group(localizer.getTextVB("language"), WFUtil.getText(":"))); UIComponent langDropdown = getLanguageDropdownMenu(); p.getChildren().add(langDropdown); p.getChildren().add(WFUtil.group(localizer.getTextVB("headline"), WFUtil.getText(":")));// p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "language"), WFUtil.getText(":"))); HtmlInputText headlineInput = WFUtil.getInputText(HEADLINE_ID, ref + "headline"); headlineInput.setSize(70); p.getChildren().add(headlineInput); //HtmlSelectOneMenu localeMenu = WFUtil.getSelectOneMenu(LOCALE_ID, ref + "allLocales", ref + "pendingLocaleId"); //localeMenu.setOnchange("document.forms[0].submit();"); //p.getChildren().add(localeMenu); p.getChildren().add(WFUtil.group(localizer.getTextVB("author"), WFUtil.getText(":"))); HtmlInputText authorInput = WFUtil.getInputText(AUTHOR_ID, ref + "author"); authorInput.setSize(70); User user = iwc.getCurrentUser(); if(user!=null){ String userName = user.getName(); getArticleItemBean().setAuthor(userName); } p.getChildren().add(authorInput); //Article body p.getChildren().add(WFUtil.group(localizer.getTextVB("body"), WFUtil.getText(":"))); HTMLArea bodyArea = WFUtil.getHtmlAreaTextArea(BODY_ID, ref + "body", "500px", "400px"); //HTMLArea bodyArea = WFUtil.getHtmlAreaTextArea(BODY_ID, ref + "body"); /*bodyArea.addPlugin(HTMLArea.PLUGIN_TABLE_OPERATIONS); bodyArea.addPlugin(HTMLArea.PLUGIN_DYNAMIC_CSS, "3"); bodyArea.addPlugin(HTMLArea.PLUGIN_CSS, "3"); bodyArea.addPlugin(HTMLArea.PLUGIN_CONTEXT_MENU); bodyArea.addPlugin(HTMLArea.PLUGIN_LIST_TYPE); bodyArea.addPlugin(HTMLArea.PLUGIN_CHARACTER_MAP); */ bodyArea.setAllowFontSelection(false); //bodyArea.addPlugin("TableOperations"); //bodyArea.addPlugin("Template"); //bodyArea.addPlugin("Forms"); //bodyArea.addPlugin("FormOperations"); //bodyArea.addPlugin("EditTag"); //bodyArea.addPlugin("Stylist"); //bodyArea.addPlugin("CSS"); //bodyArea.addPlugin("DynamicCSS"); //bodyArea.addPlugin("FullPage"); //bodyArea.addPlugin("NoteServer"); //bodyArea.addPlugin("QuickTag"); //bodyArea.addPlugin("InsertSmiley"); //bodyArea.addPlugin("InsertWords"); //bodyArea.addPlugin("ContextMenu"); //bodyArea.addPlugin("LangMarks"); //bodyArea.addPlugin("DoubleClick"); //bodyArea.addPlugin("ListType"); //bodyArea.addPlugin("ImageManager"); p.getChildren().add(WFUtil.group(bodyArea, WFUtil.getBreak())); p.getChildren().add(WFUtil.group(localizer.getTextVB("teaser"), WFUtil.getText(":"))); HtmlInputTextarea teaserArea = WFUtil.getTextArea(TEASER_ID, ref + "teaser", "500px", "60px"); p.getChildren().add(teaserArea); p.getChildren().add(WFUtil.group(localizer.getTextVB("source"), WFUtil.getText(":"))); HtmlInputText sourceArea = WFUtil.getInputText(SOURCE_ID, ref + "source"); sourceArea.setSize(70); p.getChildren().add(sourceArea); p.getChildren().add(WFUtil.getBreak()); p.getChildren().add(WFUtil.getBreak()); // p = WFPanelUtil.getPlainFormPanel(1);/* p.getChildren().add(WFUtil.group(WFUtil.getHeaderTextVB(bref + "created"), WFUtil.getTextVB(ref + "creationDate") ));*/// p.getChildren().add(WFUtil.getText(" "));// UIComponent t = WFUtil.group(localizer.getHeaderTextVB("status"), WFUtil.getText(": "));// t.getChildren().add(WFUtil.getTextVB(ref + "status"));// p.getChildren().add(t); p.getChildren().add(WFUtil.group(localizer.getTextVB("status"), WFUtil.getText(":"))); p.getChildren().add(WFUtil.getTextVB(ref + "status")); p.getChildren().add(WFUtil.group(localizer.getTextVB("current_version"), WFUtil.getText(":"))); p.getChildren().add(WFUtil.getTextVB(ref + "versionName")); p.getChildren().add(WFUtil.getBreak()); p.getChildren().add(WFUtil.getBreak()); // p = WFPanelUtil.getFormPanel(2); p.getChildren().add(WFUtil.group(localizer.getTextVB("comment"), WFUtil.getText(":")));// p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "attachments"), WFUtil.getText(":"))); HtmlInputTextarea commentArea = WFUtil.getTextArea(COMMENT_ID, ref + "comment", "500px", "60px"); p.getChildren().add(commentArea);// WFContainer attachmentContainer = new WFContainer();// attachmentContainer.add(WFUtil.getButtonVB(ADD_ATTACHMENT_ID, bref + "add_attachment", this));// attachmentContainer.add(WFUtil.getBreak());// attachmentContainer.add(getAttachmentList());// p.getChildren().add(attachmentContainer); // mainContainer.add(p); // p = WFPanelUtil.getFormPanel(1);// p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "related_content_items"), WFUtil.getText(":"))); // WFContainer contentItemContainer = new WFContainer(); // contentItemContainer.add(WFUtil.getButtonVB(ADD_RELATED_CONTENT_ITEM_ID, bref + "add_content_item", this));// contentItemContainer.add(WFUtil.getBreak());// contentItemContainer.add(getRelatedContentItemsList());// p.getChildren().add(contentItemContainer);// p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "publishing_date"), WFUtil.getText(":"))); // WFDateInput publishedFromInput = WFUtil.getDateInput(PUBLISHED_FROM_DATE_ID, ref + "case.publishedFromDate");// publishedFromInput.setShowTime(true);// p.getChildren().add(publishedFromInput);// p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "expiration_date"), WFUtil.getText(":"))); // WFDateInput publishedToInput = WFUtil.getDateInput(PUBLISHED_TO_DATE_ID, ref + "case.publishedToDate");// publishedToInput.setShowTime(true);// p.getChildren().add(publishedToInput); // mainContainer.add(p); p.getChildren().add(WFUtil.getBreak()); p.getChildren().add(WFUtil.getBreak());// mainContainer.add(WFUtil.getBreak());// p = WFPanelUtil.getPlainFormPanel(1);// HtmlCommandButton editCategoriesButton = WFUtil.getButtonVB(EDIT_CATEGORIES_ID, bref + "edit_categories", this);// p.getChildren().add(editCategoriesButton); //Temporary taking away folderr location/* p.getChildren().add(WFUtil.group(localizer.getTextVB("folder"), WFUtil.getText(":"))); HtmlInputText folderInput = WFUtil.getInputText(FOLDER_ID, ref + "folderLocation"); if(null==folderInput.getValue() || "".equals(folderInput.getValue())) { String FolderString = ArticleUtil.getArticleYearMonthPath();// System.out.println("Folder "+FolderString); folderInput.setValue(FolderString); } else { File file = new File(folderInput.getValue().toString()); folderInput.setValue(file.getParentFile().getParent()); } folderInput.setSize(70); p.getChildren().add(folderInput); */ p.getChildren().add(WFUtil.getBreak()); //Categories// WebDAVCategories categoriesUI = new WebDAVCategories(); //ArticleItemBean articleItemBean = (ArticleItemBean) getArticleItemBean(); //String resourcePath = articleItemBean.getArticleResourcePath(); addCategoryEditor(p); p.getChildren().add(WFUtil.getBreak()); p.getChildren().add(WFUtil.getBreak()); p.getChildren().add(WFUtil.getBreak());// WFComponentSelector cs = new WFComponentSelector();// cs.setId(BUTTON_SELECTOR_ID);// cs.setDividerText(" "); HtmlCommandButton saveButton = localizer.getButtonVB(SAVE_ID, "save", this);// HtmlCommandButton saveButton = WFUtil.getButtonVB(SAVE_ID, WFPage.CONTENT_BUNDLE + "save", this);// cs.add(saveButton);// cs.add(WFUtil.getButtonVB(FOR_REVIEW_ID, bref + "for_review", this));// cs.add(WFUtil.getButtonVB(PUBLISH_ID, bref + "publish", this));// cs.add(WFUtil.getButtonVB(REWRITE_ID, bref + "rewrite", this));// cs.add(WFUtil.getButtonVB(REJECT_ID, bref + "reject", this));// cs.add(WFUtil.getButtonVB(DELETE_ID, bref + "delete", this));// cs.add(WFUtil.getButtonVB(CANCEL_ID, bref + "cancel", this));// cs.setSelectedId(CANCEL_ID, true);// p.getChildren().add(cs); p.getChildren().add(saveButton); mainContainer.add(p); //WFComponentSelector editorSelector = new WFComponentSelector(); //editorSelector.setId(EDITOR_SELECTOR_ID); //editorSelector.add(mainContainer); //editorSelector.add(getCategoryEditContainer());// FileUploadForm f = new FileUploadForm(this, FILE_UPLOAD_ID, FILE_UPLOAD_CANCEL_ID); //editorSelector.add(getRelatedContentItemsContainer()); //editorSelector.setSelectedId(ARTICLE_EDITOR_ID, true); //return editorSelector; return mainContainer; } | 57000 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57000/5db26355cf68616cbd8859fa37cd6aa73d783808/EditArticleView.java/buggy/src/java/com/idega/block/article/component/EditArticleView.java |
|
authorInput.setSize(70); | public UIComponent getEditContainer() { IWContext iwc = IWContext.getInstance(); WFResourceUtil localizer = WFResourceUtil.getResourceUtilArticle();// String bref = WFPage.CONTENT_BUNDLE + "."; WFContainer mainContainer = new WFContainer(); mainContainer.setId(ARTICLE_EDITOR_ID); WFErrorMessages em = new WFErrorMessages(); em.addErrorMessage(HEADLINE_ID); em.addErrorMessage(TEASER_ID);// em.addErrorMessage(PUBLISHED_FROM_DATE_ID);// em.addErrorMessage(PUBLISHED_TO_DATE_ID); em.addErrorMessage(SAVE_ID); mainContainer.add(em); //Saving the state of the articleItemBean specially because the scpoe //of this bean now is 'request' not 'session' UISaveState beanSaveState = new UISaveState(); ValueBinding binding = WFUtil.createValueBinding("#{"+ARTICLE_ITEM_BEAN_ID+"}"); beanSaveState.setId("articleItemBeanSaveState"); beanSaveState.setValueBinding("value",binding); mainContainer.add(beanSaveState); HtmlPanelGrid p = WFPanelUtil.getPlainFormPanel(2); //Language dropdown p.getChildren().add(WFUtil.group(localizer.getTextVB("language"), WFUtil.getText(":"))); UIComponent langDropdown = getLanguageDropdownMenu(); p.getChildren().add(langDropdown); p.getChildren().add(WFUtil.group(localizer.getTextVB("headline"), WFUtil.getText(":")));// p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "language"), WFUtil.getText(":"))); HtmlInputText headlineInput = WFUtil.getInputText(HEADLINE_ID, ref + "headline"); headlineInput.setSize(70); p.getChildren().add(headlineInput); //HtmlSelectOneMenu localeMenu = WFUtil.getSelectOneMenu(LOCALE_ID, ref + "allLocales", ref + "pendingLocaleId"); //localeMenu.setOnchange("document.forms[0].submit();"); //p.getChildren().add(localeMenu); p.getChildren().add(WFUtil.group(localizer.getTextVB("author"), WFUtil.getText(":"))); HtmlInputText authorInput = WFUtil.getInputText(AUTHOR_ID, ref + "author"); authorInput.setSize(70); User user = iwc.getCurrentUser(); if(user!=null){ String userName = user.getName(); getArticleItemBean().setAuthor(userName); } p.getChildren().add(authorInput); //Article body p.getChildren().add(WFUtil.group(localizer.getTextVB("body"), WFUtil.getText(":"))); HTMLArea bodyArea = WFUtil.getHtmlAreaTextArea(BODY_ID, ref + "body", "500px", "400px"); //HTMLArea bodyArea = WFUtil.getHtmlAreaTextArea(BODY_ID, ref + "body"); /*bodyArea.addPlugin(HTMLArea.PLUGIN_TABLE_OPERATIONS); bodyArea.addPlugin(HTMLArea.PLUGIN_DYNAMIC_CSS, "3"); bodyArea.addPlugin(HTMLArea.PLUGIN_CSS, "3"); bodyArea.addPlugin(HTMLArea.PLUGIN_CONTEXT_MENU); bodyArea.addPlugin(HTMLArea.PLUGIN_LIST_TYPE); bodyArea.addPlugin(HTMLArea.PLUGIN_CHARACTER_MAP); */ bodyArea.setAllowFontSelection(false); //bodyArea.addPlugin("TableOperations"); //bodyArea.addPlugin("Template"); //bodyArea.addPlugin("Forms"); //bodyArea.addPlugin("FormOperations"); //bodyArea.addPlugin("EditTag"); //bodyArea.addPlugin("Stylist"); //bodyArea.addPlugin("CSS"); //bodyArea.addPlugin("DynamicCSS"); //bodyArea.addPlugin("FullPage"); //bodyArea.addPlugin("NoteServer"); //bodyArea.addPlugin("QuickTag"); //bodyArea.addPlugin("InsertSmiley"); //bodyArea.addPlugin("InsertWords"); //bodyArea.addPlugin("ContextMenu"); //bodyArea.addPlugin("LangMarks"); //bodyArea.addPlugin("DoubleClick"); //bodyArea.addPlugin("ListType"); //bodyArea.addPlugin("ImageManager"); p.getChildren().add(WFUtil.group(bodyArea, WFUtil.getBreak())); p.getChildren().add(WFUtil.group(localizer.getTextVB("teaser"), WFUtil.getText(":"))); HtmlInputTextarea teaserArea = WFUtil.getTextArea(TEASER_ID, ref + "teaser", "500px", "60px"); p.getChildren().add(teaserArea); p.getChildren().add(WFUtil.group(localizer.getTextVB("source"), WFUtil.getText(":"))); HtmlInputText sourceArea = WFUtil.getInputText(SOURCE_ID, ref + "source"); sourceArea.setSize(70); p.getChildren().add(sourceArea); p.getChildren().add(WFUtil.getBreak()); p.getChildren().add(WFUtil.getBreak()); // p = WFPanelUtil.getPlainFormPanel(1);/* p.getChildren().add(WFUtil.group(WFUtil.getHeaderTextVB(bref + "created"), WFUtil.getTextVB(ref + "creationDate") ));*/// p.getChildren().add(WFUtil.getText(" "));// UIComponent t = WFUtil.group(localizer.getHeaderTextVB("status"), WFUtil.getText(": "));// t.getChildren().add(WFUtil.getTextVB(ref + "status"));// p.getChildren().add(t); p.getChildren().add(WFUtil.group(localizer.getTextVB("status"), WFUtil.getText(":"))); p.getChildren().add(WFUtil.getTextVB(ref + "status")); p.getChildren().add(WFUtil.group(localizer.getTextVB("current_version"), WFUtil.getText(":"))); p.getChildren().add(WFUtil.getTextVB(ref + "versionName")); p.getChildren().add(WFUtil.getBreak()); p.getChildren().add(WFUtil.getBreak()); // p = WFPanelUtil.getFormPanel(2); p.getChildren().add(WFUtil.group(localizer.getTextVB("comment"), WFUtil.getText(":")));// p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "attachments"), WFUtil.getText(":"))); HtmlInputTextarea commentArea = WFUtil.getTextArea(COMMENT_ID, ref + "comment", "500px", "60px"); p.getChildren().add(commentArea);// WFContainer attachmentContainer = new WFContainer();// attachmentContainer.add(WFUtil.getButtonVB(ADD_ATTACHMENT_ID, bref + "add_attachment", this));// attachmentContainer.add(WFUtil.getBreak());// attachmentContainer.add(getAttachmentList());// p.getChildren().add(attachmentContainer); // mainContainer.add(p); // p = WFPanelUtil.getFormPanel(1);// p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "related_content_items"), WFUtil.getText(":"))); // WFContainer contentItemContainer = new WFContainer(); // contentItemContainer.add(WFUtil.getButtonVB(ADD_RELATED_CONTENT_ITEM_ID, bref + "add_content_item", this));// contentItemContainer.add(WFUtil.getBreak());// contentItemContainer.add(getRelatedContentItemsList());// p.getChildren().add(contentItemContainer);// p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "publishing_date"), WFUtil.getText(":"))); // WFDateInput publishedFromInput = WFUtil.getDateInput(PUBLISHED_FROM_DATE_ID, ref + "case.publishedFromDate");// publishedFromInput.setShowTime(true);// p.getChildren().add(publishedFromInput);// p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "expiration_date"), WFUtil.getText(":"))); // WFDateInput publishedToInput = WFUtil.getDateInput(PUBLISHED_TO_DATE_ID, ref + "case.publishedToDate");// publishedToInput.setShowTime(true);// p.getChildren().add(publishedToInput); // mainContainer.add(p); p.getChildren().add(WFUtil.getBreak()); p.getChildren().add(WFUtil.getBreak());// mainContainer.add(WFUtil.getBreak());// p = WFPanelUtil.getPlainFormPanel(1);// HtmlCommandButton editCategoriesButton = WFUtil.getButtonVB(EDIT_CATEGORIES_ID, bref + "edit_categories", this);// p.getChildren().add(editCategoriesButton); //Temporary taking away folderr location/* p.getChildren().add(WFUtil.group(localizer.getTextVB("folder"), WFUtil.getText(":"))); HtmlInputText folderInput = WFUtil.getInputText(FOLDER_ID, ref + "folderLocation"); if(null==folderInput.getValue() || "".equals(folderInput.getValue())) { String FolderString = ArticleUtil.getArticleYearMonthPath();// System.out.println("Folder "+FolderString); folderInput.setValue(FolderString); } else { File file = new File(folderInput.getValue().toString()); folderInput.setValue(file.getParentFile().getParent()); } folderInput.setSize(70); p.getChildren().add(folderInput); */ p.getChildren().add(WFUtil.getBreak()); //Categories// WebDAVCategories categoriesUI = new WebDAVCategories(); //ArticleItemBean articleItemBean = (ArticleItemBean) getArticleItemBean(); //String resourcePath = articleItemBean.getArticleResourcePath(); addCategoryEditor(p); p.getChildren().add(WFUtil.getBreak()); p.getChildren().add(WFUtil.getBreak()); p.getChildren().add(WFUtil.getBreak());// WFComponentSelector cs = new WFComponentSelector();// cs.setId(BUTTON_SELECTOR_ID);// cs.setDividerText(" "); HtmlCommandButton saveButton = localizer.getButtonVB(SAVE_ID, "save", this);// HtmlCommandButton saveButton = WFUtil.getButtonVB(SAVE_ID, WFPage.CONTENT_BUNDLE + "save", this);// cs.add(saveButton);// cs.add(WFUtil.getButtonVB(FOR_REVIEW_ID, bref + "for_review", this));// cs.add(WFUtil.getButtonVB(PUBLISH_ID, bref + "publish", this));// cs.add(WFUtil.getButtonVB(REWRITE_ID, bref + "rewrite", this));// cs.add(WFUtil.getButtonVB(REJECT_ID, bref + "reject", this));// cs.add(WFUtil.getButtonVB(DELETE_ID, bref + "delete", this));// cs.add(WFUtil.getButtonVB(CANCEL_ID, bref + "cancel", this));// cs.setSelectedId(CANCEL_ID, true);// p.getChildren().add(cs); p.getChildren().add(saveButton); mainContainer.add(p); //WFComponentSelector editorSelector = new WFComponentSelector(); //editorSelector.setId(EDITOR_SELECTOR_ID); //editorSelector.add(mainContainer); //editorSelector.add(getCategoryEditContainer());// FileUploadForm f = new FileUploadForm(this, FILE_UPLOAD_ID, FILE_UPLOAD_CANCEL_ID); //editorSelector.add(getRelatedContentItemsContainer()); //editorSelector.setSelectedId(ARTICLE_EDITOR_ID, true); //return editorSelector; return mainContainer; } | 57000 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57000/5db26355cf68616cbd8859fa37cd6aa73d783808/EditArticleView.java/buggy/src/java/com/idega/block/article/component/EditArticleView.java |
|
p.getChildren().add(authorInput); | UIComponent authorText = WFUtil.group(localizer.getTextVB("author"), WFUtil.getText(":")); HtmlOutputLabel authorLabel = new HtmlOutputLabel(); authorLabel.getChildren().add(authorText); authorLabel.setFor(authorInput.getClientId(context)); WFFormItem authorItem = new WFFormItem(); authorItem.add(authorLabel); authorItem.add(authorInput); mainContainer.add(authorItem); | public UIComponent getEditContainer() { IWContext iwc = IWContext.getInstance(); WFResourceUtil localizer = WFResourceUtil.getResourceUtilArticle();// String bref = WFPage.CONTENT_BUNDLE + "."; WFContainer mainContainer = new WFContainer(); mainContainer.setId(ARTICLE_EDITOR_ID); WFErrorMessages em = new WFErrorMessages(); em.addErrorMessage(HEADLINE_ID); em.addErrorMessage(TEASER_ID);// em.addErrorMessage(PUBLISHED_FROM_DATE_ID);// em.addErrorMessage(PUBLISHED_TO_DATE_ID); em.addErrorMessage(SAVE_ID); mainContainer.add(em); //Saving the state of the articleItemBean specially because the scpoe //of this bean now is 'request' not 'session' UISaveState beanSaveState = new UISaveState(); ValueBinding binding = WFUtil.createValueBinding("#{"+ARTICLE_ITEM_BEAN_ID+"}"); beanSaveState.setId("articleItemBeanSaveState"); beanSaveState.setValueBinding("value",binding); mainContainer.add(beanSaveState); HtmlPanelGrid p = WFPanelUtil.getPlainFormPanel(2); //Language dropdown p.getChildren().add(WFUtil.group(localizer.getTextVB("language"), WFUtil.getText(":"))); UIComponent langDropdown = getLanguageDropdownMenu(); p.getChildren().add(langDropdown); p.getChildren().add(WFUtil.group(localizer.getTextVB("headline"), WFUtil.getText(":")));// p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "language"), WFUtil.getText(":"))); HtmlInputText headlineInput = WFUtil.getInputText(HEADLINE_ID, ref + "headline"); headlineInput.setSize(70); p.getChildren().add(headlineInput); //HtmlSelectOneMenu localeMenu = WFUtil.getSelectOneMenu(LOCALE_ID, ref + "allLocales", ref + "pendingLocaleId"); //localeMenu.setOnchange("document.forms[0].submit();"); //p.getChildren().add(localeMenu); p.getChildren().add(WFUtil.group(localizer.getTextVB("author"), WFUtil.getText(":"))); HtmlInputText authorInput = WFUtil.getInputText(AUTHOR_ID, ref + "author"); authorInput.setSize(70); User user = iwc.getCurrentUser(); if(user!=null){ String userName = user.getName(); getArticleItemBean().setAuthor(userName); } p.getChildren().add(authorInput); //Article body p.getChildren().add(WFUtil.group(localizer.getTextVB("body"), WFUtil.getText(":"))); HTMLArea bodyArea = WFUtil.getHtmlAreaTextArea(BODY_ID, ref + "body", "500px", "400px"); //HTMLArea bodyArea = WFUtil.getHtmlAreaTextArea(BODY_ID, ref + "body"); /*bodyArea.addPlugin(HTMLArea.PLUGIN_TABLE_OPERATIONS); bodyArea.addPlugin(HTMLArea.PLUGIN_DYNAMIC_CSS, "3"); bodyArea.addPlugin(HTMLArea.PLUGIN_CSS, "3"); bodyArea.addPlugin(HTMLArea.PLUGIN_CONTEXT_MENU); bodyArea.addPlugin(HTMLArea.PLUGIN_LIST_TYPE); bodyArea.addPlugin(HTMLArea.PLUGIN_CHARACTER_MAP); */ bodyArea.setAllowFontSelection(false); //bodyArea.addPlugin("TableOperations"); //bodyArea.addPlugin("Template"); //bodyArea.addPlugin("Forms"); //bodyArea.addPlugin("FormOperations"); //bodyArea.addPlugin("EditTag"); //bodyArea.addPlugin("Stylist"); //bodyArea.addPlugin("CSS"); //bodyArea.addPlugin("DynamicCSS"); //bodyArea.addPlugin("FullPage"); //bodyArea.addPlugin("NoteServer"); //bodyArea.addPlugin("QuickTag"); //bodyArea.addPlugin("InsertSmiley"); //bodyArea.addPlugin("InsertWords"); //bodyArea.addPlugin("ContextMenu"); //bodyArea.addPlugin("LangMarks"); //bodyArea.addPlugin("DoubleClick"); //bodyArea.addPlugin("ListType"); //bodyArea.addPlugin("ImageManager"); p.getChildren().add(WFUtil.group(bodyArea, WFUtil.getBreak())); p.getChildren().add(WFUtil.group(localizer.getTextVB("teaser"), WFUtil.getText(":"))); HtmlInputTextarea teaserArea = WFUtil.getTextArea(TEASER_ID, ref + "teaser", "500px", "60px"); p.getChildren().add(teaserArea); p.getChildren().add(WFUtil.group(localizer.getTextVB("source"), WFUtil.getText(":"))); HtmlInputText sourceArea = WFUtil.getInputText(SOURCE_ID, ref + "source"); sourceArea.setSize(70); p.getChildren().add(sourceArea); p.getChildren().add(WFUtil.getBreak()); p.getChildren().add(WFUtil.getBreak()); // p = WFPanelUtil.getPlainFormPanel(1);/* p.getChildren().add(WFUtil.group(WFUtil.getHeaderTextVB(bref + "created"), WFUtil.getTextVB(ref + "creationDate") ));*/// p.getChildren().add(WFUtil.getText(" "));// UIComponent t = WFUtil.group(localizer.getHeaderTextVB("status"), WFUtil.getText(": "));// t.getChildren().add(WFUtil.getTextVB(ref + "status"));// p.getChildren().add(t); p.getChildren().add(WFUtil.group(localizer.getTextVB("status"), WFUtil.getText(":"))); p.getChildren().add(WFUtil.getTextVB(ref + "status")); p.getChildren().add(WFUtil.group(localizer.getTextVB("current_version"), WFUtil.getText(":"))); p.getChildren().add(WFUtil.getTextVB(ref + "versionName")); p.getChildren().add(WFUtil.getBreak()); p.getChildren().add(WFUtil.getBreak()); // p = WFPanelUtil.getFormPanel(2); p.getChildren().add(WFUtil.group(localizer.getTextVB("comment"), WFUtil.getText(":")));// p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "attachments"), WFUtil.getText(":"))); HtmlInputTextarea commentArea = WFUtil.getTextArea(COMMENT_ID, ref + "comment", "500px", "60px"); p.getChildren().add(commentArea);// WFContainer attachmentContainer = new WFContainer();// attachmentContainer.add(WFUtil.getButtonVB(ADD_ATTACHMENT_ID, bref + "add_attachment", this));// attachmentContainer.add(WFUtil.getBreak());// attachmentContainer.add(getAttachmentList());// p.getChildren().add(attachmentContainer); // mainContainer.add(p); // p = WFPanelUtil.getFormPanel(1);// p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "related_content_items"), WFUtil.getText(":"))); // WFContainer contentItemContainer = new WFContainer(); // contentItemContainer.add(WFUtil.getButtonVB(ADD_RELATED_CONTENT_ITEM_ID, bref + "add_content_item", this));// contentItemContainer.add(WFUtil.getBreak());// contentItemContainer.add(getRelatedContentItemsList());// p.getChildren().add(contentItemContainer);// p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "publishing_date"), WFUtil.getText(":"))); // WFDateInput publishedFromInput = WFUtil.getDateInput(PUBLISHED_FROM_DATE_ID, ref + "case.publishedFromDate");// publishedFromInput.setShowTime(true);// p.getChildren().add(publishedFromInput);// p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "expiration_date"), WFUtil.getText(":"))); // WFDateInput publishedToInput = WFUtil.getDateInput(PUBLISHED_TO_DATE_ID, ref + "case.publishedToDate");// publishedToInput.setShowTime(true);// p.getChildren().add(publishedToInput); // mainContainer.add(p); p.getChildren().add(WFUtil.getBreak()); p.getChildren().add(WFUtil.getBreak());// mainContainer.add(WFUtil.getBreak());// p = WFPanelUtil.getPlainFormPanel(1);// HtmlCommandButton editCategoriesButton = WFUtil.getButtonVB(EDIT_CATEGORIES_ID, bref + "edit_categories", this);// p.getChildren().add(editCategoriesButton); //Temporary taking away folderr location/* p.getChildren().add(WFUtil.group(localizer.getTextVB("folder"), WFUtil.getText(":"))); HtmlInputText folderInput = WFUtil.getInputText(FOLDER_ID, ref + "folderLocation"); if(null==folderInput.getValue() || "".equals(folderInput.getValue())) { String FolderString = ArticleUtil.getArticleYearMonthPath();// System.out.println("Folder "+FolderString); folderInput.setValue(FolderString); } else { File file = new File(folderInput.getValue().toString()); folderInput.setValue(file.getParentFile().getParent()); } folderInput.setSize(70); p.getChildren().add(folderInput); */ p.getChildren().add(WFUtil.getBreak()); //Categories// WebDAVCategories categoriesUI = new WebDAVCategories(); //ArticleItemBean articleItemBean = (ArticleItemBean) getArticleItemBean(); //String resourcePath = articleItemBean.getArticleResourcePath(); addCategoryEditor(p); p.getChildren().add(WFUtil.getBreak()); p.getChildren().add(WFUtil.getBreak()); p.getChildren().add(WFUtil.getBreak());// WFComponentSelector cs = new WFComponentSelector();// cs.setId(BUTTON_SELECTOR_ID);// cs.setDividerText(" "); HtmlCommandButton saveButton = localizer.getButtonVB(SAVE_ID, "save", this);// HtmlCommandButton saveButton = WFUtil.getButtonVB(SAVE_ID, WFPage.CONTENT_BUNDLE + "save", this);// cs.add(saveButton);// cs.add(WFUtil.getButtonVB(FOR_REVIEW_ID, bref + "for_review", this));// cs.add(WFUtil.getButtonVB(PUBLISH_ID, bref + "publish", this));// cs.add(WFUtil.getButtonVB(REWRITE_ID, bref + "rewrite", this));// cs.add(WFUtil.getButtonVB(REJECT_ID, bref + "reject", this));// cs.add(WFUtil.getButtonVB(DELETE_ID, bref + "delete", this));// cs.add(WFUtil.getButtonVB(CANCEL_ID, bref + "cancel", this));// cs.setSelectedId(CANCEL_ID, true);// p.getChildren().add(cs); p.getChildren().add(saveButton); mainContainer.add(p); //WFComponentSelector editorSelector = new WFComponentSelector(); //editorSelector.setId(EDITOR_SELECTOR_ID); //editorSelector.add(mainContainer); //editorSelector.add(getCategoryEditContainer());// FileUploadForm f = new FileUploadForm(this, FILE_UPLOAD_ID, FILE_UPLOAD_CANCEL_ID); //editorSelector.add(getRelatedContentItemsContainer()); //editorSelector.setSelectedId(ARTICLE_EDITOR_ID, true); //return editorSelector; return mainContainer; } | 57000 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57000/5db26355cf68616cbd8859fa37cd6aa73d783808/EditArticleView.java/buggy/src/java/com/idega/block/article/component/EditArticleView.java |
p.getChildren().add(WFUtil.group(localizer.getTextVB("body"), WFUtil.getText(":"))); | public UIComponent getEditContainer() { IWContext iwc = IWContext.getInstance(); WFResourceUtil localizer = WFResourceUtil.getResourceUtilArticle();// String bref = WFPage.CONTENT_BUNDLE + "."; WFContainer mainContainer = new WFContainer(); mainContainer.setId(ARTICLE_EDITOR_ID); WFErrorMessages em = new WFErrorMessages(); em.addErrorMessage(HEADLINE_ID); em.addErrorMessage(TEASER_ID);// em.addErrorMessage(PUBLISHED_FROM_DATE_ID);// em.addErrorMessage(PUBLISHED_TO_DATE_ID); em.addErrorMessage(SAVE_ID); mainContainer.add(em); //Saving the state of the articleItemBean specially because the scpoe //of this bean now is 'request' not 'session' UISaveState beanSaveState = new UISaveState(); ValueBinding binding = WFUtil.createValueBinding("#{"+ARTICLE_ITEM_BEAN_ID+"}"); beanSaveState.setId("articleItemBeanSaveState"); beanSaveState.setValueBinding("value",binding); mainContainer.add(beanSaveState); HtmlPanelGrid p = WFPanelUtil.getPlainFormPanel(2); //Language dropdown p.getChildren().add(WFUtil.group(localizer.getTextVB("language"), WFUtil.getText(":"))); UIComponent langDropdown = getLanguageDropdownMenu(); p.getChildren().add(langDropdown); p.getChildren().add(WFUtil.group(localizer.getTextVB("headline"), WFUtil.getText(":")));// p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "language"), WFUtil.getText(":"))); HtmlInputText headlineInput = WFUtil.getInputText(HEADLINE_ID, ref + "headline"); headlineInput.setSize(70); p.getChildren().add(headlineInput); //HtmlSelectOneMenu localeMenu = WFUtil.getSelectOneMenu(LOCALE_ID, ref + "allLocales", ref + "pendingLocaleId"); //localeMenu.setOnchange("document.forms[0].submit();"); //p.getChildren().add(localeMenu); p.getChildren().add(WFUtil.group(localizer.getTextVB("author"), WFUtil.getText(":"))); HtmlInputText authorInput = WFUtil.getInputText(AUTHOR_ID, ref + "author"); authorInput.setSize(70); User user = iwc.getCurrentUser(); if(user!=null){ String userName = user.getName(); getArticleItemBean().setAuthor(userName); } p.getChildren().add(authorInput); //Article body p.getChildren().add(WFUtil.group(localizer.getTextVB("body"), WFUtil.getText(":"))); HTMLArea bodyArea = WFUtil.getHtmlAreaTextArea(BODY_ID, ref + "body", "500px", "400px"); //HTMLArea bodyArea = WFUtil.getHtmlAreaTextArea(BODY_ID, ref + "body"); /*bodyArea.addPlugin(HTMLArea.PLUGIN_TABLE_OPERATIONS); bodyArea.addPlugin(HTMLArea.PLUGIN_DYNAMIC_CSS, "3"); bodyArea.addPlugin(HTMLArea.PLUGIN_CSS, "3"); bodyArea.addPlugin(HTMLArea.PLUGIN_CONTEXT_MENU); bodyArea.addPlugin(HTMLArea.PLUGIN_LIST_TYPE); bodyArea.addPlugin(HTMLArea.PLUGIN_CHARACTER_MAP); */ bodyArea.setAllowFontSelection(false); //bodyArea.addPlugin("TableOperations"); //bodyArea.addPlugin("Template"); //bodyArea.addPlugin("Forms"); //bodyArea.addPlugin("FormOperations"); //bodyArea.addPlugin("EditTag"); //bodyArea.addPlugin("Stylist"); //bodyArea.addPlugin("CSS"); //bodyArea.addPlugin("DynamicCSS"); //bodyArea.addPlugin("FullPage"); //bodyArea.addPlugin("NoteServer"); //bodyArea.addPlugin("QuickTag"); //bodyArea.addPlugin("InsertSmiley"); //bodyArea.addPlugin("InsertWords"); //bodyArea.addPlugin("ContextMenu"); //bodyArea.addPlugin("LangMarks"); //bodyArea.addPlugin("DoubleClick"); //bodyArea.addPlugin("ListType"); //bodyArea.addPlugin("ImageManager"); p.getChildren().add(WFUtil.group(bodyArea, WFUtil.getBreak())); p.getChildren().add(WFUtil.group(localizer.getTextVB("teaser"), WFUtil.getText(":"))); HtmlInputTextarea teaserArea = WFUtil.getTextArea(TEASER_ID, ref + "teaser", "500px", "60px"); p.getChildren().add(teaserArea); p.getChildren().add(WFUtil.group(localizer.getTextVB("source"), WFUtil.getText(":"))); HtmlInputText sourceArea = WFUtil.getInputText(SOURCE_ID, ref + "source"); sourceArea.setSize(70); p.getChildren().add(sourceArea); p.getChildren().add(WFUtil.getBreak()); p.getChildren().add(WFUtil.getBreak()); // p = WFPanelUtil.getPlainFormPanel(1);/* p.getChildren().add(WFUtil.group(WFUtil.getHeaderTextVB(bref + "created"), WFUtil.getTextVB(ref + "creationDate") ));*/// p.getChildren().add(WFUtil.getText(" "));// UIComponent t = WFUtil.group(localizer.getHeaderTextVB("status"), WFUtil.getText(": "));// t.getChildren().add(WFUtil.getTextVB(ref + "status"));// p.getChildren().add(t); p.getChildren().add(WFUtil.group(localizer.getTextVB("status"), WFUtil.getText(":"))); p.getChildren().add(WFUtil.getTextVB(ref + "status")); p.getChildren().add(WFUtil.group(localizer.getTextVB("current_version"), WFUtil.getText(":"))); p.getChildren().add(WFUtil.getTextVB(ref + "versionName")); p.getChildren().add(WFUtil.getBreak()); p.getChildren().add(WFUtil.getBreak()); // p = WFPanelUtil.getFormPanel(2); p.getChildren().add(WFUtil.group(localizer.getTextVB("comment"), WFUtil.getText(":")));// p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "attachments"), WFUtil.getText(":"))); HtmlInputTextarea commentArea = WFUtil.getTextArea(COMMENT_ID, ref + "comment", "500px", "60px"); p.getChildren().add(commentArea);// WFContainer attachmentContainer = new WFContainer();// attachmentContainer.add(WFUtil.getButtonVB(ADD_ATTACHMENT_ID, bref + "add_attachment", this));// attachmentContainer.add(WFUtil.getBreak());// attachmentContainer.add(getAttachmentList());// p.getChildren().add(attachmentContainer); // mainContainer.add(p); // p = WFPanelUtil.getFormPanel(1);// p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "related_content_items"), WFUtil.getText(":"))); // WFContainer contentItemContainer = new WFContainer(); // contentItemContainer.add(WFUtil.getButtonVB(ADD_RELATED_CONTENT_ITEM_ID, bref + "add_content_item", this));// contentItemContainer.add(WFUtil.getBreak());// contentItemContainer.add(getRelatedContentItemsList());// p.getChildren().add(contentItemContainer);// p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "publishing_date"), WFUtil.getText(":"))); // WFDateInput publishedFromInput = WFUtil.getDateInput(PUBLISHED_FROM_DATE_ID, ref + "case.publishedFromDate");// publishedFromInput.setShowTime(true);// p.getChildren().add(publishedFromInput);// p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "expiration_date"), WFUtil.getText(":"))); // WFDateInput publishedToInput = WFUtil.getDateInput(PUBLISHED_TO_DATE_ID, ref + "case.publishedToDate");// publishedToInput.setShowTime(true);// p.getChildren().add(publishedToInput); // mainContainer.add(p); p.getChildren().add(WFUtil.getBreak()); p.getChildren().add(WFUtil.getBreak());// mainContainer.add(WFUtil.getBreak());// p = WFPanelUtil.getPlainFormPanel(1);// HtmlCommandButton editCategoriesButton = WFUtil.getButtonVB(EDIT_CATEGORIES_ID, bref + "edit_categories", this);// p.getChildren().add(editCategoriesButton); //Temporary taking away folderr location/* p.getChildren().add(WFUtil.group(localizer.getTextVB("folder"), WFUtil.getText(":"))); HtmlInputText folderInput = WFUtil.getInputText(FOLDER_ID, ref + "folderLocation"); if(null==folderInput.getValue() || "".equals(folderInput.getValue())) { String FolderString = ArticleUtil.getArticleYearMonthPath();// System.out.println("Folder "+FolderString); folderInput.setValue(FolderString); } else { File file = new File(folderInput.getValue().toString()); folderInput.setValue(file.getParentFile().getParent()); } folderInput.setSize(70); p.getChildren().add(folderInput); */ p.getChildren().add(WFUtil.getBreak()); //Categories// WebDAVCategories categoriesUI = new WebDAVCategories(); //ArticleItemBean articleItemBean = (ArticleItemBean) getArticleItemBean(); //String resourcePath = articleItemBean.getArticleResourcePath(); addCategoryEditor(p); p.getChildren().add(WFUtil.getBreak()); p.getChildren().add(WFUtil.getBreak()); p.getChildren().add(WFUtil.getBreak());// WFComponentSelector cs = new WFComponentSelector();// cs.setId(BUTTON_SELECTOR_ID);// cs.setDividerText(" "); HtmlCommandButton saveButton = localizer.getButtonVB(SAVE_ID, "save", this);// HtmlCommandButton saveButton = WFUtil.getButtonVB(SAVE_ID, WFPage.CONTENT_BUNDLE + "save", this);// cs.add(saveButton);// cs.add(WFUtil.getButtonVB(FOR_REVIEW_ID, bref + "for_review", this));// cs.add(WFUtil.getButtonVB(PUBLISH_ID, bref + "publish", this));// cs.add(WFUtil.getButtonVB(REWRITE_ID, bref + "rewrite", this));// cs.add(WFUtil.getButtonVB(REJECT_ID, bref + "reject", this));// cs.add(WFUtil.getButtonVB(DELETE_ID, bref + "delete", this));// cs.add(WFUtil.getButtonVB(CANCEL_ID, bref + "cancel", this));// cs.setSelectedId(CANCEL_ID, true);// p.getChildren().add(cs); p.getChildren().add(saveButton); mainContainer.add(p); //WFComponentSelector editorSelector = new WFComponentSelector(); //editorSelector.setId(EDITOR_SELECTOR_ID); //editorSelector.add(mainContainer); //editorSelector.add(getCategoryEditContainer());// FileUploadForm f = new FileUploadForm(this, FILE_UPLOAD_ID, FILE_UPLOAD_CANCEL_ID); //editorSelector.add(getRelatedContentItemsContainer()); //editorSelector.setSelectedId(ARTICLE_EDITOR_ID, true); //return editorSelector; return mainContainer; } | 57000 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57000/5db26355cf68616cbd8859fa37cd6aa73d783808/EditArticleView.java/buggy/src/java/com/idega/block/article/component/EditArticleView.java |
|
/*bodyArea.addPlugin(HTMLArea.PLUGIN_TABLE_OPERATIONS); bodyArea.addPlugin(HTMLArea.PLUGIN_DYNAMIC_CSS, "3"); bodyArea.addPlugin(HTMLArea.PLUGIN_CSS, "3"); bodyArea.addPlugin(HTMLArea.PLUGIN_CONTEXT_MENU); bodyArea.addPlugin(HTMLArea.PLUGIN_LIST_TYPE); bodyArea.addPlugin(HTMLArea.PLUGIN_CHARACTER_MAP); */ | public UIComponent getEditContainer() { IWContext iwc = IWContext.getInstance(); WFResourceUtil localizer = WFResourceUtil.getResourceUtilArticle();// String bref = WFPage.CONTENT_BUNDLE + "."; WFContainer mainContainer = new WFContainer(); mainContainer.setId(ARTICLE_EDITOR_ID); WFErrorMessages em = new WFErrorMessages(); em.addErrorMessage(HEADLINE_ID); em.addErrorMessage(TEASER_ID);// em.addErrorMessage(PUBLISHED_FROM_DATE_ID);// em.addErrorMessage(PUBLISHED_TO_DATE_ID); em.addErrorMessage(SAVE_ID); mainContainer.add(em); //Saving the state of the articleItemBean specially because the scpoe //of this bean now is 'request' not 'session' UISaveState beanSaveState = new UISaveState(); ValueBinding binding = WFUtil.createValueBinding("#{"+ARTICLE_ITEM_BEAN_ID+"}"); beanSaveState.setId("articleItemBeanSaveState"); beanSaveState.setValueBinding("value",binding); mainContainer.add(beanSaveState); HtmlPanelGrid p = WFPanelUtil.getPlainFormPanel(2); //Language dropdown p.getChildren().add(WFUtil.group(localizer.getTextVB("language"), WFUtil.getText(":"))); UIComponent langDropdown = getLanguageDropdownMenu(); p.getChildren().add(langDropdown); p.getChildren().add(WFUtil.group(localizer.getTextVB("headline"), WFUtil.getText(":")));// p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "language"), WFUtil.getText(":"))); HtmlInputText headlineInput = WFUtil.getInputText(HEADLINE_ID, ref + "headline"); headlineInput.setSize(70); p.getChildren().add(headlineInput); //HtmlSelectOneMenu localeMenu = WFUtil.getSelectOneMenu(LOCALE_ID, ref + "allLocales", ref + "pendingLocaleId"); //localeMenu.setOnchange("document.forms[0].submit();"); //p.getChildren().add(localeMenu); p.getChildren().add(WFUtil.group(localizer.getTextVB("author"), WFUtil.getText(":"))); HtmlInputText authorInput = WFUtil.getInputText(AUTHOR_ID, ref + "author"); authorInput.setSize(70); User user = iwc.getCurrentUser(); if(user!=null){ String userName = user.getName(); getArticleItemBean().setAuthor(userName); } p.getChildren().add(authorInput); //Article body p.getChildren().add(WFUtil.group(localizer.getTextVB("body"), WFUtil.getText(":"))); HTMLArea bodyArea = WFUtil.getHtmlAreaTextArea(BODY_ID, ref + "body", "500px", "400px"); //HTMLArea bodyArea = WFUtil.getHtmlAreaTextArea(BODY_ID, ref + "body"); /*bodyArea.addPlugin(HTMLArea.PLUGIN_TABLE_OPERATIONS); bodyArea.addPlugin(HTMLArea.PLUGIN_DYNAMIC_CSS, "3"); bodyArea.addPlugin(HTMLArea.PLUGIN_CSS, "3"); bodyArea.addPlugin(HTMLArea.PLUGIN_CONTEXT_MENU); bodyArea.addPlugin(HTMLArea.PLUGIN_LIST_TYPE); bodyArea.addPlugin(HTMLArea.PLUGIN_CHARACTER_MAP); */ bodyArea.setAllowFontSelection(false); //bodyArea.addPlugin("TableOperations"); //bodyArea.addPlugin("Template"); //bodyArea.addPlugin("Forms"); //bodyArea.addPlugin("FormOperations"); //bodyArea.addPlugin("EditTag"); //bodyArea.addPlugin("Stylist"); //bodyArea.addPlugin("CSS"); //bodyArea.addPlugin("DynamicCSS"); //bodyArea.addPlugin("FullPage"); //bodyArea.addPlugin("NoteServer"); //bodyArea.addPlugin("QuickTag"); //bodyArea.addPlugin("InsertSmiley"); //bodyArea.addPlugin("InsertWords"); //bodyArea.addPlugin("ContextMenu"); //bodyArea.addPlugin("LangMarks"); //bodyArea.addPlugin("DoubleClick"); //bodyArea.addPlugin("ListType"); //bodyArea.addPlugin("ImageManager"); p.getChildren().add(WFUtil.group(bodyArea, WFUtil.getBreak())); p.getChildren().add(WFUtil.group(localizer.getTextVB("teaser"), WFUtil.getText(":"))); HtmlInputTextarea teaserArea = WFUtil.getTextArea(TEASER_ID, ref + "teaser", "500px", "60px"); p.getChildren().add(teaserArea); p.getChildren().add(WFUtil.group(localizer.getTextVB("source"), WFUtil.getText(":"))); HtmlInputText sourceArea = WFUtil.getInputText(SOURCE_ID, ref + "source"); sourceArea.setSize(70); p.getChildren().add(sourceArea); p.getChildren().add(WFUtil.getBreak()); p.getChildren().add(WFUtil.getBreak()); // p = WFPanelUtil.getPlainFormPanel(1);/* p.getChildren().add(WFUtil.group(WFUtil.getHeaderTextVB(bref + "created"), WFUtil.getTextVB(ref + "creationDate") ));*/// p.getChildren().add(WFUtil.getText(" "));// UIComponent t = WFUtil.group(localizer.getHeaderTextVB("status"), WFUtil.getText(": "));// t.getChildren().add(WFUtil.getTextVB(ref + "status"));// p.getChildren().add(t); p.getChildren().add(WFUtil.group(localizer.getTextVB("status"), WFUtil.getText(":"))); p.getChildren().add(WFUtil.getTextVB(ref + "status")); p.getChildren().add(WFUtil.group(localizer.getTextVB("current_version"), WFUtil.getText(":"))); p.getChildren().add(WFUtil.getTextVB(ref + "versionName")); p.getChildren().add(WFUtil.getBreak()); p.getChildren().add(WFUtil.getBreak()); // p = WFPanelUtil.getFormPanel(2); p.getChildren().add(WFUtil.group(localizer.getTextVB("comment"), WFUtil.getText(":")));// p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "attachments"), WFUtil.getText(":"))); HtmlInputTextarea commentArea = WFUtil.getTextArea(COMMENT_ID, ref + "comment", "500px", "60px"); p.getChildren().add(commentArea);// WFContainer attachmentContainer = new WFContainer();// attachmentContainer.add(WFUtil.getButtonVB(ADD_ATTACHMENT_ID, bref + "add_attachment", this));// attachmentContainer.add(WFUtil.getBreak());// attachmentContainer.add(getAttachmentList());// p.getChildren().add(attachmentContainer); // mainContainer.add(p); // p = WFPanelUtil.getFormPanel(1);// p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "related_content_items"), WFUtil.getText(":"))); // WFContainer contentItemContainer = new WFContainer(); // contentItemContainer.add(WFUtil.getButtonVB(ADD_RELATED_CONTENT_ITEM_ID, bref + "add_content_item", this));// contentItemContainer.add(WFUtil.getBreak());// contentItemContainer.add(getRelatedContentItemsList());// p.getChildren().add(contentItemContainer);// p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "publishing_date"), WFUtil.getText(":"))); // WFDateInput publishedFromInput = WFUtil.getDateInput(PUBLISHED_FROM_DATE_ID, ref + "case.publishedFromDate");// publishedFromInput.setShowTime(true);// p.getChildren().add(publishedFromInput);// p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "expiration_date"), WFUtil.getText(":"))); // WFDateInput publishedToInput = WFUtil.getDateInput(PUBLISHED_TO_DATE_ID, ref + "case.publishedToDate");// publishedToInput.setShowTime(true);// p.getChildren().add(publishedToInput); // mainContainer.add(p); p.getChildren().add(WFUtil.getBreak()); p.getChildren().add(WFUtil.getBreak());// mainContainer.add(WFUtil.getBreak());// p = WFPanelUtil.getPlainFormPanel(1);// HtmlCommandButton editCategoriesButton = WFUtil.getButtonVB(EDIT_CATEGORIES_ID, bref + "edit_categories", this);// p.getChildren().add(editCategoriesButton); //Temporary taking away folderr location/* p.getChildren().add(WFUtil.group(localizer.getTextVB("folder"), WFUtil.getText(":"))); HtmlInputText folderInput = WFUtil.getInputText(FOLDER_ID, ref + "folderLocation"); if(null==folderInput.getValue() || "".equals(folderInput.getValue())) { String FolderString = ArticleUtil.getArticleYearMonthPath();// System.out.println("Folder "+FolderString); folderInput.setValue(FolderString); } else { File file = new File(folderInput.getValue().toString()); folderInput.setValue(file.getParentFile().getParent()); } folderInput.setSize(70); p.getChildren().add(folderInput); */ p.getChildren().add(WFUtil.getBreak()); //Categories// WebDAVCategories categoriesUI = new WebDAVCategories(); //ArticleItemBean articleItemBean = (ArticleItemBean) getArticleItemBean(); //String resourcePath = articleItemBean.getArticleResourcePath(); addCategoryEditor(p); p.getChildren().add(WFUtil.getBreak()); p.getChildren().add(WFUtil.getBreak()); p.getChildren().add(WFUtil.getBreak());// WFComponentSelector cs = new WFComponentSelector();// cs.setId(BUTTON_SELECTOR_ID);// cs.setDividerText(" "); HtmlCommandButton saveButton = localizer.getButtonVB(SAVE_ID, "save", this);// HtmlCommandButton saveButton = WFUtil.getButtonVB(SAVE_ID, WFPage.CONTENT_BUNDLE + "save", this);// cs.add(saveButton);// cs.add(WFUtil.getButtonVB(FOR_REVIEW_ID, bref + "for_review", this));// cs.add(WFUtil.getButtonVB(PUBLISH_ID, bref + "publish", this));// cs.add(WFUtil.getButtonVB(REWRITE_ID, bref + "rewrite", this));// cs.add(WFUtil.getButtonVB(REJECT_ID, bref + "reject", this));// cs.add(WFUtil.getButtonVB(DELETE_ID, bref + "delete", this));// cs.add(WFUtil.getButtonVB(CANCEL_ID, bref + "cancel", this));// cs.setSelectedId(CANCEL_ID, true);// p.getChildren().add(cs); p.getChildren().add(saveButton); mainContainer.add(p); //WFComponentSelector editorSelector = new WFComponentSelector(); //editorSelector.setId(EDITOR_SELECTOR_ID); //editorSelector.add(mainContainer); //editorSelector.add(getCategoryEditContainer());// FileUploadForm f = new FileUploadForm(this, FILE_UPLOAD_ID, FILE_UPLOAD_CANCEL_ID); //editorSelector.add(getRelatedContentItemsContainer()); //editorSelector.setSelectedId(ARTICLE_EDITOR_ID, true); //return editorSelector; return mainContainer; } | 57000 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57000/5db26355cf68616cbd8859fa37cd6aa73d783808/EditArticleView.java/buggy/src/java/com/idega/block/article/component/EditArticleView.java |
|
p.getChildren().add(WFUtil.group(bodyArea, WFUtil.getBreak())); p.getChildren().add(WFUtil.group(localizer.getTextVB("teaser"), WFUtil.getText(":"))); | UIComponent bodyText = WFUtil.group(localizer.getTextVB("body"), WFUtil.getText(":")); HtmlOutputLabel bodyLabel = new HtmlOutputLabel(); bodyLabel.getChildren().add(bodyText); bodyLabel.setFor(bodyArea.getClientId(context)); WFFormItem bodyItem = new WFFormItem(); bodyItem.add(bodyLabel); bodyItem.add(bodyArea); mainContainer.add(bodyItem); | public UIComponent getEditContainer() { IWContext iwc = IWContext.getInstance(); WFResourceUtil localizer = WFResourceUtil.getResourceUtilArticle();// String bref = WFPage.CONTENT_BUNDLE + "."; WFContainer mainContainer = new WFContainer(); mainContainer.setId(ARTICLE_EDITOR_ID); WFErrorMessages em = new WFErrorMessages(); em.addErrorMessage(HEADLINE_ID); em.addErrorMessage(TEASER_ID);// em.addErrorMessage(PUBLISHED_FROM_DATE_ID);// em.addErrorMessage(PUBLISHED_TO_DATE_ID); em.addErrorMessage(SAVE_ID); mainContainer.add(em); //Saving the state of the articleItemBean specially because the scpoe //of this bean now is 'request' not 'session' UISaveState beanSaveState = new UISaveState(); ValueBinding binding = WFUtil.createValueBinding("#{"+ARTICLE_ITEM_BEAN_ID+"}"); beanSaveState.setId("articleItemBeanSaveState"); beanSaveState.setValueBinding("value",binding); mainContainer.add(beanSaveState); HtmlPanelGrid p = WFPanelUtil.getPlainFormPanel(2); //Language dropdown p.getChildren().add(WFUtil.group(localizer.getTextVB("language"), WFUtil.getText(":"))); UIComponent langDropdown = getLanguageDropdownMenu(); p.getChildren().add(langDropdown); p.getChildren().add(WFUtil.group(localizer.getTextVB("headline"), WFUtil.getText(":")));// p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "language"), WFUtil.getText(":"))); HtmlInputText headlineInput = WFUtil.getInputText(HEADLINE_ID, ref + "headline"); headlineInput.setSize(70); p.getChildren().add(headlineInput); //HtmlSelectOneMenu localeMenu = WFUtil.getSelectOneMenu(LOCALE_ID, ref + "allLocales", ref + "pendingLocaleId"); //localeMenu.setOnchange("document.forms[0].submit();"); //p.getChildren().add(localeMenu); p.getChildren().add(WFUtil.group(localizer.getTextVB("author"), WFUtil.getText(":"))); HtmlInputText authorInput = WFUtil.getInputText(AUTHOR_ID, ref + "author"); authorInput.setSize(70); User user = iwc.getCurrentUser(); if(user!=null){ String userName = user.getName(); getArticleItemBean().setAuthor(userName); } p.getChildren().add(authorInput); //Article body p.getChildren().add(WFUtil.group(localizer.getTextVB("body"), WFUtil.getText(":"))); HTMLArea bodyArea = WFUtil.getHtmlAreaTextArea(BODY_ID, ref + "body", "500px", "400px"); //HTMLArea bodyArea = WFUtil.getHtmlAreaTextArea(BODY_ID, ref + "body"); /*bodyArea.addPlugin(HTMLArea.PLUGIN_TABLE_OPERATIONS); bodyArea.addPlugin(HTMLArea.PLUGIN_DYNAMIC_CSS, "3"); bodyArea.addPlugin(HTMLArea.PLUGIN_CSS, "3"); bodyArea.addPlugin(HTMLArea.PLUGIN_CONTEXT_MENU); bodyArea.addPlugin(HTMLArea.PLUGIN_LIST_TYPE); bodyArea.addPlugin(HTMLArea.PLUGIN_CHARACTER_MAP); */ bodyArea.setAllowFontSelection(false); //bodyArea.addPlugin("TableOperations"); //bodyArea.addPlugin("Template"); //bodyArea.addPlugin("Forms"); //bodyArea.addPlugin("FormOperations"); //bodyArea.addPlugin("EditTag"); //bodyArea.addPlugin("Stylist"); //bodyArea.addPlugin("CSS"); //bodyArea.addPlugin("DynamicCSS"); //bodyArea.addPlugin("FullPage"); //bodyArea.addPlugin("NoteServer"); //bodyArea.addPlugin("QuickTag"); //bodyArea.addPlugin("InsertSmiley"); //bodyArea.addPlugin("InsertWords"); //bodyArea.addPlugin("ContextMenu"); //bodyArea.addPlugin("LangMarks"); //bodyArea.addPlugin("DoubleClick"); //bodyArea.addPlugin("ListType"); //bodyArea.addPlugin("ImageManager"); p.getChildren().add(WFUtil.group(bodyArea, WFUtil.getBreak())); p.getChildren().add(WFUtil.group(localizer.getTextVB("teaser"), WFUtil.getText(":"))); HtmlInputTextarea teaserArea = WFUtil.getTextArea(TEASER_ID, ref + "teaser", "500px", "60px"); p.getChildren().add(teaserArea); p.getChildren().add(WFUtil.group(localizer.getTextVB("source"), WFUtil.getText(":"))); HtmlInputText sourceArea = WFUtil.getInputText(SOURCE_ID, ref + "source"); sourceArea.setSize(70); p.getChildren().add(sourceArea); p.getChildren().add(WFUtil.getBreak()); p.getChildren().add(WFUtil.getBreak()); // p = WFPanelUtil.getPlainFormPanel(1);/* p.getChildren().add(WFUtil.group(WFUtil.getHeaderTextVB(bref + "created"), WFUtil.getTextVB(ref + "creationDate") ));*/// p.getChildren().add(WFUtil.getText(" "));// UIComponent t = WFUtil.group(localizer.getHeaderTextVB("status"), WFUtil.getText(": "));// t.getChildren().add(WFUtil.getTextVB(ref + "status"));// p.getChildren().add(t); p.getChildren().add(WFUtil.group(localizer.getTextVB("status"), WFUtil.getText(":"))); p.getChildren().add(WFUtil.getTextVB(ref + "status")); p.getChildren().add(WFUtil.group(localizer.getTextVB("current_version"), WFUtil.getText(":"))); p.getChildren().add(WFUtil.getTextVB(ref + "versionName")); p.getChildren().add(WFUtil.getBreak()); p.getChildren().add(WFUtil.getBreak()); // p = WFPanelUtil.getFormPanel(2); p.getChildren().add(WFUtil.group(localizer.getTextVB("comment"), WFUtil.getText(":")));// p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "attachments"), WFUtil.getText(":"))); HtmlInputTextarea commentArea = WFUtil.getTextArea(COMMENT_ID, ref + "comment", "500px", "60px"); p.getChildren().add(commentArea);// WFContainer attachmentContainer = new WFContainer();// attachmentContainer.add(WFUtil.getButtonVB(ADD_ATTACHMENT_ID, bref + "add_attachment", this));// attachmentContainer.add(WFUtil.getBreak());// attachmentContainer.add(getAttachmentList());// p.getChildren().add(attachmentContainer); // mainContainer.add(p); // p = WFPanelUtil.getFormPanel(1);// p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "related_content_items"), WFUtil.getText(":"))); // WFContainer contentItemContainer = new WFContainer(); // contentItemContainer.add(WFUtil.getButtonVB(ADD_RELATED_CONTENT_ITEM_ID, bref + "add_content_item", this));// contentItemContainer.add(WFUtil.getBreak());// contentItemContainer.add(getRelatedContentItemsList());// p.getChildren().add(contentItemContainer);// p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "publishing_date"), WFUtil.getText(":"))); // WFDateInput publishedFromInput = WFUtil.getDateInput(PUBLISHED_FROM_DATE_ID, ref + "case.publishedFromDate");// publishedFromInput.setShowTime(true);// p.getChildren().add(publishedFromInput);// p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "expiration_date"), WFUtil.getText(":"))); // WFDateInput publishedToInput = WFUtil.getDateInput(PUBLISHED_TO_DATE_ID, ref + "case.publishedToDate");// publishedToInput.setShowTime(true);// p.getChildren().add(publishedToInput); // mainContainer.add(p); p.getChildren().add(WFUtil.getBreak()); p.getChildren().add(WFUtil.getBreak());// mainContainer.add(WFUtil.getBreak());// p = WFPanelUtil.getPlainFormPanel(1);// HtmlCommandButton editCategoriesButton = WFUtil.getButtonVB(EDIT_CATEGORIES_ID, bref + "edit_categories", this);// p.getChildren().add(editCategoriesButton); //Temporary taking away folderr location/* p.getChildren().add(WFUtil.group(localizer.getTextVB("folder"), WFUtil.getText(":"))); HtmlInputText folderInput = WFUtil.getInputText(FOLDER_ID, ref + "folderLocation"); if(null==folderInput.getValue() || "".equals(folderInput.getValue())) { String FolderString = ArticleUtil.getArticleYearMonthPath();// System.out.println("Folder "+FolderString); folderInput.setValue(FolderString); } else { File file = new File(folderInput.getValue().toString()); folderInput.setValue(file.getParentFile().getParent()); } folderInput.setSize(70); p.getChildren().add(folderInput); */ p.getChildren().add(WFUtil.getBreak()); //Categories// WebDAVCategories categoriesUI = new WebDAVCategories(); //ArticleItemBean articleItemBean = (ArticleItemBean) getArticleItemBean(); //String resourcePath = articleItemBean.getArticleResourcePath(); addCategoryEditor(p); p.getChildren().add(WFUtil.getBreak()); p.getChildren().add(WFUtil.getBreak()); p.getChildren().add(WFUtil.getBreak());// WFComponentSelector cs = new WFComponentSelector();// cs.setId(BUTTON_SELECTOR_ID);// cs.setDividerText(" "); HtmlCommandButton saveButton = localizer.getButtonVB(SAVE_ID, "save", this);// HtmlCommandButton saveButton = WFUtil.getButtonVB(SAVE_ID, WFPage.CONTENT_BUNDLE + "save", this);// cs.add(saveButton);// cs.add(WFUtil.getButtonVB(FOR_REVIEW_ID, bref + "for_review", this));// cs.add(WFUtil.getButtonVB(PUBLISH_ID, bref + "publish", this));// cs.add(WFUtil.getButtonVB(REWRITE_ID, bref + "rewrite", this));// cs.add(WFUtil.getButtonVB(REJECT_ID, bref + "reject", this));// cs.add(WFUtil.getButtonVB(DELETE_ID, bref + "delete", this));// cs.add(WFUtil.getButtonVB(CANCEL_ID, bref + "cancel", this));// cs.setSelectedId(CANCEL_ID, true);// p.getChildren().add(cs); p.getChildren().add(saveButton); mainContainer.add(p); //WFComponentSelector editorSelector = new WFComponentSelector(); //editorSelector.setId(EDITOR_SELECTOR_ID); //editorSelector.add(mainContainer); //editorSelector.add(getCategoryEditContainer());// FileUploadForm f = new FileUploadForm(this, FILE_UPLOAD_ID, FILE_UPLOAD_CANCEL_ID); //editorSelector.add(getRelatedContentItemsContainer()); //editorSelector.setSelectedId(ARTICLE_EDITOR_ID, true); //return editorSelector; return mainContainer; } | 57000 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57000/5db26355cf68616cbd8859fa37cd6aa73d783808/EditArticleView.java/buggy/src/java/com/idega/block/article/component/EditArticleView.java |
p.getChildren().add(teaserArea); p.getChildren().add(WFUtil.group(localizer.getTextVB("source"), WFUtil.getText(":"))); HtmlInputText sourceArea = WFUtil.getInputText(SOURCE_ID, ref + "source"); sourceArea.setSize(70); p.getChildren().add(sourceArea); p.getChildren().add(WFUtil.getBreak()); p.getChildren().add(WFUtil.getBreak()); /* p.getChildren().add(WFUtil.group(WFUtil.getHeaderTextVB(bref + "created"), WFUtil.getTextVB(ref + "creationDate") )); */ p.getChildren().add(WFUtil.group(localizer.getTextVB("status"), WFUtil.getText(":"))); p.getChildren().add(WFUtil.getTextVB(ref + "status")); p.getChildren().add(WFUtil.group(localizer.getTextVB("current_version"), WFUtil.getText(":"))); p.getChildren().add(WFUtil.getTextVB(ref + "versionName")); p.getChildren().add(WFUtil.getBreak()); p.getChildren().add(WFUtil.getBreak()); p.getChildren().add(WFUtil.group(localizer.getTextVB("comment"), WFUtil.getText(":"))); | UIComponent teaserText = WFUtil.group(localizer.getTextVB("teaser"), WFUtil.getText(":")); HtmlOutputLabel teaserLabel = new HtmlOutputLabel(); teaserLabel.getChildren().add(teaserText); teaserLabel.setFor(teaserArea.getClientId(context)); WFFormItem teaserItem = new WFFormItem(); teaserItem.add(teaserLabel); teaserItem.add(teaserArea); mainContainer.add(teaserItem); HtmlInputText sourceInput = WFUtil.getInputText(SOURCE_ID, ref + "source"); UIComponent sourceText = WFUtil.group(localizer.getTextVB("source"), WFUtil.getText(":")); HtmlOutputLabel sourceLabel = new HtmlOutputLabel(); sourceLabel.getChildren().add(sourceText); sourceLabel.setFor(sourceInput.getClientId(context)); WFFormItem sourceItem = new WFFormItem(); sourceItem.add(sourceLabel); sourceItem.add(sourceInput); mainContainer.add(sourceItem); HtmlOutputText statusValue = WFUtil.getTextVB(ref + "status"); WFContainer statusContainer = new WFContainer(); statusContainer.getChildren().add(statusValue); UIComponent statusText = WFUtil.group(localizer.getTextVB("status"), WFUtil.getText(":")); HtmlOutputLabel statusLabel = new HtmlOutputLabel(); statusLabel.getChildren().add(statusText); statusLabel.setFor(statusValue.getClientId(context)); WFFormItem statusItem = new WFFormItem(); statusItem.add(statusLabel); statusItem.add(statusContainer); mainContainer.add(statusItem); HtmlOutputText versionValue = WFUtil.getTextVB(ref + "versionName"); WFContainer versionContainer = new WFContainer(); versionContainer.add(versionValue); UIComponent versionText = WFUtil.group(localizer.getTextVB("current_version"), WFUtil.getText(":")); HtmlOutputLabel versionLabel = new HtmlOutputLabel(); versionLabel.getChildren().add(versionText); versionLabel.setFor(versionValue.getClientId(context)); WFFormItem versionItem = new WFFormItem(); versionItem.add(versionLabel); versionItem.add(versionContainer); mainContainer.add(versionItem); | public UIComponent getEditContainer() { IWContext iwc = IWContext.getInstance(); WFResourceUtil localizer = WFResourceUtil.getResourceUtilArticle();// String bref = WFPage.CONTENT_BUNDLE + "."; WFContainer mainContainer = new WFContainer(); mainContainer.setId(ARTICLE_EDITOR_ID); WFErrorMessages em = new WFErrorMessages(); em.addErrorMessage(HEADLINE_ID); em.addErrorMessage(TEASER_ID);// em.addErrorMessage(PUBLISHED_FROM_DATE_ID);// em.addErrorMessage(PUBLISHED_TO_DATE_ID); em.addErrorMessage(SAVE_ID); mainContainer.add(em); //Saving the state of the articleItemBean specially because the scpoe //of this bean now is 'request' not 'session' UISaveState beanSaveState = new UISaveState(); ValueBinding binding = WFUtil.createValueBinding("#{"+ARTICLE_ITEM_BEAN_ID+"}"); beanSaveState.setId("articleItemBeanSaveState"); beanSaveState.setValueBinding("value",binding); mainContainer.add(beanSaveState); HtmlPanelGrid p = WFPanelUtil.getPlainFormPanel(2); //Language dropdown p.getChildren().add(WFUtil.group(localizer.getTextVB("language"), WFUtil.getText(":"))); UIComponent langDropdown = getLanguageDropdownMenu(); p.getChildren().add(langDropdown); p.getChildren().add(WFUtil.group(localizer.getTextVB("headline"), WFUtil.getText(":")));// p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "language"), WFUtil.getText(":"))); HtmlInputText headlineInput = WFUtil.getInputText(HEADLINE_ID, ref + "headline"); headlineInput.setSize(70); p.getChildren().add(headlineInput); //HtmlSelectOneMenu localeMenu = WFUtil.getSelectOneMenu(LOCALE_ID, ref + "allLocales", ref + "pendingLocaleId"); //localeMenu.setOnchange("document.forms[0].submit();"); //p.getChildren().add(localeMenu); p.getChildren().add(WFUtil.group(localizer.getTextVB("author"), WFUtil.getText(":"))); HtmlInputText authorInput = WFUtil.getInputText(AUTHOR_ID, ref + "author"); authorInput.setSize(70); User user = iwc.getCurrentUser(); if(user!=null){ String userName = user.getName(); getArticleItemBean().setAuthor(userName); } p.getChildren().add(authorInput); //Article body p.getChildren().add(WFUtil.group(localizer.getTextVB("body"), WFUtil.getText(":"))); HTMLArea bodyArea = WFUtil.getHtmlAreaTextArea(BODY_ID, ref + "body", "500px", "400px"); //HTMLArea bodyArea = WFUtil.getHtmlAreaTextArea(BODY_ID, ref + "body"); /*bodyArea.addPlugin(HTMLArea.PLUGIN_TABLE_OPERATIONS); bodyArea.addPlugin(HTMLArea.PLUGIN_DYNAMIC_CSS, "3"); bodyArea.addPlugin(HTMLArea.PLUGIN_CSS, "3"); bodyArea.addPlugin(HTMLArea.PLUGIN_CONTEXT_MENU); bodyArea.addPlugin(HTMLArea.PLUGIN_LIST_TYPE); bodyArea.addPlugin(HTMLArea.PLUGIN_CHARACTER_MAP); */ bodyArea.setAllowFontSelection(false); //bodyArea.addPlugin("TableOperations"); //bodyArea.addPlugin("Template"); //bodyArea.addPlugin("Forms"); //bodyArea.addPlugin("FormOperations"); //bodyArea.addPlugin("EditTag"); //bodyArea.addPlugin("Stylist"); //bodyArea.addPlugin("CSS"); //bodyArea.addPlugin("DynamicCSS"); //bodyArea.addPlugin("FullPage"); //bodyArea.addPlugin("NoteServer"); //bodyArea.addPlugin("QuickTag"); //bodyArea.addPlugin("InsertSmiley"); //bodyArea.addPlugin("InsertWords"); //bodyArea.addPlugin("ContextMenu"); //bodyArea.addPlugin("LangMarks"); //bodyArea.addPlugin("DoubleClick"); //bodyArea.addPlugin("ListType"); //bodyArea.addPlugin("ImageManager"); p.getChildren().add(WFUtil.group(bodyArea, WFUtil.getBreak())); p.getChildren().add(WFUtil.group(localizer.getTextVB("teaser"), WFUtil.getText(":"))); HtmlInputTextarea teaserArea = WFUtil.getTextArea(TEASER_ID, ref + "teaser", "500px", "60px"); p.getChildren().add(teaserArea); p.getChildren().add(WFUtil.group(localizer.getTextVB("source"), WFUtil.getText(":"))); HtmlInputText sourceArea = WFUtil.getInputText(SOURCE_ID, ref + "source"); sourceArea.setSize(70); p.getChildren().add(sourceArea); p.getChildren().add(WFUtil.getBreak()); p.getChildren().add(WFUtil.getBreak()); // p = WFPanelUtil.getPlainFormPanel(1);/* p.getChildren().add(WFUtil.group(WFUtil.getHeaderTextVB(bref + "created"), WFUtil.getTextVB(ref + "creationDate") ));*/// p.getChildren().add(WFUtil.getText(" "));// UIComponent t = WFUtil.group(localizer.getHeaderTextVB("status"), WFUtil.getText(": "));// t.getChildren().add(WFUtil.getTextVB(ref + "status"));// p.getChildren().add(t); p.getChildren().add(WFUtil.group(localizer.getTextVB("status"), WFUtil.getText(":"))); p.getChildren().add(WFUtil.getTextVB(ref + "status")); p.getChildren().add(WFUtil.group(localizer.getTextVB("current_version"), WFUtil.getText(":"))); p.getChildren().add(WFUtil.getTextVB(ref + "versionName")); p.getChildren().add(WFUtil.getBreak()); p.getChildren().add(WFUtil.getBreak()); // p = WFPanelUtil.getFormPanel(2); p.getChildren().add(WFUtil.group(localizer.getTextVB("comment"), WFUtil.getText(":")));// p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "attachments"), WFUtil.getText(":"))); HtmlInputTextarea commentArea = WFUtil.getTextArea(COMMENT_ID, ref + "comment", "500px", "60px"); p.getChildren().add(commentArea);// WFContainer attachmentContainer = new WFContainer();// attachmentContainer.add(WFUtil.getButtonVB(ADD_ATTACHMENT_ID, bref + "add_attachment", this));// attachmentContainer.add(WFUtil.getBreak());// attachmentContainer.add(getAttachmentList());// p.getChildren().add(attachmentContainer); // mainContainer.add(p); // p = WFPanelUtil.getFormPanel(1);// p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "related_content_items"), WFUtil.getText(":"))); // WFContainer contentItemContainer = new WFContainer(); // contentItemContainer.add(WFUtil.getButtonVB(ADD_RELATED_CONTENT_ITEM_ID, bref + "add_content_item", this));// contentItemContainer.add(WFUtil.getBreak());// contentItemContainer.add(getRelatedContentItemsList());// p.getChildren().add(contentItemContainer);// p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "publishing_date"), WFUtil.getText(":"))); // WFDateInput publishedFromInput = WFUtil.getDateInput(PUBLISHED_FROM_DATE_ID, ref + "case.publishedFromDate");// publishedFromInput.setShowTime(true);// p.getChildren().add(publishedFromInput);// p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "expiration_date"), WFUtil.getText(":"))); // WFDateInput publishedToInput = WFUtil.getDateInput(PUBLISHED_TO_DATE_ID, ref + "case.publishedToDate");// publishedToInput.setShowTime(true);// p.getChildren().add(publishedToInput); // mainContainer.add(p); p.getChildren().add(WFUtil.getBreak()); p.getChildren().add(WFUtil.getBreak());// mainContainer.add(WFUtil.getBreak());// p = WFPanelUtil.getPlainFormPanel(1);// HtmlCommandButton editCategoriesButton = WFUtil.getButtonVB(EDIT_CATEGORIES_ID, bref + "edit_categories", this);// p.getChildren().add(editCategoriesButton); //Temporary taking away folderr location/* p.getChildren().add(WFUtil.group(localizer.getTextVB("folder"), WFUtil.getText(":"))); HtmlInputText folderInput = WFUtil.getInputText(FOLDER_ID, ref + "folderLocation"); if(null==folderInput.getValue() || "".equals(folderInput.getValue())) { String FolderString = ArticleUtil.getArticleYearMonthPath();// System.out.println("Folder "+FolderString); folderInput.setValue(FolderString); } else { File file = new File(folderInput.getValue().toString()); folderInput.setValue(file.getParentFile().getParent()); } folderInput.setSize(70); p.getChildren().add(folderInput); */ p.getChildren().add(WFUtil.getBreak()); //Categories// WebDAVCategories categoriesUI = new WebDAVCategories(); //ArticleItemBean articleItemBean = (ArticleItemBean) getArticleItemBean(); //String resourcePath = articleItemBean.getArticleResourcePath(); addCategoryEditor(p); p.getChildren().add(WFUtil.getBreak()); p.getChildren().add(WFUtil.getBreak()); p.getChildren().add(WFUtil.getBreak());// WFComponentSelector cs = new WFComponentSelector();// cs.setId(BUTTON_SELECTOR_ID);// cs.setDividerText(" "); HtmlCommandButton saveButton = localizer.getButtonVB(SAVE_ID, "save", this);// HtmlCommandButton saveButton = WFUtil.getButtonVB(SAVE_ID, WFPage.CONTENT_BUNDLE + "save", this);// cs.add(saveButton);// cs.add(WFUtil.getButtonVB(FOR_REVIEW_ID, bref + "for_review", this));// cs.add(WFUtil.getButtonVB(PUBLISH_ID, bref + "publish", this));// cs.add(WFUtil.getButtonVB(REWRITE_ID, bref + "rewrite", this));// cs.add(WFUtil.getButtonVB(REJECT_ID, bref + "reject", this));// cs.add(WFUtil.getButtonVB(DELETE_ID, bref + "delete", this));// cs.add(WFUtil.getButtonVB(CANCEL_ID, bref + "cancel", this));// cs.setSelectedId(CANCEL_ID, true);// p.getChildren().add(cs); p.getChildren().add(saveButton); mainContainer.add(p); //WFComponentSelector editorSelector = new WFComponentSelector(); //editorSelector.setId(EDITOR_SELECTOR_ID); //editorSelector.add(mainContainer); //editorSelector.add(getCategoryEditContainer());// FileUploadForm f = new FileUploadForm(this, FILE_UPLOAD_ID, FILE_UPLOAD_CANCEL_ID); //editorSelector.add(getRelatedContentItemsContainer()); //editorSelector.setSelectedId(ARTICLE_EDITOR_ID, true); //return editorSelector; return mainContainer; } | 57000 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57000/5db26355cf68616cbd8859fa37cd6aa73d783808/EditArticleView.java/buggy/src/java/com/idega/block/article/component/EditArticleView.java |
p.getChildren().add(commentArea); | UIComponent commentText = WFUtil.group(localizer.getTextVB("comment"), WFUtil.getText(":")); HtmlOutputLabel commentLabel = new HtmlOutputLabel(); commentLabel.getChildren().add(commentText); commentLabel.setFor(commentArea.getClientId(context)); WFFormItem commentItem = new WFFormItem(); commentItem.add(commentLabel); commentItem.add(commentArea); mainContainer.add(commentItem); | public UIComponent getEditContainer() { IWContext iwc = IWContext.getInstance(); WFResourceUtil localizer = WFResourceUtil.getResourceUtilArticle();// String bref = WFPage.CONTENT_BUNDLE + "."; WFContainer mainContainer = new WFContainer(); mainContainer.setId(ARTICLE_EDITOR_ID); WFErrorMessages em = new WFErrorMessages(); em.addErrorMessage(HEADLINE_ID); em.addErrorMessage(TEASER_ID);// em.addErrorMessage(PUBLISHED_FROM_DATE_ID);// em.addErrorMessage(PUBLISHED_TO_DATE_ID); em.addErrorMessage(SAVE_ID); mainContainer.add(em); //Saving the state of the articleItemBean specially because the scpoe //of this bean now is 'request' not 'session' UISaveState beanSaveState = new UISaveState(); ValueBinding binding = WFUtil.createValueBinding("#{"+ARTICLE_ITEM_BEAN_ID+"}"); beanSaveState.setId("articleItemBeanSaveState"); beanSaveState.setValueBinding("value",binding); mainContainer.add(beanSaveState); HtmlPanelGrid p = WFPanelUtil.getPlainFormPanel(2); //Language dropdown p.getChildren().add(WFUtil.group(localizer.getTextVB("language"), WFUtil.getText(":"))); UIComponent langDropdown = getLanguageDropdownMenu(); p.getChildren().add(langDropdown); p.getChildren().add(WFUtil.group(localizer.getTextVB("headline"), WFUtil.getText(":")));// p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "language"), WFUtil.getText(":"))); HtmlInputText headlineInput = WFUtil.getInputText(HEADLINE_ID, ref + "headline"); headlineInput.setSize(70); p.getChildren().add(headlineInput); //HtmlSelectOneMenu localeMenu = WFUtil.getSelectOneMenu(LOCALE_ID, ref + "allLocales", ref + "pendingLocaleId"); //localeMenu.setOnchange("document.forms[0].submit();"); //p.getChildren().add(localeMenu); p.getChildren().add(WFUtil.group(localizer.getTextVB("author"), WFUtil.getText(":"))); HtmlInputText authorInput = WFUtil.getInputText(AUTHOR_ID, ref + "author"); authorInput.setSize(70); User user = iwc.getCurrentUser(); if(user!=null){ String userName = user.getName(); getArticleItemBean().setAuthor(userName); } p.getChildren().add(authorInput); //Article body p.getChildren().add(WFUtil.group(localizer.getTextVB("body"), WFUtil.getText(":"))); HTMLArea bodyArea = WFUtil.getHtmlAreaTextArea(BODY_ID, ref + "body", "500px", "400px"); //HTMLArea bodyArea = WFUtil.getHtmlAreaTextArea(BODY_ID, ref + "body"); /*bodyArea.addPlugin(HTMLArea.PLUGIN_TABLE_OPERATIONS); bodyArea.addPlugin(HTMLArea.PLUGIN_DYNAMIC_CSS, "3"); bodyArea.addPlugin(HTMLArea.PLUGIN_CSS, "3"); bodyArea.addPlugin(HTMLArea.PLUGIN_CONTEXT_MENU); bodyArea.addPlugin(HTMLArea.PLUGIN_LIST_TYPE); bodyArea.addPlugin(HTMLArea.PLUGIN_CHARACTER_MAP); */ bodyArea.setAllowFontSelection(false); //bodyArea.addPlugin("TableOperations"); //bodyArea.addPlugin("Template"); //bodyArea.addPlugin("Forms"); //bodyArea.addPlugin("FormOperations"); //bodyArea.addPlugin("EditTag"); //bodyArea.addPlugin("Stylist"); //bodyArea.addPlugin("CSS"); //bodyArea.addPlugin("DynamicCSS"); //bodyArea.addPlugin("FullPage"); //bodyArea.addPlugin("NoteServer"); //bodyArea.addPlugin("QuickTag"); //bodyArea.addPlugin("InsertSmiley"); //bodyArea.addPlugin("InsertWords"); //bodyArea.addPlugin("ContextMenu"); //bodyArea.addPlugin("LangMarks"); //bodyArea.addPlugin("DoubleClick"); //bodyArea.addPlugin("ListType"); //bodyArea.addPlugin("ImageManager"); p.getChildren().add(WFUtil.group(bodyArea, WFUtil.getBreak())); p.getChildren().add(WFUtil.group(localizer.getTextVB("teaser"), WFUtil.getText(":"))); HtmlInputTextarea teaserArea = WFUtil.getTextArea(TEASER_ID, ref + "teaser", "500px", "60px"); p.getChildren().add(teaserArea); p.getChildren().add(WFUtil.group(localizer.getTextVB("source"), WFUtil.getText(":"))); HtmlInputText sourceArea = WFUtil.getInputText(SOURCE_ID, ref + "source"); sourceArea.setSize(70); p.getChildren().add(sourceArea); p.getChildren().add(WFUtil.getBreak()); p.getChildren().add(WFUtil.getBreak()); // p = WFPanelUtil.getPlainFormPanel(1);/* p.getChildren().add(WFUtil.group(WFUtil.getHeaderTextVB(bref + "created"), WFUtil.getTextVB(ref + "creationDate") ));*/// p.getChildren().add(WFUtil.getText(" "));// UIComponent t = WFUtil.group(localizer.getHeaderTextVB("status"), WFUtil.getText(": "));// t.getChildren().add(WFUtil.getTextVB(ref + "status"));// p.getChildren().add(t); p.getChildren().add(WFUtil.group(localizer.getTextVB("status"), WFUtil.getText(":"))); p.getChildren().add(WFUtil.getTextVB(ref + "status")); p.getChildren().add(WFUtil.group(localizer.getTextVB("current_version"), WFUtil.getText(":"))); p.getChildren().add(WFUtil.getTextVB(ref + "versionName")); p.getChildren().add(WFUtil.getBreak()); p.getChildren().add(WFUtil.getBreak()); // p = WFPanelUtil.getFormPanel(2); p.getChildren().add(WFUtil.group(localizer.getTextVB("comment"), WFUtil.getText(":")));// p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "attachments"), WFUtil.getText(":"))); HtmlInputTextarea commentArea = WFUtil.getTextArea(COMMENT_ID, ref + "comment", "500px", "60px"); p.getChildren().add(commentArea);// WFContainer attachmentContainer = new WFContainer();// attachmentContainer.add(WFUtil.getButtonVB(ADD_ATTACHMENT_ID, bref + "add_attachment", this));// attachmentContainer.add(WFUtil.getBreak());// attachmentContainer.add(getAttachmentList());// p.getChildren().add(attachmentContainer); // mainContainer.add(p); // p = WFPanelUtil.getFormPanel(1);// p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "related_content_items"), WFUtil.getText(":"))); // WFContainer contentItemContainer = new WFContainer(); // contentItemContainer.add(WFUtil.getButtonVB(ADD_RELATED_CONTENT_ITEM_ID, bref + "add_content_item", this));// contentItemContainer.add(WFUtil.getBreak());// contentItemContainer.add(getRelatedContentItemsList());// p.getChildren().add(contentItemContainer);// p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "publishing_date"), WFUtil.getText(":"))); // WFDateInput publishedFromInput = WFUtil.getDateInput(PUBLISHED_FROM_DATE_ID, ref + "case.publishedFromDate");// publishedFromInput.setShowTime(true);// p.getChildren().add(publishedFromInput);// p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "expiration_date"), WFUtil.getText(":"))); // WFDateInput publishedToInput = WFUtil.getDateInput(PUBLISHED_TO_DATE_ID, ref + "case.publishedToDate");// publishedToInput.setShowTime(true);// p.getChildren().add(publishedToInput); // mainContainer.add(p); p.getChildren().add(WFUtil.getBreak()); p.getChildren().add(WFUtil.getBreak());// mainContainer.add(WFUtil.getBreak());// p = WFPanelUtil.getPlainFormPanel(1);// HtmlCommandButton editCategoriesButton = WFUtil.getButtonVB(EDIT_CATEGORIES_ID, bref + "edit_categories", this);// p.getChildren().add(editCategoriesButton); //Temporary taking away folderr location/* p.getChildren().add(WFUtil.group(localizer.getTextVB("folder"), WFUtil.getText(":"))); HtmlInputText folderInput = WFUtil.getInputText(FOLDER_ID, ref + "folderLocation"); if(null==folderInput.getValue() || "".equals(folderInput.getValue())) { String FolderString = ArticleUtil.getArticleYearMonthPath();// System.out.println("Folder "+FolderString); folderInput.setValue(FolderString); } else { File file = new File(folderInput.getValue().toString()); folderInput.setValue(file.getParentFile().getParent()); } folderInput.setSize(70); p.getChildren().add(folderInput); */ p.getChildren().add(WFUtil.getBreak()); //Categories// WebDAVCategories categoriesUI = new WebDAVCategories(); //ArticleItemBean articleItemBean = (ArticleItemBean) getArticleItemBean(); //String resourcePath = articleItemBean.getArticleResourcePath(); addCategoryEditor(p); p.getChildren().add(WFUtil.getBreak()); p.getChildren().add(WFUtil.getBreak()); p.getChildren().add(WFUtil.getBreak());// WFComponentSelector cs = new WFComponentSelector();// cs.setId(BUTTON_SELECTOR_ID);// cs.setDividerText(" "); HtmlCommandButton saveButton = localizer.getButtonVB(SAVE_ID, "save", this);// HtmlCommandButton saveButton = WFUtil.getButtonVB(SAVE_ID, WFPage.CONTENT_BUNDLE + "save", this);// cs.add(saveButton);// cs.add(WFUtil.getButtonVB(FOR_REVIEW_ID, bref + "for_review", this));// cs.add(WFUtil.getButtonVB(PUBLISH_ID, bref + "publish", this));// cs.add(WFUtil.getButtonVB(REWRITE_ID, bref + "rewrite", this));// cs.add(WFUtil.getButtonVB(REJECT_ID, bref + "reject", this));// cs.add(WFUtil.getButtonVB(DELETE_ID, bref + "delete", this));// cs.add(WFUtil.getButtonVB(CANCEL_ID, bref + "cancel", this));// cs.setSelectedId(CANCEL_ID, true);// p.getChildren().add(cs); p.getChildren().add(saveButton); mainContainer.add(p); //WFComponentSelector editorSelector = new WFComponentSelector(); //editorSelector.setId(EDITOR_SELECTOR_ID); //editorSelector.add(mainContainer); //editorSelector.add(getCategoryEditContainer());// FileUploadForm f = new FileUploadForm(this, FILE_UPLOAD_ID, FILE_UPLOAD_CANCEL_ID); //editorSelector.add(getRelatedContentItemsContainer()); //editorSelector.setSelectedId(ARTICLE_EDITOR_ID, true); //return editorSelector; return mainContainer; } | 57000 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57000/5db26355cf68616cbd8859fa37cd6aa73d783808/EditArticleView.java/buggy/src/java/com/idega/block/article/component/EditArticleView.java |
public UIComponent getEditContainer() { IWContext iwc = IWContext.getInstance(); WFResourceUtil localizer = WFResourceUtil.getResourceUtilArticle();// String bref = WFPage.CONTENT_BUNDLE + "."; WFContainer mainContainer = new WFContainer(); mainContainer.setId(ARTICLE_EDITOR_ID); WFErrorMessages em = new WFErrorMessages(); em.addErrorMessage(HEADLINE_ID); em.addErrorMessage(TEASER_ID);// em.addErrorMessage(PUBLISHED_FROM_DATE_ID);// em.addErrorMessage(PUBLISHED_TO_DATE_ID); em.addErrorMessage(SAVE_ID); mainContainer.add(em); //Saving the state of the articleItemBean specially because the scpoe //of this bean now is 'request' not 'session' UISaveState beanSaveState = new UISaveState(); ValueBinding binding = WFUtil.createValueBinding("#{"+ARTICLE_ITEM_BEAN_ID+"}"); beanSaveState.setId("articleItemBeanSaveState"); beanSaveState.setValueBinding("value",binding); mainContainer.add(beanSaveState); HtmlPanelGrid p = WFPanelUtil.getPlainFormPanel(2); //Language dropdown p.getChildren().add(WFUtil.group(localizer.getTextVB("language"), WFUtil.getText(":"))); UIComponent langDropdown = getLanguageDropdownMenu(); p.getChildren().add(langDropdown); p.getChildren().add(WFUtil.group(localizer.getTextVB("headline"), WFUtil.getText(":")));// p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "language"), WFUtil.getText(":"))); HtmlInputText headlineInput = WFUtil.getInputText(HEADLINE_ID, ref + "headline"); headlineInput.setSize(70); p.getChildren().add(headlineInput); //HtmlSelectOneMenu localeMenu = WFUtil.getSelectOneMenu(LOCALE_ID, ref + "allLocales", ref + "pendingLocaleId"); //localeMenu.setOnchange("document.forms[0].submit();"); //p.getChildren().add(localeMenu); p.getChildren().add(WFUtil.group(localizer.getTextVB("author"), WFUtil.getText(":"))); HtmlInputText authorInput = WFUtil.getInputText(AUTHOR_ID, ref + "author"); authorInput.setSize(70); User user = iwc.getCurrentUser(); if(user!=null){ String userName = user.getName(); getArticleItemBean().setAuthor(userName); } p.getChildren().add(authorInput); //Article body p.getChildren().add(WFUtil.group(localizer.getTextVB("body"), WFUtil.getText(":"))); HTMLArea bodyArea = WFUtil.getHtmlAreaTextArea(BODY_ID, ref + "body", "500px", "400px"); //HTMLArea bodyArea = WFUtil.getHtmlAreaTextArea(BODY_ID, ref + "body"); /*bodyArea.addPlugin(HTMLArea.PLUGIN_TABLE_OPERATIONS); bodyArea.addPlugin(HTMLArea.PLUGIN_DYNAMIC_CSS, "3"); bodyArea.addPlugin(HTMLArea.PLUGIN_CSS, "3"); bodyArea.addPlugin(HTMLArea.PLUGIN_CONTEXT_MENU); bodyArea.addPlugin(HTMLArea.PLUGIN_LIST_TYPE); bodyArea.addPlugin(HTMLArea.PLUGIN_CHARACTER_MAP); */ bodyArea.setAllowFontSelection(false); //bodyArea.addPlugin("TableOperations"); //bodyArea.addPlugin("Template"); //bodyArea.addPlugin("Forms"); //bodyArea.addPlugin("FormOperations"); //bodyArea.addPlugin("EditTag"); //bodyArea.addPlugin("Stylist"); //bodyArea.addPlugin("CSS"); //bodyArea.addPlugin("DynamicCSS"); //bodyArea.addPlugin("FullPage"); //bodyArea.addPlugin("NoteServer"); //bodyArea.addPlugin("QuickTag"); //bodyArea.addPlugin("InsertSmiley"); //bodyArea.addPlugin("InsertWords"); //bodyArea.addPlugin("ContextMenu"); //bodyArea.addPlugin("LangMarks"); //bodyArea.addPlugin("DoubleClick"); //bodyArea.addPlugin("ListType"); //bodyArea.addPlugin("ImageManager"); p.getChildren().add(WFUtil.group(bodyArea, WFUtil.getBreak())); p.getChildren().add(WFUtil.group(localizer.getTextVB("teaser"), WFUtil.getText(":"))); HtmlInputTextarea teaserArea = WFUtil.getTextArea(TEASER_ID, ref + "teaser", "500px", "60px"); p.getChildren().add(teaserArea); p.getChildren().add(WFUtil.group(localizer.getTextVB("source"), WFUtil.getText(":"))); HtmlInputText sourceArea = WFUtil.getInputText(SOURCE_ID, ref + "source"); sourceArea.setSize(70); p.getChildren().add(sourceArea); p.getChildren().add(WFUtil.getBreak()); p.getChildren().add(WFUtil.getBreak()); // p = WFPanelUtil.getPlainFormPanel(1);/* p.getChildren().add(WFUtil.group(WFUtil.getHeaderTextVB(bref + "created"), WFUtil.getTextVB(ref + "creationDate") ));*/// p.getChildren().add(WFUtil.getText(" "));// UIComponent t = WFUtil.group(localizer.getHeaderTextVB("status"), WFUtil.getText(": "));// t.getChildren().add(WFUtil.getTextVB(ref + "status"));// p.getChildren().add(t); p.getChildren().add(WFUtil.group(localizer.getTextVB("status"), WFUtil.getText(":"))); p.getChildren().add(WFUtil.getTextVB(ref + "status")); p.getChildren().add(WFUtil.group(localizer.getTextVB("current_version"), WFUtil.getText(":"))); p.getChildren().add(WFUtil.getTextVB(ref + "versionName")); p.getChildren().add(WFUtil.getBreak()); p.getChildren().add(WFUtil.getBreak()); // p = WFPanelUtil.getFormPanel(2); p.getChildren().add(WFUtil.group(localizer.getTextVB("comment"), WFUtil.getText(":")));// p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "attachments"), WFUtil.getText(":"))); HtmlInputTextarea commentArea = WFUtil.getTextArea(COMMENT_ID, ref + "comment", "500px", "60px"); p.getChildren().add(commentArea);// WFContainer attachmentContainer = new WFContainer();// attachmentContainer.add(WFUtil.getButtonVB(ADD_ATTACHMENT_ID, bref + "add_attachment", this));// attachmentContainer.add(WFUtil.getBreak());// attachmentContainer.add(getAttachmentList());// p.getChildren().add(attachmentContainer); // mainContainer.add(p); // p = WFPanelUtil.getFormPanel(1);// p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "related_content_items"), WFUtil.getText(":"))); // WFContainer contentItemContainer = new WFContainer(); // contentItemContainer.add(WFUtil.getButtonVB(ADD_RELATED_CONTENT_ITEM_ID, bref + "add_content_item", this));// contentItemContainer.add(WFUtil.getBreak());// contentItemContainer.add(getRelatedContentItemsList());// p.getChildren().add(contentItemContainer);// p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "publishing_date"), WFUtil.getText(":"))); // WFDateInput publishedFromInput = WFUtil.getDateInput(PUBLISHED_FROM_DATE_ID, ref + "case.publishedFromDate");// publishedFromInput.setShowTime(true);// p.getChildren().add(publishedFromInput);// p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "expiration_date"), WFUtil.getText(":"))); // WFDateInput publishedToInput = WFUtil.getDateInput(PUBLISHED_TO_DATE_ID, ref + "case.publishedToDate");// publishedToInput.setShowTime(true);// p.getChildren().add(publishedToInput); // mainContainer.add(p); p.getChildren().add(WFUtil.getBreak()); p.getChildren().add(WFUtil.getBreak());// mainContainer.add(WFUtil.getBreak());// p = WFPanelUtil.getPlainFormPanel(1);// HtmlCommandButton editCategoriesButton = WFUtil.getButtonVB(EDIT_CATEGORIES_ID, bref + "edit_categories", this);// p.getChildren().add(editCategoriesButton); //Temporary taking away folderr location/* p.getChildren().add(WFUtil.group(localizer.getTextVB("folder"), WFUtil.getText(":"))); HtmlInputText folderInput = WFUtil.getInputText(FOLDER_ID, ref + "folderLocation"); if(null==folderInput.getValue() || "".equals(folderInput.getValue())) { String FolderString = ArticleUtil.getArticleYearMonthPath();// System.out.println("Folder "+FolderString); folderInput.setValue(FolderString); } else { File file = new File(folderInput.getValue().toString()); folderInput.setValue(file.getParentFile().getParent()); } folderInput.setSize(70); p.getChildren().add(folderInput); */ p.getChildren().add(WFUtil.getBreak()); //Categories// WebDAVCategories categoriesUI = new WebDAVCategories(); //ArticleItemBean articleItemBean = (ArticleItemBean) getArticleItemBean(); //String resourcePath = articleItemBean.getArticleResourcePath(); addCategoryEditor(p); p.getChildren().add(WFUtil.getBreak()); p.getChildren().add(WFUtil.getBreak()); p.getChildren().add(WFUtil.getBreak());// WFComponentSelector cs = new WFComponentSelector();// cs.setId(BUTTON_SELECTOR_ID);// cs.setDividerText(" "); HtmlCommandButton saveButton = localizer.getButtonVB(SAVE_ID, "save", this);// HtmlCommandButton saveButton = WFUtil.getButtonVB(SAVE_ID, WFPage.CONTENT_BUNDLE + "save", this);// cs.add(saveButton);// cs.add(WFUtil.getButtonVB(FOR_REVIEW_ID, bref + "for_review", this));// cs.add(WFUtil.getButtonVB(PUBLISH_ID, bref + "publish", this));// cs.add(WFUtil.getButtonVB(REWRITE_ID, bref + "rewrite", this));// cs.add(WFUtil.getButtonVB(REJECT_ID, bref + "reject", this));// cs.add(WFUtil.getButtonVB(DELETE_ID, bref + "delete", this));// cs.add(WFUtil.getButtonVB(CANCEL_ID, bref + "cancel", this));// cs.setSelectedId(CANCEL_ID, true);// p.getChildren().add(cs); p.getChildren().add(saveButton); mainContainer.add(p); //WFComponentSelector editorSelector = new WFComponentSelector(); //editorSelector.setId(EDITOR_SELECTOR_ID); //editorSelector.add(mainContainer); //editorSelector.add(getCategoryEditContainer());// FileUploadForm f = new FileUploadForm(this, FILE_UPLOAD_ID, FILE_UPLOAD_CANCEL_ID); //editorSelector.add(getRelatedContentItemsContainer()); //editorSelector.setSelectedId(ARTICLE_EDITOR_ID, true); //return editorSelector; return mainContainer; } | 57000 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57000/5db26355cf68616cbd8859fa37cd6aa73d783808/EditArticleView.java/buggy/src/java/com/idega/block/article/component/EditArticleView.java |
||
public UIComponent getEditContainer() { IWContext iwc = IWContext.getInstance(); WFResourceUtil localizer = WFResourceUtil.getResourceUtilArticle();// String bref = WFPage.CONTENT_BUNDLE + "."; WFContainer mainContainer = new WFContainer(); mainContainer.setId(ARTICLE_EDITOR_ID); WFErrorMessages em = new WFErrorMessages(); em.addErrorMessage(HEADLINE_ID); em.addErrorMessage(TEASER_ID);// em.addErrorMessage(PUBLISHED_FROM_DATE_ID);// em.addErrorMessage(PUBLISHED_TO_DATE_ID); em.addErrorMessage(SAVE_ID); mainContainer.add(em); //Saving the state of the articleItemBean specially because the scpoe //of this bean now is 'request' not 'session' UISaveState beanSaveState = new UISaveState(); ValueBinding binding = WFUtil.createValueBinding("#{"+ARTICLE_ITEM_BEAN_ID+"}"); beanSaveState.setId("articleItemBeanSaveState"); beanSaveState.setValueBinding("value",binding); mainContainer.add(beanSaveState); HtmlPanelGrid p = WFPanelUtil.getPlainFormPanel(2); //Language dropdown p.getChildren().add(WFUtil.group(localizer.getTextVB("language"), WFUtil.getText(":"))); UIComponent langDropdown = getLanguageDropdownMenu(); p.getChildren().add(langDropdown); p.getChildren().add(WFUtil.group(localizer.getTextVB("headline"), WFUtil.getText(":")));// p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "language"), WFUtil.getText(":"))); HtmlInputText headlineInput = WFUtil.getInputText(HEADLINE_ID, ref + "headline"); headlineInput.setSize(70); p.getChildren().add(headlineInput); //HtmlSelectOneMenu localeMenu = WFUtil.getSelectOneMenu(LOCALE_ID, ref + "allLocales", ref + "pendingLocaleId"); //localeMenu.setOnchange("document.forms[0].submit();"); //p.getChildren().add(localeMenu); p.getChildren().add(WFUtil.group(localizer.getTextVB("author"), WFUtil.getText(":"))); HtmlInputText authorInput = WFUtil.getInputText(AUTHOR_ID, ref + "author"); authorInput.setSize(70); User user = iwc.getCurrentUser(); if(user!=null){ String userName = user.getName(); getArticleItemBean().setAuthor(userName); } p.getChildren().add(authorInput); //Article body p.getChildren().add(WFUtil.group(localizer.getTextVB("body"), WFUtil.getText(":"))); HTMLArea bodyArea = WFUtil.getHtmlAreaTextArea(BODY_ID, ref + "body", "500px", "400px"); //HTMLArea bodyArea = WFUtil.getHtmlAreaTextArea(BODY_ID, ref + "body"); /*bodyArea.addPlugin(HTMLArea.PLUGIN_TABLE_OPERATIONS); bodyArea.addPlugin(HTMLArea.PLUGIN_DYNAMIC_CSS, "3"); bodyArea.addPlugin(HTMLArea.PLUGIN_CSS, "3"); bodyArea.addPlugin(HTMLArea.PLUGIN_CONTEXT_MENU); bodyArea.addPlugin(HTMLArea.PLUGIN_LIST_TYPE); bodyArea.addPlugin(HTMLArea.PLUGIN_CHARACTER_MAP); */ bodyArea.setAllowFontSelection(false); //bodyArea.addPlugin("TableOperations"); //bodyArea.addPlugin("Template"); //bodyArea.addPlugin("Forms"); //bodyArea.addPlugin("FormOperations"); //bodyArea.addPlugin("EditTag"); //bodyArea.addPlugin("Stylist"); //bodyArea.addPlugin("CSS"); //bodyArea.addPlugin("DynamicCSS"); //bodyArea.addPlugin("FullPage"); //bodyArea.addPlugin("NoteServer"); //bodyArea.addPlugin("QuickTag"); //bodyArea.addPlugin("InsertSmiley"); //bodyArea.addPlugin("InsertWords"); //bodyArea.addPlugin("ContextMenu"); //bodyArea.addPlugin("LangMarks"); //bodyArea.addPlugin("DoubleClick"); //bodyArea.addPlugin("ListType"); //bodyArea.addPlugin("ImageManager"); p.getChildren().add(WFUtil.group(bodyArea, WFUtil.getBreak())); p.getChildren().add(WFUtil.group(localizer.getTextVB("teaser"), WFUtil.getText(":"))); HtmlInputTextarea teaserArea = WFUtil.getTextArea(TEASER_ID, ref + "teaser", "500px", "60px"); p.getChildren().add(teaserArea); p.getChildren().add(WFUtil.group(localizer.getTextVB("source"), WFUtil.getText(":"))); HtmlInputText sourceArea = WFUtil.getInputText(SOURCE_ID, ref + "source"); sourceArea.setSize(70); p.getChildren().add(sourceArea); p.getChildren().add(WFUtil.getBreak()); p.getChildren().add(WFUtil.getBreak()); // p = WFPanelUtil.getPlainFormPanel(1);/* p.getChildren().add(WFUtil.group(WFUtil.getHeaderTextVB(bref + "created"), WFUtil.getTextVB(ref + "creationDate") ));*/// p.getChildren().add(WFUtil.getText(" "));// UIComponent t = WFUtil.group(localizer.getHeaderTextVB("status"), WFUtil.getText(": "));// t.getChildren().add(WFUtil.getTextVB(ref + "status"));// p.getChildren().add(t); p.getChildren().add(WFUtil.group(localizer.getTextVB("status"), WFUtil.getText(":"))); p.getChildren().add(WFUtil.getTextVB(ref + "status")); p.getChildren().add(WFUtil.group(localizer.getTextVB("current_version"), WFUtil.getText(":"))); p.getChildren().add(WFUtil.getTextVB(ref + "versionName")); p.getChildren().add(WFUtil.getBreak()); p.getChildren().add(WFUtil.getBreak()); // p = WFPanelUtil.getFormPanel(2); p.getChildren().add(WFUtil.group(localizer.getTextVB("comment"), WFUtil.getText(":")));// p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "attachments"), WFUtil.getText(":"))); HtmlInputTextarea commentArea = WFUtil.getTextArea(COMMENT_ID, ref + "comment", "500px", "60px"); p.getChildren().add(commentArea);// WFContainer attachmentContainer = new WFContainer();// attachmentContainer.add(WFUtil.getButtonVB(ADD_ATTACHMENT_ID, bref + "add_attachment", this));// attachmentContainer.add(WFUtil.getBreak());// attachmentContainer.add(getAttachmentList());// p.getChildren().add(attachmentContainer); // mainContainer.add(p); // p = WFPanelUtil.getFormPanel(1);// p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "related_content_items"), WFUtil.getText(":"))); // WFContainer contentItemContainer = new WFContainer(); // contentItemContainer.add(WFUtil.getButtonVB(ADD_RELATED_CONTENT_ITEM_ID, bref + "add_content_item", this));// contentItemContainer.add(WFUtil.getBreak());// contentItemContainer.add(getRelatedContentItemsList());// p.getChildren().add(contentItemContainer);// p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "publishing_date"), WFUtil.getText(":"))); // WFDateInput publishedFromInput = WFUtil.getDateInput(PUBLISHED_FROM_DATE_ID, ref + "case.publishedFromDate");// publishedFromInput.setShowTime(true);// p.getChildren().add(publishedFromInput);// p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "expiration_date"), WFUtil.getText(":"))); // WFDateInput publishedToInput = WFUtil.getDateInput(PUBLISHED_TO_DATE_ID, ref + "case.publishedToDate");// publishedToInput.setShowTime(true);// p.getChildren().add(publishedToInput); // mainContainer.add(p); p.getChildren().add(WFUtil.getBreak()); p.getChildren().add(WFUtil.getBreak());// mainContainer.add(WFUtil.getBreak());// p = WFPanelUtil.getPlainFormPanel(1);// HtmlCommandButton editCategoriesButton = WFUtil.getButtonVB(EDIT_CATEGORIES_ID, bref + "edit_categories", this);// p.getChildren().add(editCategoriesButton); //Temporary taking away folderr location/* p.getChildren().add(WFUtil.group(localizer.getTextVB("folder"), WFUtil.getText(":"))); HtmlInputText folderInput = WFUtil.getInputText(FOLDER_ID, ref + "folderLocation"); if(null==folderInput.getValue() || "".equals(folderInput.getValue())) { String FolderString = ArticleUtil.getArticleYearMonthPath();// System.out.println("Folder "+FolderString); folderInput.setValue(FolderString); } else { File file = new File(folderInput.getValue().toString()); folderInput.setValue(file.getParentFile().getParent()); } folderInput.setSize(70); p.getChildren().add(folderInput); */ p.getChildren().add(WFUtil.getBreak()); //Categories// WebDAVCategories categoriesUI = new WebDAVCategories(); //ArticleItemBean articleItemBean = (ArticleItemBean) getArticleItemBean(); //String resourcePath = articleItemBean.getArticleResourcePath(); addCategoryEditor(p); p.getChildren().add(WFUtil.getBreak()); p.getChildren().add(WFUtil.getBreak()); p.getChildren().add(WFUtil.getBreak());// WFComponentSelector cs = new WFComponentSelector();// cs.setId(BUTTON_SELECTOR_ID);// cs.setDividerText(" "); HtmlCommandButton saveButton = localizer.getButtonVB(SAVE_ID, "save", this);// HtmlCommandButton saveButton = WFUtil.getButtonVB(SAVE_ID, WFPage.CONTENT_BUNDLE + "save", this);// cs.add(saveButton);// cs.add(WFUtil.getButtonVB(FOR_REVIEW_ID, bref + "for_review", this));// cs.add(WFUtil.getButtonVB(PUBLISH_ID, bref + "publish", this));// cs.add(WFUtil.getButtonVB(REWRITE_ID, bref + "rewrite", this));// cs.add(WFUtil.getButtonVB(REJECT_ID, bref + "reject", this));// cs.add(WFUtil.getButtonVB(DELETE_ID, bref + "delete", this));// cs.add(WFUtil.getButtonVB(CANCEL_ID, bref + "cancel", this));// cs.setSelectedId(CANCEL_ID, true);// p.getChildren().add(cs); p.getChildren().add(saveButton); mainContainer.add(p); //WFComponentSelector editorSelector = new WFComponentSelector(); //editorSelector.setId(EDITOR_SELECTOR_ID); //editorSelector.add(mainContainer); //editorSelector.add(getCategoryEditContainer());// FileUploadForm f = new FileUploadForm(this, FILE_UPLOAD_ID, FILE_UPLOAD_CANCEL_ID); //editorSelector.add(getRelatedContentItemsContainer()); //editorSelector.setSelectedId(ARTICLE_EDITOR_ID, true); //return editorSelector; return mainContainer; } | 57000 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57000/5db26355cf68616cbd8859fa37cd6aa73d783808/EditArticleView.java/buggy/src/java/com/idega/block/article/component/EditArticleView.java |
||
public UIComponent getEditContainer() { IWContext iwc = IWContext.getInstance(); WFResourceUtil localizer = WFResourceUtil.getResourceUtilArticle();// String bref = WFPage.CONTENT_BUNDLE + "."; WFContainer mainContainer = new WFContainer(); mainContainer.setId(ARTICLE_EDITOR_ID); WFErrorMessages em = new WFErrorMessages(); em.addErrorMessage(HEADLINE_ID); em.addErrorMessage(TEASER_ID);// em.addErrorMessage(PUBLISHED_FROM_DATE_ID);// em.addErrorMessage(PUBLISHED_TO_DATE_ID); em.addErrorMessage(SAVE_ID); mainContainer.add(em); //Saving the state of the articleItemBean specially because the scpoe //of this bean now is 'request' not 'session' UISaveState beanSaveState = new UISaveState(); ValueBinding binding = WFUtil.createValueBinding("#{"+ARTICLE_ITEM_BEAN_ID+"}"); beanSaveState.setId("articleItemBeanSaveState"); beanSaveState.setValueBinding("value",binding); mainContainer.add(beanSaveState); HtmlPanelGrid p = WFPanelUtil.getPlainFormPanel(2); //Language dropdown p.getChildren().add(WFUtil.group(localizer.getTextVB("language"), WFUtil.getText(":"))); UIComponent langDropdown = getLanguageDropdownMenu(); p.getChildren().add(langDropdown); p.getChildren().add(WFUtil.group(localizer.getTextVB("headline"), WFUtil.getText(":")));// p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "language"), WFUtil.getText(":"))); HtmlInputText headlineInput = WFUtil.getInputText(HEADLINE_ID, ref + "headline"); headlineInput.setSize(70); p.getChildren().add(headlineInput); //HtmlSelectOneMenu localeMenu = WFUtil.getSelectOneMenu(LOCALE_ID, ref + "allLocales", ref + "pendingLocaleId"); //localeMenu.setOnchange("document.forms[0].submit();"); //p.getChildren().add(localeMenu); p.getChildren().add(WFUtil.group(localizer.getTextVB("author"), WFUtil.getText(":"))); HtmlInputText authorInput = WFUtil.getInputText(AUTHOR_ID, ref + "author"); authorInput.setSize(70); User user = iwc.getCurrentUser(); if(user!=null){ String userName = user.getName(); getArticleItemBean().setAuthor(userName); } p.getChildren().add(authorInput); //Article body p.getChildren().add(WFUtil.group(localizer.getTextVB("body"), WFUtil.getText(":"))); HTMLArea bodyArea = WFUtil.getHtmlAreaTextArea(BODY_ID, ref + "body", "500px", "400px"); //HTMLArea bodyArea = WFUtil.getHtmlAreaTextArea(BODY_ID, ref + "body"); /*bodyArea.addPlugin(HTMLArea.PLUGIN_TABLE_OPERATIONS); bodyArea.addPlugin(HTMLArea.PLUGIN_DYNAMIC_CSS, "3"); bodyArea.addPlugin(HTMLArea.PLUGIN_CSS, "3"); bodyArea.addPlugin(HTMLArea.PLUGIN_CONTEXT_MENU); bodyArea.addPlugin(HTMLArea.PLUGIN_LIST_TYPE); bodyArea.addPlugin(HTMLArea.PLUGIN_CHARACTER_MAP); */ bodyArea.setAllowFontSelection(false); //bodyArea.addPlugin("TableOperations"); //bodyArea.addPlugin("Template"); //bodyArea.addPlugin("Forms"); //bodyArea.addPlugin("FormOperations"); //bodyArea.addPlugin("EditTag"); //bodyArea.addPlugin("Stylist"); //bodyArea.addPlugin("CSS"); //bodyArea.addPlugin("DynamicCSS"); //bodyArea.addPlugin("FullPage"); //bodyArea.addPlugin("NoteServer"); //bodyArea.addPlugin("QuickTag"); //bodyArea.addPlugin("InsertSmiley"); //bodyArea.addPlugin("InsertWords"); //bodyArea.addPlugin("ContextMenu"); //bodyArea.addPlugin("LangMarks"); //bodyArea.addPlugin("DoubleClick"); //bodyArea.addPlugin("ListType"); //bodyArea.addPlugin("ImageManager"); p.getChildren().add(WFUtil.group(bodyArea, WFUtil.getBreak())); p.getChildren().add(WFUtil.group(localizer.getTextVB("teaser"), WFUtil.getText(":"))); HtmlInputTextarea teaserArea = WFUtil.getTextArea(TEASER_ID, ref + "teaser", "500px", "60px"); p.getChildren().add(teaserArea); p.getChildren().add(WFUtil.group(localizer.getTextVB("source"), WFUtil.getText(":"))); HtmlInputText sourceArea = WFUtil.getInputText(SOURCE_ID, ref + "source"); sourceArea.setSize(70); p.getChildren().add(sourceArea); p.getChildren().add(WFUtil.getBreak()); p.getChildren().add(WFUtil.getBreak()); // p = WFPanelUtil.getPlainFormPanel(1);/* p.getChildren().add(WFUtil.group(WFUtil.getHeaderTextVB(bref + "created"), WFUtil.getTextVB(ref + "creationDate") ));*/// p.getChildren().add(WFUtil.getText(" "));// UIComponent t = WFUtil.group(localizer.getHeaderTextVB("status"), WFUtil.getText(": "));// t.getChildren().add(WFUtil.getTextVB(ref + "status"));// p.getChildren().add(t); p.getChildren().add(WFUtil.group(localizer.getTextVB("status"), WFUtil.getText(":"))); p.getChildren().add(WFUtil.getTextVB(ref + "status")); p.getChildren().add(WFUtil.group(localizer.getTextVB("current_version"), WFUtil.getText(":"))); p.getChildren().add(WFUtil.getTextVB(ref + "versionName")); p.getChildren().add(WFUtil.getBreak()); p.getChildren().add(WFUtil.getBreak()); // p = WFPanelUtil.getFormPanel(2); p.getChildren().add(WFUtil.group(localizer.getTextVB("comment"), WFUtil.getText(":")));// p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "attachments"), WFUtil.getText(":"))); HtmlInputTextarea commentArea = WFUtil.getTextArea(COMMENT_ID, ref + "comment", "500px", "60px"); p.getChildren().add(commentArea);// WFContainer attachmentContainer = new WFContainer();// attachmentContainer.add(WFUtil.getButtonVB(ADD_ATTACHMENT_ID, bref + "add_attachment", this));// attachmentContainer.add(WFUtil.getBreak());// attachmentContainer.add(getAttachmentList());// p.getChildren().add(attachmentContainer); // mainContainer.add(p); // p = WFPanelUtil.getFormPanel(1);// p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "related_content_items"), WFUtil.getText(":"))); // WFContainer contentItemContainer = new WFContainer(); // contentItemContainer.add(WFUtil.getButtonVB(ADD_RELATED_CONTENT_ITEM_ID, bref + "add_content_item", this));// contentItemContainer.add(WFUtil.getBreak());// contentItemContainer.add(getRelatedContentItemsList());// p.getChildren().add(contentItemContainer);// p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "publishing_date"), WFUtil.getText(":"))); // WFDateInput publishedFromInput = WFUtil.getDateInput(PUBLISHED_FROM_DATE_ID, ref + "case.publishedFromDate");// publishedFromInput.setShowTime(true);// p.getChildren().add(publishedFromInput);// p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "expiration_date"), WFUtil.getText(":"))); // WFDateInput publishedToInput = WFUtil.getDateInput(PUBLISHED_TO_DATE_ID, ref + "case.publishedToDate");// publishedToInput.setShowTime(true);// p.getChildren().add(publishedToInput); // mainContainer.add(p); p.getChildren().add(WFUtil.getBreak()); p.getChildren().add(WFUtil.getBreak());// mainContainer.add(WFUtil.getBreak());// p = WFPanelUtil.getPlainFormPanel(1);// HtmlCommandButton editCategoriesButton = WFUtil.getButtonVB(EDIT_CATEGORIES_ID, bref + "edit_categories", this);// p.getChildren().add(editCategoriesButton); //Temporary taking away folderr location/* p.getChildren().add(WFUtil.group(localizer.getTextVB("folder"), WFUtil.getText(":"))); HtmlInputText folderInput = WFUtil.getInputText(FOLDER_ID, ref + "folderLocation"); if(null==folderInput.getValue() || "".equals(folderInput.getValue())) { String FolderString = ArticleUtil.getArticleYearMonthPath();// System.out.println("Folder "+FolderString); folderInput.setValue(FolderString); } else { File file = new File(folderInput.getValue().toString()); folderInput.setValue(file.getParentFile().getParent()); } folderInput.setSize(70); p.getChildren().add(folderInput); */ p.getChildren().add(WFUtil.getBreak()); //Categories// WebDAVCategories categoriesUI = new WebDAVCategories(); //ArticleItemBean articleItemBean = (ArticleItemBean) getArticleItemBean(); //String resourcePath = articleItemBean.getArticleResourcePath(); addCategoryEditor(p); p.getChildren().add(WFUtil.getBreak()); p.getChildren().add(WFUtil.getBreak()); p.getChildren().add(WFUtil.getBreak());// WFComponentSelector cs = new WFComponentSelector();// cs.setId(BUTTON_SELECTOR_ID);// cs.setDividerText(" "); HtmlCommandButton saveButton = localizer.getButtonVB(SAVE_ID, "save", this);// HtmlCommandButton saveButton = WFUtil.getButtonVB(SAVE_ID, WFPage.CONTENT_BUNDLE + "save", this);// cs.add(saveButton);// cs.add(WFUtil.getButtonVB(FOR_REVIEW_ID, bref + "for_review", this));// cs.add(WFUtil.getButtonVB(PUBLISH_ID, bref + "publish", this));// cs.add(WFUtil.getButtonVB(REWRITE_ID, bref + "rewrite", this));// cs.add(WFUtil.getButtonVB(REJECT_ID, bref + "reject", this));// cs.add(WFUtil.getButtonVB(DELETE_ID, bref + "delete", this));// cs.add(WFUtil.getButtonVB(CANCEL_ID, bref + "cancel", this));// cs.setSelectedId(CANCEL_ID, true);// p.getChildren().add(cs); p.getChildren().add(saveButton); mainContainer.add(p); //WFComponentSelector editorSelector = new WFComponentSelector(); //editorSelector.setId(EDITOR_SELECTOR_ID); //editorSelector.add(mainContainer); //editorSelector.add(getCategoryEditContainer());// FileUploadForm f = new FileUploadForm(this, FILE_UPLOAD_ID, FILE_UPLOAD_CANCEL_ID); //editorSelector.add(getRelatedContentItemsContainer()); //editorSelector.setSelectedId(ARTICLE_EDITOR_ID, true); //return editorSelector; return mainContainer; } | 57000 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57000/5db26355cf68616cbd8859fa37cd6aa73d783808/EditArticleView.java/buggy/src/java/com/idega/block/article/component/EditArticleView.java |
||
p.getChildren().add(WFUtil.getBreak()); p.getChildren().add(WFUtil.getBreak()); | public UIComponent getEditContainer() { IWContext iwc = IWContext.getInstance(); WFResourceUtil localizer = WFResourceUtil.getResourceUtilArticle();// String bref = WFPage.CONTENT_BUNDLE + "."; WFContainer mainContainer = new WFContainer(); mainContainer.setId(ARTICLE_EDITOR_ID); WFErrorMessages em = new WFErrorMessages(); em.addErrorMessage(HEADLINE_ID); em.addErrorMessage(TEASER_ID);// em.addErrorMessage(PUBLISHED_FROM_DATE_ID);// em.addErrorMessage(PUBLISHED_TO_DATE_ID); em.addErrorMessage(SAVE_ID); mainContainer.add(em); //Saving the state of the articleItemBean specially because the scpoe //of this bean now is 'request' not 'session' UISaveState beanSaveState = new UISaveState(); ValueBinding binding = WFUtil.createValueBinding("#{"+ARTICLE_ITEM_BEAN_ID+"}"); beanSaveState.setId("articleItemBeanSaveState"); beanSaveState.setValueBinding("value",binding); mainContainer.add(beanSaveState); HtmlPanelGrid p = WFPanelUtil.getPlainFormPanel(2); //Language dropdown p.getChildren().add(WFUtil.group(localizer.getTextVB("language"), WFUtil.getText(":"))); UIComponent langDropdown = getLanguageDropdownMenu(); p.getChildren().add(langDropdown); p.getChildren().add(WFUtil.group(localizer.getTextVB("headline"), WFUtil.getText(":")));// p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "language"), WFUtil.getText(":"))); HtmlInputText headlineInput = WFUtil.getInputText(HEADLINE_ID, ref + "headline"); headlineInput.setSize(70); p.getChildren().add(headlineInput); //HtmlSelectOneMenu localeMenu = WFUtil.getSelectOneMenu(LOCALE_ID, ref + "allLocales", ref + "pendingLocaleId"); //localeMenu.setOnchange("document.forms[0].submit();"); //p.getChildren().add(localeMenu); p.getChildren().add(WFUtil.group(localizer.getTextVB("author"), WFUtil.getText(":"))); HtmlInputText authorInput = WFUtil.getInputText(AUTHOR_ID, ref + "author"); authorInput.setSize(70); User user = iwc.getCurrentUser(); if(user!=null){ String userName = user.getName(); getArticleItemBean().setAuthor(userName); } p.getChildren().add(authorInput); //Article body p.getChildren().add(WFUtil.group(localizer.getTextVB("body"), WFUtil.getText(":"))); HTMLArea bodyArea = WFUtil.getHtmlAreaTextArea(BODY_ID, ref + "body", "500px", "400px"); //HTMLArea bodyArea = WFUtil.getHtmlAreaTextArea(BODY_ID, ref + "body"); /*bodyArea.addPlugin(HTMLArea.PLUGIN_TABLE_OPERATIONS); bodyArea.addPlugin(HTMLArea.PLUGIN_DYNAMIC_CSS, "3"); bodyArea.addPlugin(HTMLArea.PLUGIN_CSS, "3"); bodyArea.addPlugin(HTMLArea.PLUGIN_CONTEXT_MENU); bodyArea.addPlugin(HTMLArea.PLUGIN_LIST_TYPE); bodyArea.addPlugin(HTMLArea.PLUGIN_CHARACTER_MAP); */ bodyArea.setAllowFontSelection(false); //bodyArea.addPlugin("TableOperations"); //bodyArea.addPlugin("Template"); //bodyArea.addPlugin("Forms"); //bodyArea.addPlugin("FormOperations"); //bodyArea.addPlugin("EditTag"); //bodyArea.addPlugin("Stylist"); //bodyArea.addPlugin("CSS"); //bodyArea.addPlugin("DynamicCSS"); //bodyArea.addPlugin("FullPage"); //bodyArea.addPlugin("NoteServer"); //bodyArea.addPlugin("QuickTag"); //bodyArea.addPlugin("InsertSmiley"); //bodyArea.addPlugin("InsertWords"); //bodyArea.addPlugin("ContextMenu"); //bodyArea.addPlugin("LangMarks"); //bodyArea.addPlugin("DoubleClick"); //bodyArea.addPlugin("ListType"); //bodyArea.addPlugin("ImageManager"); p.getChildren().add(WFUtil.group(bodyArea, WFUtil.getBreak())); p.getChildren().add(WFUtil.group(localizer.getTextVB("teaser"), WFUtil.getText(":"))); HtmlInputTextarea teaserArea = WFUtil.getTextArea(TEASER_ID, ref + "teaser", "500px", "60px"); p.getChildren().add(teaserArea); p.getChildren().add(WFUtil.group(localizer.getTextVB("source"), WFUtil.getText(":"))); HtmlInputText sourceArea = WFUtil.getInputText(SOURCE_ID, ref + "source"); sourceArea.setSize(70); p.getChildren().add(sourceArea); p.getChildren().add(WFUtil.getBreak()); p.getChildren().add(WFUtil.getBreak()); // p = WFPanelUtil.getPlainFormPanel(1);/* p.getChildren().add(WFUtil.group(WFUtil.getHeaderTextVB(bref + "created"), WFUtil.getTextVB(ref + "creationDate") ));*/// p.getChildren().add(WFUtil.getText(" "));// UIComponent t = WFUtil.group(localizer.getHeaderTextVB("status"), WFUtil.getText(": "));// t.getChildren().add(WFUtil.getTextVB(ref + "status"));// p.getChildren().add(t); p.getChildren().add(WFUtil.group(localizer.getTextVB("status"), WFUtil.getText(":"))); p.getChildren().add(WFUtil.getTextVB(ref + "status")); p.getChildren().add(WFUtil.group(localizer.getTextVB("current_version"), WFUtil.getText(":"))); p.getChildren().add(WFUtil.getTextVB(ref + "versionName")); p.getChildren().add(WFUtil.getBreak()); p.getChildren().add(WFUtil.getBreak()); // p = WFPanelUtil.getFormPanel(2); p.getChildren().add(WFUtil.group(localizer.getTextVB("comment"), WFUtil.getText(":")));// p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "attachments"), WFUtil.getText(":"))); HtmlInputTextarea commentArea = WFUtil.getTextArea(COMMENT_ID, ref + "comment", "500px", "60px"); p.getChildren().add(commentArea);// WFContainer attachmentContainer = new WFContainer();// attachmentContainer.add(WFUtil.getButtonVB(ADD_ATTACHMENT_ID, bref + "add_attachment", this));// attachmentContainer.add(WFUtil.getBreak());// attachmentContainer.add(getAttachmentList());// p.getChildren().add(attachmentContainer); // mainContainer.add(p); // p = WFPanelUtil.getFormPanel(1);// p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "related_content_items"), WFUtil.getText(":"))); // WFContainer contentItemContainer = new WFContainer(); // contentItemContainer.add(WFUtil.getButtonVB(ADD_RELATED_CONTENT_ITEM_ID, bref + "add_content_item", this));// contentItemContainer.add(WFUtil.getBreak());// contentItemContainer.add(getRelatedContentItemsList());// p.getChildren().add(contentItemContainer);// p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "publishing_date"), WFUtil.getText(":"))); // WFDateInput publishedFromInput = WFUtil.getDateInput(PUBLISHED_FROM_DATE_ID, ref + "case.publishedFromDate");// publishedFromInput.setShowTime(true);// p.getChildren().add(publishedFromInput);// p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "expiration_date"), WFUtil.getText(":"))); // WFDateInput publishedToInput = WFUtil.getDateInput(PUBLISHED_TO_DATE_ID, ref + "case.publishedToDate");// publishedToInput.setShowTime(true);// p.getChildren().add(publishedToInput); // mainContainer.add(p); p.getChildren().add(WFUtil.getBreak()); p.getChildren().add(WFUtil.getBreak());// mainContainer.add(WFUtil.getBreak());// p = WFPanelUtil.getPlainFormPanel(1);// HtmlCommandButton editCategoriesButton = WFUtil.getButtonVB(EDIT_CATEGORIES_ID, bref + "edit_categories", this);// p.getChildren().add(editCategoriesButton); //Temporary taking away folderr location/* p.getChildren().add(WFUtil.group(localizer.getTextVB("folder"), WFUtil.getText(":"))); HtmlInputText folderInput = WFUtil.getInputText(FOLDER_ID, ref + "folderLocation"); if(null==folderInput.getValue() || "".equals(folderInput.getValue())) { String FolderString = ArticleUtil.getArticleYearMonthPath();// System.out.println("Folder "+FolderString); folderInput.setValue(FolderString); } else { File file = new File(folderInput.getValue().toString()); folderInput.setValue(file.getParentFile().getParent()); } folderInput.setSize(70); p.getChildren().add(folderInput); */ p.getChildren().add(WFUtil.getBreak()); //Categories// WebDAVCategories categoriesUI = new WebDAVCategories(); //ArticleItemBean articleItemBean = (ArticleItemBean) getArticleItemBean(); //String resourcePath = articleItemBean.getArticleResourcePath(); addCategoryEditor(p); p.getChildren().add(WFUtil.getBreak()); p.getChildren().add(WFUtil.getBreak()); p.getChildren().add(WFUtil.getBreak());// WFComponentSelector cs = new WFComponentSelector();// cs.setId(BUTTON_SELECTOR_ID);// cs.setDividerText(" "); HtmlCommandButton saveButton = localizer.getButtonVB(SAVE_ID, "save", this);// HtmlCommandButton saveButton = WFUtil.getButtonVB(SAVE_ID, WFPage.CONTENT_BUNDLE + "save", this);// cs.add(saveButton);// cs.add(WFUtil.getButtonVB(FOR_REVIEW_ID, bref + "for_review", this));// cs.add(WFUtil.getButtonVB(PUBLISH_ID, bref + "publish", this));// cs.add(WFUtil.getButtonVB(REWRITE_ID, bref + "rewrite", this));// cs.add(WFUtil.getButtonVB(REJECT_ID, bref + "reject", this));// cs.add(WFUtil.getButtonVB(DELETE_ID, bref + "delete", this));// cs.add(WFUtil.getButtonVB(CANCEL_ID, bref + "cancel", this));// cs.setSelectedId(CANCEL_ID, true);// p.getChildren().add(cs); p.getChildren().add(saveButton); mainContainer.add(p); //WFComponentSelector editorSelector = new WFComponentSelector(); //editorSelector.setId(EDITOR_SELECTOR_ID); //editorSelector.add(mainContainer); //editorSelector.add(getCategoryEditContainer());// FileUploadForm f = new FileUploadForm(this, FILE_UPLOAD_ID, FILE_UPLOAD_CANCEL_ID); //editorSelector.add(getRelatedContentItemsContainer()); //editorSelector.setSelectedId(ARTICLE_EDITOR_ID, true); //return editorSelector; return mainContainer; } | 57000 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57000/5db26355cf68616cbd8859fa37cd6aa73d783808/EditArticleView.java/buggy/src/java/com/idega/block/article/component/EditArticleView.java |
|
public UIComponent getEditContainer() { IWContext iwc = IWContext.getInstance(); WFResourceUtil localizer = WFResourceUtil.getResourceUtilArticle();// String bref = WFPage.CONTENT_BUNDLE + "."; WFContainer mainContainer = new WFContainer(); mainContainer.setId(ARTICLE_EDITOR_ID); WFErrorMessages em = new WFErrorMessages(); em.addErrorMessage(HEADLINE_ID); em.addErrorMessage(TEASER_ID);// em.addErrorMessage(PUBLISHED_FROM_DATE_ID);// em.addErrorMessage(PUBLISHED_TO_DATE_ID); em.addErrorMessage(SAVE_ID); mainContainer.add(em); //Saving the state of the articleItemBean specially because the scpoe //of this bean now is 'request' not 'session' UISaveState beanSaveState = new UISaveState(); ValueBinding binding = WFUtil.createValueBinding("#{"+ARTICLE_ITEM_BEAN_ID+"}"); beanSaveState.setId("articleItemBeanSaveState"); beanSaveState.setValueBinding("value",binding); mainContainer.add(beanSaveState); HtmlPanelGrid p = WFPanelUtil.getPlainFormPanel(2); //Language dropdown p.getChildren().add(WFUtil.group(localizer.getTextVB("language"), WFUtil.getText(":"))); UIComponent langDropdown = getLanguageDropdownMenu(); p.getChildren().add(langDropdown); p.getChildren().add(WFUtil.group(localizer.getTextVB("headline"), WFUtil.getText(":")));// p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "language"), WFUtil.getText(":"))); HtmlInputText headlineInput = WFUtil.getInputText(HEADLINE_ID, ref + "headline"); headlineInput.setSize(70); p.getChildren().add(headlineInput); //HtmlSelectOneMenu localeMenu = WFUtil.getSelectOneMenu(LOCALE_ID, ref + "allLocales", ref + "pendingLocaleId"); //localeMenu.setOnchange("document.forms[0].submit();"); //p.getChildren().add(localeMenu); p.getChildren().add(WFUtil.group(localizer.getTextVB("author"), WFUtil.getText(":"))); HtmlInputText authorInput = WFUtil.getInputText(AUTHOR_ID, ref + "author"); authorInput.setSize(70); User user = iwc.getCurrentUser(); if(user!=null){ String userName = user.getName(); getArticleItemBean().setAuthor(userName); } p.getChildren().add(authorInput); //Article body p.getChildren().add(WFUtil.group(localizer.getTextVB("body"), WFUtil.getText(":"))); HTMLArea bodyArea = WFUtil.getHtmlAreaTextArea(BODY_ID, ref + "body", "500px", "400px"); //HTMLArea bodyArea = WFUtil.getHtmlAreaTextArea(BODY_ID, ref + "body"); /*bodyArea.addPlugin(HTMLArea.PLUGIN_TABLE_OPERATIONS); bodyArea.addPlugin(HTMLArea.PLUGIN_DYNAMIC_CSS, "3"); bodyArea.addPlugin(HTMLArea.PLUGIN_CSS, "3"); bodyArea.addPlugin(HTMLArea.PLUGIN_CONTEXT_MENU); bodyArea.addPlugin(HTMLArea.PLUGIN_LIST_TYPE); bodyArea.addPlugin(HTMLArea.PLUGIN_CHARACTER_MAP); */ bodyArea.setAllowFontSelection(false); //bodyArea.addPlugin("TableOperations"); //bodyArea.addPlugin("Template"); //bodyArea.addPlugin("Forms"); //bodyArea.addPlugin("FormOperations"); //bodyArea.addPlugin("EditTag"); //bodyArea.addPlugin("Stylist"); //bodyArea.addPlugin("CSS"); //bodyArea.addPlugin("DynamicCSS"); //bodyArea.addPlugin("FullPage"); //bodyArea.addPlugin("NoteServer"); //bodyArea.addPlugin("QuickTag"); //bodyArea.addPlugin("InsertSmiley"); //bodyArea.addPlugin("InsertWords"); //bodyArea.addPlugin("ContextMenu"); //bodyArea.addPlugin("LangMarks"); //bodyArea.addPlugin("DoubleClick"); //bodyArea.addPlugin("ListType"); //bodyArea.addPlugin("ImageManager"); p.getChildren().add(WFUtil.group(bodyArea, WFUtil.getBreak())); p.getChildren().add(WFUtil.group(localizer.getTextVB("teaser"), WFUtil.getText(":"))); HtmlInputTextarea teaserArea = WFUtil.getTextArea(TEASER_ID, ref + "teaser", "500px", "60px"); p.getChildren().add(teaserArea); p.getChildren().add(WFUtil.group(localizer.getTextVB("source"), WFUtil.getText(":"))); HtmlInputText sourceArea = WFUtil.getInputText(SOURCE_ID, ref + "source"); sourceArea.setSize(70); p.getChildren().add(sourceArea); p.getChildren().add(WFUtil.getBreak()); p.getChildren().add(WFUtil.getBreak()); // p = WFPanelUtil.getPlainFormPanel(1);/* p.getChildren().add(WFUtil.group(WFUtil.getHeaderTextVB(bref + "created"), WFUtil.getTextVB(ref + "creationDate") ));*/// p.getChildren().add(WFUtil.getText(" "));// UIComponent t = WFUtil.group(localizer.getHeaderTextVB("status"), WFUtil.getText(": "));// t.getChildren().add(WFUtil.getTextVB(ref + "status"));// p.getChildren().add(t); p.getChildren().add(WFUtil.group(localizer.getTextVB("status"), WFUtil.getText(":"))); p.getChildren().add(WFUtil.getTextVB(ref + "status")); p.getChildren().add(WFUtil.group(localizer.getTextVB("current_version"), WFUtil.getText(":"))); p.getChildren().add(WFUtil.getTextVB(ref + "versionName")); p.getChildren().add(WFUtil.getBreak()); p.getChildren().add(WFUtil.getBreak()); // p = WFPanelUtil.getFormPanel(2); p.getChildren().add(WFUtil.group(localizer.getTextVB("comment"), WFUtil.getText(":")));// p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "attachments"), WFUtil.getText(":"))); HtmlInputTextarea commentArea = WFUtil.getTextArea(COMMENT_ID, ref + "comment", "500px", "60px"); p.getChildren().add(commentArea);// WFContainer attachmentContainer = new WFContainer();// attachmentContainer.add(WFUtil.getButtonVB(ADD_ATTACHMENT_ID, bref + "add_attachment", this));// attachmentContainer.add(WFUtil.getBreak());// attachmentContainer.add(getAttachmentList());// p.getChildren().add(attachmentContainer); // mainContainer.add(p); // p = WFPanelUtil.getFormPanel(1);// p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "related_content_items"), WFUtil.getText(":"))); // WFContainer contentItemContainer = new WFContainer(); // contentItemContainer.add(WFUtil.getButtonVB(ADD_RELATED_CONTENT_ITEM_ID, bref + "add_content_item", this));// contentItemContainer.add(WFUtil.getBreak());// contentItemContainer.add(getRelatedContentItemsList());// p.getChildren().add(contentItemContainer);// p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "publishing_date"), WFUtil.getText(":"))); // WFDateInput publishedFromInput = WFUtil.getDateInput(PUBLISHED_FROM_DATE_ID, ref + "case.publishedFromDate");// publishedFromInput.setShowTime(true);// p.getChildren().add(publishedFromInput);// p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "expiration_date"), WFUtil.getText(":"))); // WFDateInput publishedToInput = WFUtil.getDateInput(PUBLISHED_TO_DATE_ID, ref + "case.publishedToDate");// publishedToInput.setShowTime(true);// p.getChildren().add(publishedToInput); // mainContainer.add(p); p.getChildren().add(WFUtil.getBreak()); p.getChildren().add(WFUtil.getBreak());// mainContainer.add(WFUtil.getBreak());// p = WFPanelUtil.getPlainFormPanel(1);// HtmlCommandButton editCategoriesButton = WFUtil.getButtonVB(EDIT_CATEGORIES_ID, bref + "edit_categories", this);// p.getChildren().add(editCategoriesButton); //Temporary taking away folderr location/* p.getChildren().add(WFUtil.group(localizer.getTextVB("folder"), WFUtil.getText(":"))); HtmlInputText folderInput = WFUtil.getInputText(FOLDER_ID, ref + "folderLocation"); if(null==folderInput.getValue() || "".equals(folderInput.getValue())) { String FolderString = ArticleUtil.getArticleYearMonthPath();// System.out.println("Folder "+FolderString); folderInput.setValue(FolderString); } else { File file = new File(folderInput.getValue().toString()); folderInput.setValue(file.getParentFile().getParent()); } folderInput.setSize(70); p.getChildren().add(folderInput); */ p.getChildren().add(WFUtil.getBreak()); //Categories// WebDAVCategories categoriesUI = new WebDAVCategories(); //ArticleItemBean articleItemBean = (ArticleItemBean) getArticleItemBean(); //String resourcePath = articleItemBean.getArticleResourcePath(); addCategoryEditor(p); p.getChildren().add(WFUtil.getBreak()); p.getChildren().add(WFUtil.getBreak()); p.getChildren().add(WFUtil.getBreak());// WFComponentSelector cs = new WFComponentSelector();// cs.setId(BUTTON_SELECTOR_ID);// cs.setDividerText(" "); HtmlCommandButton saveButton = localizer.getButtonVB(SAVE_ID, "save", this);// HtmlCommandButton saveButton = WFUtil.getButtonVB(SAVE_ID, WFPage.CONTENT_BUNDLE + "save", this);// cs.add(saveButton);// cs.add(WFUtil.getButtonVB(FOR_REVIEW_ID, bref + "for_review", this));// cs.add(WFUtil.getButtonVB(PUBLISH_ID, bref + "publish", this));// cs.add(WFUtil.getButtonVB(REWRITE_ID, bref + "rewrite", this));// cs.add(WFUtil.getButtonVB(REJECT_ID, bref + "reject", this));// cs.add(WFUtil.getButtonVB(DELETE_ID, bref + "delete", this));// cs.add(WFUtil.getButtonVB(CANCEL_ID, bref + "cancel", this));// cs.setSelectedId(CANCEL_ID, true);// p.getChildren().add(cs); p.getChildren().add(saveButton); mainContainer.add(p); //WFComponentSelector editorSelector = new WFComponentSelector(); //editorSelector.setId(EDITOR_SELECTOR_ID); //editorSelector.add(mainContainer); //editorSelector.add(getCategoryEditContainer());// FileUploadForm f = new FileUploadForm(this, FILE_UPLOAD_ID, FILE_UPLOAD_CANCEL_ID); //editorSelector.add(getRelatedContentItemsContainer()); //editorSelector.setSelectedId(ARTICLE_EDITOR_ID, true); //return editorSelector; return mainContainer; } | 57000 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57000/5db26355cf68616cbd8859fa37cd6aa73d783808/EditArticleView.java/buggy/src/java/com/idega/block/article/component/EditArticleView.java |
||
/* p.getChildren().add(WFUtil.group(localizer.getTextVB("folder"), WFUtil.getText(":"))); HtmlInputText folderInput = WFUtil.getInputText(FOLDER_ID, ref + "folderLocation"); if(null==folderInput.getValue() || "".equals(folderInput.getValue())) { String FolderString = ArticleUtil.getArticleYearMonthPath(); folderInput.setValue(FolderString); } else { File file = new File(folderInput.getValue().toString()); folderInput.setValue(file.getParentFile().getParent()); } folderInput.setSize(70); p.getChildren().add(folderInput); */ p.getChildren().add(WFUtil.getBreak()); | public UIComponent getEditContainer() { IWContext iwc = IWContext.getInstance(); WFResourceUtil localizer = WFResourceUtil.getResourceUtilArticle();// String bref = WFPage.CONTENT_BUNDLE + "."; WFContainer mainContainer = new WFContainer(); mainContainer.setId(ARTICLE_EDITOR_ID); WFErrorMessages em = new WFErrorMessages(); em.addErrorMessage(HEADLINE_ID); em.addErrorMessage(TEASER_ID);// em.addErrorMessage(PUBLISHED_FROM_DATE_ID);// em.addErrorMessage(PUBLISHED_TO_DATE_ID); em.addErrorMessage(SAVE_ID); mainContainer.add(em); //Saving the state of the articleItemBean specially because the scpoe //of this bean now is 'request' not 'session' UISaveState beanSaveState = new UISaveState(); ValueBinding binding = WFUtil.createValueBinding("#{"+ARTICLE_ITEM_BEAN_ID+"}"); beanSaveState.setId("articleItemBeanSaveState"); beanSaveState.setValueBinding("value",binding); mainContainer.add(beanSaveState); HtmlPanelGrid p = WFPanelUtil.getPlainFormPanel(2); //Language dropdown p.getChildren().add(WFUtil.group(localizer.getTextVB("language"), WFUtil.getText(":"))); UIComponent langDropdown = getLanguageDropdownMenu(); p.getChildren().add(langDropdown); p.getChildren().add(WFUtil.group(localizer.getTextVB("headline"), WFUtil.getText(":")));// p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "language"), WFUtil.getText(":"))); HtmlInputText headlineInput = WFUtil.getInputText(HEADLINE_ID, ref + "headline"); headlineInput.setSize(70); p.getChildren().add(headlineInput); //HtmlSelectOneMenu localeMenu = WFUtil.getSelectOneMenu(LOCALE_ID, ref + "allLocales", ref + "pendingLocaleId"); //localeMenu.setOnchange("document.forms[0].submit();"); //p.getChildren().add(localeMenu); p.getChildren().add(WFUtil.group(localizer.getTextVB("author"), WFUtil.getText(":"))); HtmlInputText authorInput = WFUtil.getInputText(AUTHOR_ID, ref + "author"); authorInput.setSize(70); User user = iwc.getCurrentUser(); if(user!=null){ String userName = user.getName(); getArticleItemBean().setAuthor(userName); } p.getChildren().add(authorInput); //Article body p.getChildren().add(WFUtil.group(localizer.getTextVB("body"), WFUtil.getText(":"))); HTMLArea bodyArea = WFUtil.getHtmlAreaTextArea(BODY_ID, ref + "body", "500px", "400px"); //HTMLArea bodyArea = WFUtil.getHtmlAreaTextArea(BODY_ID, ref + "body"); /*bodyArea.addPlugin(HTMLArea.PLUGIN_TABLE_OPERATIONS); bodyArea.addPlugin(HTMLArea.PLUGIN_DYNAMIC_CSS, "3"); bodyArea.addPlugin(HTMLArea.PLUGIN_CSS, "3"); bodyArea.addPlugin(HTMLArea.PLUGIN_CONTEXT_MENU); bodyArea.addPlugin(HTMLArea.PLUGIN_LIST_TYPE); bodyArea.addPlugin(HTMLArea.PLUGIN_CHARACTER_MAP); */ bodyArea.setAllowFontSelection(false); //bodyArea.addPlugin("TableOperations"); //bodyArea.addPlugin("Template"); //bodyArea.addPlugin("Forms"); //bodyArea.addPlugin("FormOperations"); //bodyArea.addPlugin("EditTag"); //bodyArea.addPlugin("Stylist"); //bodyArea.addPlugin("CSS"); //bodyArea.addPlugin("DynamicCSS"); //bodyArea.addPlugin("FullPage"); //bodyArea.addPlugin("NoteServer"); //bodyArea.addPlugin("QuickTag"); //bodyArea.addPlugin("InsertSmiley"); //bodyArea.addPlugin("InsertWords"); //bodyArea.addPlugin("ContextMenu"); //bodyArea.addPlugin("LangMarks"); //bodyArea.addPlugin("DoubleClick"); //bodyArea.addPlugin("ListType"); //bodyArea.addPlugin("ImageManager"); p.getChildren().add(WFUtil.group(bodyArea, WFUtil.getBreak())); p.getChildren().add(WFUtil.group(localizer.getTextVB("teaser"), WFUtil.getText(":"))); HtmlInputTextarea teaserArea = WFUtil.getTextArea(TEASER_ID, ref + "teaser", "500px", "60px"); p.getChildren().add(teaserArea); p.getChildren().add(WFUtil.group(localizer.getTextVB("source"), WFUtil.getText(":"))); HtmlInputText sourceArea = WFUtil.getInputText(SOURCE_ID, ref + "source"); sourceArea.setSize(70); p.getChildren().add(sourceArea); p.getChildren().add(WFUtil.getBreak()); p.getChildren().add(WFUtil.getBreak()); // p = WFPanelUtil.getPlainFormPanel(1);/* p.getChildren().add(WFUtil.group(WFUtil.getHeaderTextVB(bref + "created"), WFUtil.getTextVB(ref + "creationDate") ));*/// p.getChildren().add(WFUtil.getText(" "));// UIComponent t = WFUtil.group(localizer.getHeaderTextVB("status"), WFUtil.getText(": "));// t.getChildren().add(WFUtil.getTextVB(ref + "status"));// p.getChildren().add(t); p.getChildren().add(WFUtil.group(localizer.getTextVB("status"), WFUtil.getText(":"))); p.getChildren().add(WFUtil.getTextVB(ref + "status")); p.getChildren().add(WFUtil.group(localizer.getTextVB("current_version"), WFUtil.getText(":"))); p.getChildren().add(WFUtil.getTextVB(ref + "versionName")); p.getChildren().add(WFUtil.getBreak()); p.getChildren().add(WFUtil.getBreak()); // p = WFPanelUtil.getFormPanel(2); p.getChildren().add(WFUtil.group(localizer.getTextVB("comment"), WFUtil.getText(":")));// p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "attachments"), WFUtil.getText(":"))); HtmlInputTextarea commentArea = WFUtil.getTextArea(COMMENT_ID, ref + "comment", "500px", "60px"); p.getChildren().add(commentArea);// WFContainer attachmentContainer = new WFContainer();// attachmentContainer.add(WFUtil.getButtonVB(ADD_ATTACHMENT_ID, bref + "add_attachment", this));// attachmentContainer.add(WFUtil.getBreak());// attachmentContainer.add(getAttachmentList());// p.getChildren().add(attachmentContainer); // mainContainer.add(p); // p = WFPanelUtil.getFormPanel(1);// p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "related_content_items"), WFUtil.getText(":"))); // WFContainer contentItemContainer = new WFContainer(); // contentItemContainer.add(WFUtil.getButtonVB(ADD_RELATED_CONTENT_ITEM_ID, bref + "add_content_item", this));// contentItemContainer.add(WFUtil.getBreak());// contentItemContainer.add(getRelatedContentItemsList());// p.getChildren().add(contentItemContainer);// p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "publishing_date"), WFUtil.getText(":"))); // WFDateInput publishedFromInput = WFUtil.getDateInput(PUBLISHED_FROM_DATE_ID, ref + "case.publishedFromDate");// publishedFromInput.setShowTime(true);// p.getChildren().add(publishedFromInput);// p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "expiration_date"), WFUtil.getText(":"))); // WFDateInput publishedToInput = WFUtil.getDateInput(PUBLISHED_TO_DATE_ID, ref + "case.publishedToDate");// publishedToInput.setShowTime(true);// p.getChildren().add(publishedToInput); // mainContainer.add(p); p.getChildren().add(WFUtil.getBreak()); p.getChildren().add(WFUtil.getBreak());// mainContainer.add(WFUtil.getBreak());// p = WFPanelUtil.getPlainFormPanel(1);// HtmlCommandButton editCategoriesButton = WFUtil.getButtonVB(EDIT_CATEGORIES_ID, bref + "edit_categories", this);// p.getChildren().add(editCategoriesButton); //Temporary taking away folderr location/* p.getChildren().add(WFUtil.group(localizer.getTextVB("folder"), WFUtil.getText(":"))); HtmlInputText folderInput = WFUtil.getInputText(FOLDER_ID, ref + "folderLocation"); if(null==folderInput.getValue() || "".equals(folderInput.getValue())) { String FolderString = ArticleUtil.getArticleYearMonthPath();// System.out.println("Folder "+FolderString); folderInput.setValue(FolderString); } else { File file = new File(folderInput.getValue().toString()); folderInput.setValue(file.getParentFile().getParent()); } folderInput.setSize(70); p.getChildren().add(folderInput); */ p.getChildren().add(WFUtil.getBreak()); //Categories// WebDAVCategories categoriesUI = new WebDAVCategories(); //ArticleItemBean articleItemBean = (ArticleItemBean) getArticleItemBean(); //String resourcePath = articleItemBean.getArticleResourcePath(); addCategoryEditor(p); p.getChildren().add(WFUtil.getBreak()); p.getChildren().add(WFUtil.getBreak()); p.getChildren().add(WFUtil.getBreak());// WFComponentSelector cs = new WFComponentSelector();// cs.setId(BUTTON_SELECTOR_ID);// cs.setDividerText(" "); HtmlCommandButton saveButton = localizer.getButtonVB(SAVE_ID, "save", this);// HtmlCommandButton saveButton = WFUtil.getButtonVB(SAVE_ID, WFPage.CONTENT_BUNDLE + "save", this);// cs.add(saveButton);// cs.add(WFUtil.getButtonVB(FOR_REVIEW_ID, bref + "for_review", this));// cs.add(WFUtil.getButtonVB(PUBLISH_ID, bref + "publish", this));// cs.add(WFUtil.getButtonVB(REWRITE_ID, bref + "rewrite", this));// cs.add(WFUtil.getButtonVB(REJECT_ID, bref + "reject", this));// cs.add(WFUtil.getButtonVB(DELETE_ID, bref + "delete", this));// cs.add(WFUtil.getButtonVB(CANCEL_ID, bref + "cancel", this));// cs.setSelectedId(CANCEL_ID, true);// p.getChildren().add(cs); p.getChildren().add(saveButton); mainContainer.add(p); //WFComponentSelector editorSelector = new WFComponentSelector(); //editorSelector.setId(EDITOR_SELECTOR_ID); //editorSelector.add(mainContainer); //editorSelector.add(getCategoryEditContainer());// FileUploadForm f = new FileUploadForm(this, FILE_UPLOAD_ID, FILE_UPLOAD_CANCEL_ID); //editorSelector.add(getRelatedContentItemsContainer()); //editorSelector.setSelectedId(ARTICLE_EDITOR_ID, true); //return editorSelector; return mainContainer; } | 57000 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57000/5db26355cf68616cbd8859fa37cd6aa73d783808/EditArticleView.java/buggy/src/java/com/idega/block/article/component/EditArticleView.java |
|
addCategoryEditor(p); p.getChildren().add(WFUtil.getBreak()); p.getChildren().add(WFUtil.getBreak()); p.getChildren().add(WFUtil.getBreak()); | UIComponent categoriesContainer = getCategoryEditor(); UIComponent categoriesText = WFUtil.group(localizer.getTextVB("categories"), WFUtil.getText(":")); HtmlOutputLabel categoriesLabel = new HtmlOutputLabel(); categoriesLabel.getChildren().add(categoriesText); categoriesLabel.setFor(categoriesContainer.getClientId(context)); WFFormItem categoriesItem = new WFFormItem(); categoriesItem.add(categoriesLabel); categoriesItem.add(categoriesContainer); mainContainer.add(categoriesItem); | public UIComponent getEditContainer() { IWContext iwc = IWContext.getInstance(); WFResourceUtil localizer = WFResourceUtil.getResourceUtilArticle();// String bref = WFPage.CONTENT_BUNDLE + "."; WFContainer mainContainer = new WFContainer(); mainContainer.setId(ARTICLE_EDITOR_ID); WFErrorMessages em = new WFErrorMessages(); em.addErrorMessage(HEADLINE_ID); em.addErrorMessage(TEASER_ID);// em.addErrorMessage(PUBLISHED_FROM_DATE_ID);// em.addErrorMessage(PUBLISHED_TO_DATE_ID); em.addErrorMessage(SAVE_ID); mainContainer.add(em); //Saving the state of the articleItemBean specially because the scpoe //of this bean now is 'request' not 'session' UISaveState beanSaveState = new UISaveState(); ValueBinding binding = WFUtil.createValueBinding("#{"+ARTICLE_ITEM_BEAN_ID+"}"); beanSaveState.setId("articleItemBeanSaveState"); beanSaveState.setValueBinding("value",binding); mainContainer.add(beanSaveState); HtmlPanelGrid p = WFPanelUtil.getPlainFormPanel(2); //Language dropdown p.getChildren().add(WFUtil.group(localizer.getTextVB("language"), WFUtil.getText(":"))); UIComponent langDropdown = getLanguageDropdownMenu(); p.getChildren().add(langDropdown); p.getChildren().add(WFUtil.group(localizer.getTextVB("headline"), WFUtil.getText(":")));// p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "language"), WFUtil.getText(":"))); HtmlInputText headlineInput = WFUtil.getInputText(HEADLINE_ID, ref + "headline"); headlineInput.setSize(70); p.getChildren().add(headlineInput); //HtmlSelectOneMenu localeMenu = WFUtil.getSelectOneMenu(LOCALE_ID, ref + "allLocales", ref + "pendingLocaleId"); //localeMenu.setOnchange("document.forms[0].submit();"); //p.getChildren().add(localeMenu); p.getChildren().add(WFUtil.group(localizer.getTextVB("author"), WFUtil.getText(":"))); HtmlInputText authorInput = WFUtil.getInputText(AUTHOR_ID, ref + "author"); authorInput.setSize(70); User user = iwc.getCurrentUser(); if(user!=null){ String userName = user.getName(); getArticleItemBean().setAuthor(userName); } p.getChildren().add(authorInput); //Article body p.getChildren().add(WFUtil.group(localizer.getTextVB("body"), WFUtil.getText(":"))); HTMLArea bodyArea = WFUtil.getHtmlAreaTextArea(BODY_ID, ref + "body", "500px", "400px"); //HTMLArea bodyArea = WFUtil.getHtmlAreaTextArea(BODY_ID, ref + "body"); /*bodyArea.addPlugin(HTMLArea.PLUGIN_TABLE_OPERATIONS); bodyArea.addPlugin(HTMLArea.PLUGIN_DYNAMIC_CSS, "3"); bodyArea.addPlugin(HTMLArea.PLUGIN_CSS, "3"); bodyArea.addPlugin(HTMLArea.PLUGIN_CONTEXT_MENU); bodyArea.addPlugin(HTMLArea.PLUGIN_LIST_TYPE); bodyArea.addPlugin(HTMLArea.PLUGIN_CHARACTER_MAP); */ bodyArea.setAllowFontSelection(false); //bodyArea.addPlugin("TableOperations"); //bodyArea.addPlugin("Template"); //bodyArea.addPlugin("Forms"); //bodyArea.addPlugin("FormOperations"); //bodyArea.addPlugin("EditTag"); //bodyArea.addPlugin("Stylist"); //bodyArea.addPlugin("CSS"); //bodyArea.addPlugin("DynamicCSS"); //bodyArea.addPlugin("FullPage"); //bodyArea.addPlugin("NoteServer"); //bodyArea.addPlugin("QuickTag"); //bodyArea.addPlugin("InsertSmiley"); //bodyArea.addPlugin("InsertWords"); //bodyArea.addPlugin("ContextMenu"); //bodyArea.addPlugin("LangMarks"); //bodyArea.addPlugin("DoubleClick"); //bodyArea.addPlugin("ListType"); //bodyArea.addPlugin("ImageManager"); p.getChildren().add(WFUtil.group(bodyArea, WFUtil.getBreak())); p.getChildren().add(WFUtil.group(localizer.getTextVB("teaser"), WFUtil.getText(":"))); HtmlInputTextarea teaserArea = WFUtil.getTextArea(TEASER_ID, ref + "teaser", "500px", "60px"); p.getChildren().add(teaserArea); p.getChildren().add(WFUtil.group(localizer.getTextVB("source"), WFUtil.getText(":"))); HtmlInputText sourceArea = WFUtil.getInputText(SOURCE_ID, ref + "source"); sourceArea.setSize(70); p.getChildren().add(sourceArea); p.getChildren().add(WFUtil.getBreak()); p.getChildren().add(WFUtil.getBreak()); // p = WFPanelUtil.getPlainFormPanel(1);/* p.getChildren().add(WFUtil.group(WFUtil.getHeaderTextVB(bref + "created"), WFUtil.getTextVB(ref + "creationDate") ));*/// p.getChildren().add(WFUtil.getText(" "));// UIComponent t = WFUtil.group(localizer.getHeaderTextVB("status"), WFUtil.getText(": "));// t.getChildren().add(WFUtil.getTextVB(ref + "status"));// p.getChildren().add(t); p.getChildren().add(WFUtil.group(localizer.getTextVB("status"), WFUtil.getText(":"))); p.getChildren().add(WFUtil.getTextVB(ref + "status")); p.getChildren().add(WFUtil.group(localizer.getTextVB("current_version"), WFUtil.getText(":"))); p.getChildren().add(WFUtil.getTextVB(ref + "versionName")); p.getChildren().add(WFUtil.getBreak()); p.getChildren().add(WFUtil.getBreak()); // p = WFPanelUtil.getFormPanel(2); p.getChildren().add(WFUtil.group(localizer.getTextVB("comment"), WFUtil.getText(":")));// p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "attachments"), WFUtil.getText(":"))); HtmlInputTextarea commentArea = WFUtil.getTextArea(COMMENT_ID, ref + "comment", "500px", "60px"); p.getChildren().add(commentArea);// WFContainer attachmentContainer = new WFContainer();// attachmentContainer.add(WFUtil.getButtonVB(ADD_ATTACHMENT_ID, bref + "add_attachment", this));// attachmentContainer.add(WFUtil.getBreak());// attachmentContainer.add(getAttachmentList());// p.getChildren().add(attachmentContainer); // mainContainer.add(p); // p = WFPanelUtil.getFormPanel(1);// p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "related_content_items"), WFUtil.getText(":"))); // WFContainer contentItemContainer = new WFContainer(); // contentItemContainer.add(WFUtil.getButtonVB(ADD_RELATED_CONTENT_ITEM_ID, bref + "add_content_item", this));// contentItemContainer.add(WFUtil.getBreak());// contentItemContainer.add(getRelatedContentItemsList());// p.getChildren().add(contentItemContainer);// p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "publishing_date"), WFUtil.getText(":"))); // WFDateInput publishedFromInput = WFUtil.getDateInput(PUBLISHED_FROM_DATE_ID, ref + "case.publishedFromDate");// publishedFromInput.setShowTime(true);// p.getChildren().add(publishedFromInput);// p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "expiration_date"), WFUtil.getText(":"))); // WFDateInput publishedToInput = WFUtil.getDateInput(PUBLISHED_TO_DATE_ID, ref + "case.publishedToDate");// publishedToInput.setShowTime(true);// p.getChildren().add(publishedToInput); // mainContainer.add(p); p.getChildren().add(WFUtil.getBreak()); p.getChildren().add(WFUtil.getBreak());// mainContainer.add(WFUtil.getBreak());// p = WFPanelUtil.getPlainFormPanel(1);// HtmlCommandButton editCategoriesButton = WFUtil.getButtonVB(EDIT_CATEGORIES_ID, bref + "edit_categories", this);// p.getChildren().add(editCategoriesButton); //Temporary taking away folderr location/* p.getChildren().add(WFUtil.group(localizer.getTextVB("folder"), WFUtil.getText(":"))); HtmlInputText folderInput = WFUtil.getInputText(FOLDER_ID, ref + "folderLocation"); if(null==folderInput.getValue() || "".equals(folderInput.getValue())) { String FolderString = ArticleUtil.getArticleYearMonthPath();// System.out.println("Folder "+FolderString); folderInput.setValue(FolderString); } else { File file = new File(folderInput.getValue().toString()); folderInput.setValue(file.getParentFile().getParent()); } folderInput.setSize(70); p.getChildren().add(folderInput); */ p.getChildren().add(WFUtil.getBreak()); //Categories// WebDAVCategories categoriesUI = new WebDAVCategories(); //ArticleItemBean articleItemBean = (ArticleItemBean) getArticleItemBean(); //String resourcePath = articleItemBean.getArticleResourcePath(); addCategoryEditor(p); p.getChildren().add(WFUtil.getBreak()); p.getChildren().add(WFUtil.getBreak()); p.getChildren().add(WFUtil.getBreak());// WFComponentSelector cs = new WFComponentSelector();// cs.setId(BUTTON_SELECTOR_ID);// cs.setDividerText(" "); HtmlCommandButton saveButton = localizer.getButtonVB(SAVE_ID, "save", this);// HtmlCommandButton saveButton = WFUtil.getButtonVB(SAVE_ID, WFPage.CONTENT_BUNDLE + "save", this);// cs.add(saveButton);// cs.add(WFUtil.getButtonVB(FOR_REVIEW_ID, bref + "for_review", this));// cs.add(WFUtil.getButtonVB(PUBLISH_ID, bref + "publish", this));// cs.add(WFUtil.getButtonVB(REWRITE_ID, bref + "rewrite", this));// cs.add(WFUtil.getButtonVB(REJECT_ID, bref + "reject", this));// cs.add(WFUtil.getButtonVB(DELETE_ID, bref + "delete", this));// cs.add(WFUtil.getButtonVB(CANCEL_ID, bref + "cancel", this));// cs.setSelectedId(CANCEL_ID, true);// p.getChildren().add(cs); p.getChildren().add(saveButton); mainContainer.add(p); //WFComponentSelector editorSelector = new WFComponentSelector(); //editorSelector.setId(EDITOR_SELECTOR_ID); //editorSelector.add(mainContainer); //editorSelector.add(getCategoryEditContainer());// FileUploadForm f = new FileUploadForm(this, FILE_UPLOAD_ID, FILE_UPLOAD_CANCEL_ID); //editorSelector.add(getRelatedContentItemsContainer()); //editorSelector.setSelectedId(ARTICLE_EDITOR_ID, true); //return editorSelector; return mainContainer; } | 57000 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57000/5db26355cf68616cbd8859fa37cd6aa73d783808/EditArticleView.java/buggy/src/java/com/idega/block/article/component/EditArticleView.java |
HtmlCommandButton saveButton = localizer.getButtonVB(SAVE_ID, "save", this); | public UIComponent getEditContainer() { IWContext iwc = IWContext.getInstance(); WFResourceUtil localizer = WFResourceUtil.getResourceUtilArticle();// String bref = WFPage.CONTENT_BUNDLE + "."; WFContainer mainContainer = new WFContainer(); mainContainer.setId(ARTICLE_EDITOR_ID); WFErrorMessages em = new WFErrorMessages(); em.addErrorMessage(HEADLINE_ID); em.addErrorMessage(TEASER_ID);// em.addErrorMessage(PUBLISHED_FROM_DATE_ID);// em.addErrorMessage(PUBLISHED_TO_DATE_ID); em.addErrorMessage(SAVE_ID); mainContainer.add(em); //Saving the state of the articleItemBean specially because the scpoe //of this bean now is 'request' not 'session' UISaveState beanSaveState = new UISaveState(); ValueBinding binding = WFUtil.createValueBinding("#{"+ARTICLE_ITEM_BEAN_ID+"}"); beanSaveState.setId("articleItemBeanSaveState"); beanSaveState.setValueBinding("value",binding); mainContainer.add(beanSaveState); HtmlPanelGrid p = WFPanelUtil.getPlainFormPanel(2); //Language dropdown p.getChildren().add(WFUtil.group(localizer.getTextVB("language"), WFUtil.getText(":"))); UIComponent langDropdown = getLanguageDropdownMenu(); p.getChildren().add(langDropdown); p.getChildren().add(WFUtil.group(localizer.getTextVB("headline"), WFUtil.getText(":")));// p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "language"), WFUtil.getText(":"))); HtmlInputText headlineInput = WFUtil.getInputText(HEADLINE_ID, ref + "headline"); headlineInput.setSize(70); p.getChildren().add(headlineInput); //HtmlSelectOneMenu localeMenu = WFUtil.getSelectOneMenu(LOCALE_ID, ref + "allLocales", ref + "pendingLocaleId"); //localeMenu.setOnchange("document.forms[0].submit();"); //p.getChildren().add(localeMenu); p.getChildren().add(WFUtil.group(localizer.getTextVB("author"), WFUtil.getText(":"))); HtmlInputText authorInput = WFUtil.getInputText(AUTHOR_ID, ref + "author"); authorInput.setSize(70); User user = iwc.getCurrentUser(); if(user!=null){ String userName = user.getName(); getArticleItemBean().setAuthor(userName); } p.getChildren().add(authorInput); //Article body p.getChildren().add(WFUtil.group(localizer.getTextVB("body"), WFUtil.getText(":"))); HTMLArea bodyArea = WFUtil.getHtmlAreaTextArea(BODY_ID, ref + "body", "500px", "400px"); //HTMLArea bodyArea = WFUtil.getHtmlAreaTextArea(BODY_ID, ref + "body"); /*bodyArea.addPlugin(HTMLArea.PLUGIN_TABLE_OPERATIONS); bodyArea.addPlugin(HTMLArea.PLUGIN_DYNAMIC_CSS, "3"); bodyArea.addPlugin(HTMLArea.PLUGIN_CSS, "3"); bodyArea.addPlugin(HTMLArea.PLUGIN_CONTEXT_MENU); bodyArea.addPlugin(HTMLArea.PLUGIN_LIST_TYPE); bodyArea.addPlugin(HTMLArea.PLUGIN_CHARACTER_MAP); */ bodyArea.setAllowFontSelection(false); //bodyArea.addPlugin("TableOperations"); //bodyArea.addPlugin("Template"); //bodyArea.addPlugin("Forms"); //bodyArea.addPlugin("FormOperations"); //bodyArea.addPlugin("EditTag"); //bodyArea.addPlugin("Stylist"); //bodyArea.addPlugin("CSS"); //bodyArea.addPlugin("DynamicCSS"); //bodyArea.addPlugin("FullPage"); //bodyArea.addPlugin("NoteServer"); //bodyArea.addPlugin("QuickTag"); //bodyArea.addPlugin("InsertSmiley"); //bodyArea.addPlugin("InsertWords"); //bodyArea.addPlugin("ContextMenu"); //bodyArea.addPlugin("LangMarks"); //bodyArea.addPlugin("DoubleClick"); //bodyArea.addPlugin("ListType"); //bodyArea.addPlugin("ImageManager"); p.getChildren().add(WFUtil.group(bodyArea, WFUtil.getBreak())); p.getChildren().add(WFUtil.group(localizer.getTextVB("teaser"), WFUtil.getText(":"))); HtmlInputTextarea teaserArea = WFUtil.getTextArea(TEASER_ID, ref + "teaser", "500px", "60px"); p.getChildren().add(teaserArea); p.getChildren().add(WFUtil.group(localizer.getTextVB("source"), WFUtil.getText(":"))); HtmlInputText sourceArea = WFUtil.getInputText(SOURCE_ID, ref + "source"); sourceArea.setSize(70); p.getChildren().add(sourceArea); p.getChildren().add(WFUtil.getBreak()); p.getChildren().add(WFUtil.getBreak()); // p = WFPanelUtil.getPlainFormPanel(1);/* p.getChildren().add(WFUtil.group(WFUtil.getHeaderTextVB(bref + "created"), WFUtil.getTextVB(ref + "creationDate") ));*/// p.getChildren().add(WFUtil.getText(" "));// UIComponent t = WFUtil.group(localizer.getHeaderTextVB("status"), WFUtil.getText(": "));// t.getChildren().add(WFUtil.getTextVB(ref + "status"));// p.getChildren().add(t); p.getChildren().add(WFUtil.group(localizer.getTextVB("status"), WFUtil.getText(":"))); p.getChildren().add(WFUtil.getTextVB(ref + "status")); p.getChildren().add(WFUtil.group(localizer.getTextVB("current_version"), WFUtil.getText(":"))); p.getChildren().add(WFUtil.getTextVB(ref + "versionName")); p.getChildren().add(WFUtil.getBreak()); p.getChildren().add(WFUtil.getBreak()); // p = WFPanelUtil.getFormPanel(2); p.getChildren().add(WFUtil.group(localizer.getTextVB("comment"), WFUtil.getText(":")));// p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "attachments"), WFUtil.getText(":"))); HtmlInputTextarea commentArea = WFUtil.getTextArea(COMMENT_ID, ref + "comment", "500px", "60px"); p.getChildren().add(commentArea);// WFContainer attachmentContainer = new WFContainer();// attachmentContainer.add(WFUtil.getButtonVB(ADD_ATTACHMENT_ID, bref + "add_attachment", this));// attachmentContainer.add(WFUtil.getBreak());// attachmentContainer.add(getAttachmentList());// p.getChildren().add(attachmentContainer); // mainContainer.add(p); // p = WFPanelUtil.getFormPanel(1);// p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "related_content_items"), WFUtil.getText(":"))); // WFContainer contentItemContainer = new WFContainer(); // contentItemContainer.add(WFUtil.getButtonVB(ADD_RELATED_CONTENT_ITEM_ID, bref + "add_content_item", this));// contentItemContainer.add(WFUtil.getBreak());// contentItemContainer.add(getRelatedContentItemsList());// p.getChildren().add(contentItemContainer);// p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "publishing_date"), WFUtil.getText(":"))); // WFDateInput publishedFromInput = WFUtil.getDateInput(PUBLISHED_FROM_DATE_ID, ref + "case.publishedFromDate");// publishedFromInput.setShowTime(true);// p.getChildren().add(publishedFromInput);// p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "expiration_date"), WFUtil.getText(":"))); // WFDateInput publishedToInput = WFUtil.getDateInput(PUBLISHED_TO_DATE_ID, ref + "case.publishedToDate");// publishedToInput.setShowTime(true);// p.getChildren().add(publishedToInput); // mainContainer.add(p); p.getChildren().add(WFUtil.getBreak()); p.getChildren().add(WFUtil.getBreak());// mainContainer.add(WFUtil.getBreak());// p = WFPanelUtil.getPlainFormPanel(1);// HtmlCommandButton editCategoriesButton = WFUtil.getButtonVB(EDIT_CATEGORIES_ID, bref + "edit_categories", this);// p.getChildren().add(editCategoriesButton); //Temporary taking away folderr location/* p.getChildren().add(WFUtil.group(localizer.getTextVB("folder"), WFUtil.getText(":"))); HtmlInputText folderInput = WFUtil.getInputText(FOLDER_ID, ref + "folderLocation"); if(null==folderInput.getValue() || "".equals(folderInput.getValue())) { String FolderString = ArticleUtil.getArticleYearMonthPath();// System.out.println("Folder "+FolderString); folderInput.setValue(FolderString); } else { File file = new File(folderInput.getValue().toString()); folderInput.setValue(file.getParentFile().getParent()); } folderInput.setSize(70); p.getChildren().add(folderInput); */ p.getChildren().add(WFUtil.getBreak()); //Categories// WebDAVCategories categoriesUI = new WebDAVCategories(); //ArticleItemBean articleItemBean = (ArticleItemBean) getArticleItemBean(); //String resourcePath = articleItemBean.getArticleResourcePath(); addCategoryEditor(p); p.getChildren().add(WFUtil.getBreak()); p.getChildren().add(WFUtil.getBreak()); p.getChildren().add(WFUtil.getBreak());// WFComponentSelector cs = new WFComponentSelector();// cs.setId(BUTTON_SELECTOR_ID);// cs.setDividerText(" "); HtmlCommandButton saveButton = localizer.getButtonVB(SAVE_ID, "save", this);// HtmlCommandButton saveButton = WFUtil.getButtonVB(SAVE_ID, WFPage.CONTENT_BUNDLE + "save", this);// cs.add(saveButton);// cs.add(WFUtil.getButtonVB(FOR_REVIEW_ID, bref + "for_review", this));// cs.add(WFUtil.getButtonVB(PUBLISH_ID, bref + "publish", this));// cs.add(WFUtil.getButtonVB(REWRITE_ID, bref + "rewrite", this));// cs.add(WFUtil.getButtonVB(REJECT_ID, bref + "reject", this));// cs.add(WFUtil.getButtonVB(DELETE_ID, bref + "delete", this));// cs.add(WFUtil.getButtonVB(CANCEL_ID, bref + "cancel", this));// cs.setSelectedId(CANCEL_ID, true);// p.getChildren().add(cs); p.getChildren().add(saveButton); mainContainer.add(p); //WFComponentSelector editorSelector = new WFComponentSelector(); //editorSelector.setId(EDITOR_SELECTOR_ID); //editorSelector.add(mainContainer); //editorSelector.add(getCategoryEditContainer());// FileUploadForm f = new FileUploadForm(this, FILE_UPLOAD_ID, FILE_UPLOAD_CANCEL_ID); //editorSelector.add(getRelatedContentItemsContainer()); //editorSelector.setSelectedId(ARTICLE_EDITOR_ID, true); //return editorSelector; return mainContainer; } | 57000 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57000/5db26355cf68616cbd8859fa37cd6aa73d783808/EditArticleView.java/buggy/src/java/com/idega/block/article/component/EditArticleView.java |
|
p.getChildren().add(saveButton); mainContainer.add(p); | HtmlCommandButton saveButton = localizer.getButtonVB(SAVE_ID, "save", this); mainContainer.getChildren().add(saveButton); | public UIComponent getEditContainer() { IWContext iwc = IWContext.getInstance(); WFResourceUtil localizer = WFResourceUtil.getResourceUtilArticle();// String bref = WFPage.CONTENT_BUNDLE + "."; WFContainer mainContainer = new WFContainer(); mainContainer.setId(ARTICLE_EDITOR_ID); WFErrorMessages em = new WFErrorMessages(); em.addErrorMessage(HEADLINE_ID); em.addErrorMessage(TEASER_ID);// em.addErrorMessage(PUBLISHED_FROM_DATE_ID);// em.addErrorMessage(PUBLISHED_TO_DATE_ID); em.addErrorMessage(SAVE_ID); mainContainer.add(em); //Saving the state of the articleItemBean specially because the scpoe //of this bean now is 'request' not 'session' UISaveState beanSaveState = new UISaveState(); ValueBinding binding = WFUtil.createValueBinding("#{"+ARTICLE_ITEM_BEAN_ID+"}"); beanSaveState.setId("articleItemBeanSaveState"); beanSaveState.setValueBinding("value",binding); mainContainer.add(beanSaveState); HtmlPanelGrid p = WFPanelUtil.getPlainFormPanel(2); //Language dropdown p.getChildren().add(WFUtil.group(localizer.getTextVB("language"), WFUtil.getText(":"))); UIComponent langDropdown = getLanguageDropdownMenu(); p.getChildren().add(langDropdown); p.getChildren().add(WFUtil.group(localizer.getTextVB("headline"), WFUtil.getText(":")));// p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "language"), WFUtil.getText(":"))); HtmlInputText headlineInput = WFUtil.getInputText(HEADLINE_ID, ref + "headline"); headlineInput.setSize(70); p.getChildren().add(headlineInput); //HtmlSelectOneMenu localeMenu = WFUtil.getSelectOneMenu(LOCALE_ID, ref + "allLocales", ref + "pendingLocaleId"); //localeMenu.setOnchange("document.forms[0].submit();"); //p.getChildren().add(localeMenu); p.getChildren().add(WFUtil.group(localizer.getTextVB("author"), WFUtil.getText(":"))); HtmlInputText authorInput = WFUtil.getInputText(AUTHOR_ID, ref + "author"); authorInput.setSize(70); User user = iwc.getCurrentUser(); if(user!=null){ String userName = user.getName(); getArticleItemBean().setAuthor(userName); } p.getChildren().add(authorInput); //Article body p.getChildren().add(WFUtil.group(localizer.getTextVB("body"), WFUtil.getText(":"))); HTMLArea bodyArea = WFUtil.getHtmlAreaTextArea(BODY_ID, ref + "body", "500px", "400px"); //HTMLArea bodyArea = WFUtil.getHtmlAreaTextArea(BODY_ID, ref + "body"); /*bodyArea.addPlugin(HTMLArea.PLUGIN_TABLE_OPERATIONS); bodyArea.addPlugin(HTMLArea.PLUGIN_DYNAMIC_CSS, "3"); bodyArea.addPlugin(HTMLArea.PLUGIN_CSS, "3"); bodyArea.addPlugin(HTMLArea.PLUGIN_CONTEXT_MENU); bodyArea.addPlugin(HTMLArea.PLUGIN_LIST_TYPE); bodyArea.addPlugin(HTMLArea.PLUGIN_CHARACTER_MAP); */ bodyArea.setAllowFontSelection(false); //bodyArea.addPlugin("TableOperations"); //bodyArea.addPlugin("Template"); //bodyArea.addPlugin("Forms"); //bodyArea.addPlugin("FormOperations"); //bodyArea.addPlugin("EditTag"); //bodyArea.addPlugin("Stylist"); //bodyArea.addPlugin("CSS"); //bodyArea.addPlugin("DynamicCSS"); //bodyArea.addPlugin("FullPage"); //bodyArea.addPlugin("NoteServer"); //bodyArea.addPlugin("QuickTag"); //bodyArea.addPlugin("InsertSmiley"); //bodyArea.addPlugin("InsertWords"); //bodyArea.addPlugin("ContextMenu"); //bodyArea.addPlugin("LangMarks"); //bodyArea.addPlugin("DoubleClick"); //bodyArea.addPlugin("ListType"); //bodyArea.addPlugin("ImageManager"); p.getChildren().add(WFUtil.group(bodyArea, WFUtil.getBreak())); p.getChildren().add(WFUtil.group(localizer.getTextVB("teaser"), WFUtil.getText(":"))); HtmlInputTextarea teaserArea = WFUtil.getTextArea(TEASER_ID, ref + "teaser", "500px", "60px"); p.getChildren().add(teaserArea); p.getChildren().add(WFUtil.group(localizer.getTextVB("source"), WFUtil.getText(":"))); HtmlInputText sourceArea = WFUtil.getInputText(SOURCE_ID, ref + "source"); sourceArea.setSize(70); p.getChildren().add(sourceArea); p.getChildren().add(WFUtil.getBreak()); p.getChildren().add(WFUtil.getBreak()); // p = WFPanelUtil.getPlainFormPanel(1);/* p.getChildren().add(WFUtil.group(WFUtil.getHeaderTextVB(bref + "created"), WFUtil.getTextVB(ref + "creationDate") ));*/// p.getChildren().add(WFUtil.getText(" "));// UIComponent t = WFUtil.group(localizer.getHeaderTextVB("status"), WFUtil.getText(": "));// t.getChildren().add(WFUtil.getTextVB(ref + "status"));// p.getChildren().add(t); p.getChildren().add(WFUtil.group(localizer.getTextVB("status"), WFUtil.getText(":"))); p.getChildren().add(WFUtil.getTextVB(ref + "status")); p.getChildren().add(WFUtil.group(localizer.getTextVB("current_version"), WFUtil.getText(":"))); p.getChildren().add(WFUtil.getTextVB(ref + "versionName")); p.getChildren().add(WFUtil.getBreak()); p.getChildren().add(WFUtil.getBreak()); // p = WFPanelUtil.getFormPanel(2); p.getChildren().add(WFUtil.group(localizer.getTextVB("comment"), WFUtil.getText(":")));// p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "attachments"), WFUtil.getText(":"))); HtmlInputTextarea commentArea = WFUtil.getTextArea(COMMENT_ID, ref + "comment", "500px", "60px"); p.getChildren().add(commentArea);// WFContainer attachmentContainer = new WFContainer();// attachmentContainer.add(WFUtil.getButtonVB(ADD_ATTACHMENT_ID, bref + "add_attachment", this));// attachmentContainer.add(WFUtil.getBreak());// attachmentContainer.add(getAttachmentList());// p.getChildren().add(attachmentContainer); // mainContainer.add(p); // p = WFPanelUtil.getFormPanel(1);// p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "related_content_items"), WFUtil.getText(":"))); // WFContainer contentItemContainer = new WFContainer(); // contentItemContainer.add(WFUtil.getButtonVB(ADD_RELATED_CONTENT_ITEM_ID, bref + "add_content_item", this));// contentItemContainer.add(WFUtil.getBreak());// contentItemContainer.add(getRelatedContentItemsList());// p.getChildren().add(contentItemContainer);// p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "publishing_date"), WFUtil.getText(":"))); // WFDateInput publishedFromInput = WFUtil.getDateInput(PUBLISHED_FROM_DATE_ID, ref + "case.publishedFromDate");// publishedFromInput.setShowTime(true);// p.getChildren().add(publishedFromInput);// p.getChildren().add(WFUtil.group(WFUtil.getTextVB(bref + "expiration_date"), WFUtil.getText(":"))); // WFDateInput publishedToInput = WFUtil.getDateInput(PUBLISHED_TO_DATE_ID, ref + "case.publishedToDate");// publishedToInput.setShowTime(true);// p.getChildren().add(publishedToInput); // mainContainer.add(p); p.getChildren().add(WFUtil.getBreak()); p.getChildren().add(WFUtil.getBreak());// mainContainer.add(WFUtil.getBreak());// p = WFPanelUtil.getPlainFormPanel(1);// HtmlCommandButton editCategoriesButton = WFUtil.getButtonVB(EDIT_CATEGORIES_ID, bref + "edit_categories", this);// p.getChildren().add(editCategoriesButton); //Temporary taking away folderr location/* p.getChildren().add(WFUtil.group(localizer.getTextVB("folder"), WFUtil.getText(":"))); HtmlInputText folderInput = WFUtil.getInputText(FOLDER_ID, ref + "folderLocation"); if(null==folderInput.getValue() || "".equals(folderInput.getValue())) { String FolderString = ArticleUtil.getArticleYearMonthPath();// System.out.println("Folder "+FolderString); folderInput.setValue(FolderString); } else { File file = new File(folderInput.getValue().toString()); folderInput.setValue(file.getParentFile().getParent()); } folderInput.setSize(70); p.getChildren().add(folderInput); */ p.getChildren().add(WFUtil.getBreak()); //Categories// WebDAVCategories categoriesUI = new WebDAVCategories(); //ArticleItemBean articleItemBean = (ArticleItemBean) getArticleItemBean(); //String resourcePath = articleItemBean.getArticleResourcePath(); addCategoryEditor(p); p.getChildren().add(WFUtil.getBreak()); p.getChildren().add(WFUtil.getBreak()); p.getChildren().add(WFUtil.getBreak());// WFComponentSelector cs = new WFComponentSelector();// cs.setId(BUTTON_SELECTOR_ID);// cs.setDividerText(" "); HtmlCommandButton saveButton = localizer.getButtonVB(SAVE_ID, "save", this);// HtmlCommandButton saveButton = WFUtil.getButtonVB(SAVE_ID, WFPage.CONTENT_BUNDLE + "save", this);// cs.add(saveButton);// cs.add(WFUtil.getButtonVB(FOR_REVIEW_ID, bref + "for_review", this));// cs.add(WFUtil.getButtonVB(PUBLISH_ID, bref + "publish", this));// cs.add(WFUtil.getButtonVB(REWRITE_ID, bref + "rewrite", this));// cs.add(WFUtil.getButtonVB(REJECT_ID, bref + "reject", this));// cs.add(WFUtil.getButtonVB(DELETE_ID, bref + "delete", this));// cs.add(WFUtil.getButtonVB(CANCEL_ID, bref + "cancel", this));// cs.setSelectedId(CANCEL_ID, true);// p.getChildren().add(cs); p.getChildren().add(saveButton); mainContainer.add(p); //WFComponentSelector editorSelector = new WFComponentSelector(); //editorSelector.setId(EDITOR_SELECTOR_ID); //editorSelector.add(mainContainer); //editorSelector.add(getCategoryEditContainer());// FileUploadForm f = new FileUploadForm(this, FILE_UPLOAD_ID, FILE_UPLOAD_CANCEL_ID); //editorSelector.add(getRelatedContentItemsContainer()); //editorSelector.setSelectedId(ARTICLE_EDITOR_ID, true); //return editorSelector; return mainContainer; } | 57000 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57000/5db26355cf68616cbd8859fa37cd6aa73d783808/EditArticleView.java/buggy/src/java/com/idega/block/article/component/EditArticleView.java |
protected void initializeComponent(FacesContext context) { setId(EDIT_ARTICLE_BLOCK_ID); if(clearOnInit){ ArticleItemBean bean = getArticleItemBean(); if(bean!=null){ bean.clear(); } } // WFUtil.invoke(EDIT_ARTICLES_BEAN_ID, "setArticleLinkListener", this, ActionListener.class); add(getEditContainer()); } | 57000 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57000/5db26355cf68616cbd8859fa37cd6aa73d783808/EditArticleView.java/buggy/src/java/com/idega/block/article/component/EditArticleView.java |
||
add(getEditContainer()); | if(isInCreateMode()||isInEditMode()){ add(getEditContainer()); } else if (isInDeleteMode()){ add(getDeleteContainer()); } | protected void initializeComponent(FacesContext context) { setId(EDIT_ARTICLE_BLOCK_ID); if(clearOnInit){ ArticleItemBean bean = getArticleItemBean(); if(bean!=null){ bean.clear(); } } // WFUtil.invoke(EDIT_ARTICLES_BEAN_ID, "setArticleLinkListener", this, ActionListener.class); add(getEditContainer()); } | 57000 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57000/5db26355cf68616cbd8859fa37cd6aa73d783808/EditArticleView.java/buggy/src/java/com/idega/block/article/component/EditArticleView.java |
} | } else if (id.equals(DELETE_ID)) { ArticleItemBean articleItemBean = getArticleItemBean(); articleItemBean.delete(); WFUtil.addMessageVB(ab.findComponent(DELETE_ID),ArticleUtil.IW_BUNDLE_IDENTIFIER, "delete_successful"); } | public void processAction(ActionEvent event) { String id = event.getComponent().getId(); UIComponent rootParent = rootParent = event.getComponent().getParent().getParent().getParent(); EditArticleView ab = (EditArticleView) rootParent.findComponent(EDIT_ARTICLE_BLOCK_ID); if (id.equals(SAVE_ID)) { //We have the save button pressed boolean saveSuccessful=false; saveSuccessful = ab.storeArticle(); if(saveSuccessful){ ArticleItemBean articleItemBean = getArticleItemBean(); String fileResourcePath = articleItemBean.getLocalizedArticle().getResourcePath(); WebDAVCategories categoriesUI = (WebDAVCategories) ab.getCategoryEditor(); if(categoriesUI!=null){ categoriesUI.setResourcePath(fileResourcePath); categoriesUI.saveCategoriesSettings(fileResourcePath, categoriesUI); } } clearOnInit=false; } /* else if (id.equals(FOR_REVIEW_ID)) { WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "setRequestedStatus", ContentItemCase.STATUS_READY_FOR_REVIEW); ab.storeArticle(); } else if (id.equals(PUBLISH_ID)) { WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "setRequestedStatus", ContentItemCase.STATUS_PUBLISHED); ab.storeArticle(); } else if (id.equals(REWRITE_ID)) { WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "setRequestedStatus", ContentItemCase.STATUS_REWRITE); ab.storeArticle(); } else if (id.equals(REJECT_ID)) { WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "setRequestedStatus", ContentItemCase.STATUS_DELETED); ab.storeArticle(); } else if (id.equals(DELETE_ID)) { WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "setRequestedStatus", ContentItemCase.STATUS_DELETED); ab.storeArticle(); } else if (id.equals(ADD_IMAGE_ID)) { ab.setEditView(FILE_UPLOAD_FORM_ID); } else if (id.equals(FILE_UPLOAD_CANCEL_ID)) { ab.setEditView(ARTICLE_EDITOR_ID); } else if (id.equals(FILE_UPLOAD_ID)) { ab.setEditView(ARTICLE_EDITOR_ID); } else if (id.equals(CaseListBean.CASE_ID)){ String itemId = WFUtil.getParameter(event.getComponent(), "id"); WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "addRelatedContentItem", new Integer(itemId)); ab.setEditView(ARTICLE_EDITOR_ID); }*/ } | 57000 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57000/5db26355cf68616cbd8859fa37cd6aa73d783808/EditArticleView.java/buggy/src/java/com/idega/block/article/component/EditArticleView.java |
bean.getContentLanguage(); | public void processValueChange(ValueChangeEvent arg0) throws AbortProcessingException { if(arg0.getOldValue()==null) { return; } System.out.println("Language value has changed from "+arg0.getOldValue()+" to "+arg0.getNewValue()); ArticleItemBean bean = getArticleItemBean(); //String articlePath = (String)WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "getArticlePath"); String articlePath = bean.getResourcePath(); //String language = (String)WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "getContentLanguage"); bean.getContentLanguage(); if(null==articlePath) { //Article has not been stored previousley, so nothing have to be done return; } System.out.println("processValueChange: Article path: "+articlePath); //boolean result = ((Boolean)WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "load",articlePath+"/"+arg0.getNewValue()+ArticleItemBean.ARTICLE_SUFFIX)).booleanValue(); //System.out.println("loading other language "+result); //if(result) { //WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "setLanguageChange",arg0.getNewValue().toString()); String langChange = arg0.getNewValue().toString(); bean.setLanguageChange(langChange); Locale locale = new Locale(langChange); bean.setLocale(locale); System.out.println("processValueChange: changint to other language "+langChange); //}else { //if(null!=language) { //result = ((Boolean)WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "load",articlePath+"/"+language+ArticleItemBean.ARTICLE_SUFFIX)).booleanValue(); //bean.setLanguageChange(language); //bean.setLocale(new Locale(language)); //System.out.println("loading other language "+result); //} //} } | 57000 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57000/5db26355cf68616cbd8859fa37cd6aa73d783808/EditArticleView.java/buggy/src/java/com/idega/block/article/component/EditArticleView.java |
|
public void processValueChange(ValueChangeEvent arg0) throws AbortProcessingException { if(arg0.getOldValue()==null) { return; } System.out.println("Language value has changed from "+arg0.getOldValue()+" to "+arg0.getNewValue()); ArticleItemBean bean = getArticleItemBean(); //String articlePath = (String)WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "getArticlePath"); String articlePath = bean.getResourcePath(); //String language = (String)WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "getContentLanguage"); bean.getContentLanguage(); if(null==articlePath) { //Article has not been stored previousley, so nothing have to be done return; } System.out.println("processValueChange: Article path: "+articlePath); //boolean result = ((Boolean)WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "load",articlePath+"/"+arg0.getNewValue()+ArticleItemBean.ARTICLE_SUFFIX)).booleanValue(); //System.out.println("loading other language "+result); //if(result) { //WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "setLanguageChange",arg0.getNewValue().toString()); String langChange = arg0.getNewValue().toString(); bean.setLanguageChange(langChange); Locale locale = new Locale(langChange); bean.setLocale(locale); System.out.println("processValueChange: changint to other language "+langChange); //}else { //if(null!=language) { //result = ((Boolean)WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "load",articlePath+"/"+language+ArticleItemBean.ARTICLE_SUFFIX)).booleanValue(); //bean.setLanguageChange(language); //bean.setLocale(new Locale(language)); //System.out.println("loading other language "+result); //} //} } | 57000 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57000/5db26355cf68616cbd8859fa37cd6aa73d783808/EditArticleView.java/buggy/src/java/com/idega/block/article/component/EditArticleView.java |
||
tb.setSelectedMenuItemId(TASK_ID_MESSAGES); | public void setMessageMode() { WFTabbedPane tb = (WFTabbedPane) findComponent(TASKBAR_ID); tb.setSelectedMenuItemId(TASK_ID_MESSAGES); } | 57000 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57000/5db26355cf68616cbd8859fa37cd6aa73d783808/EditArticleView.java/buggy/src/java/com/idega/block/article/component/EditArticleView.java |
|
WFUtil.addMessageVB(findComponent(SAVE_ID),ArticleUtil.IW_BUNDLE_IDENTIFIER, errorKey); | WFUtil.addErrorMessageVB(findComponent(SAVE_ID),ArticleUtil.IW_BUNDLE_IDENTIFIER, errorKey); | public boolean storeArticle() { try{ getArticleItemBean().store(); setEditMode(EDIT_MODE_EDIT); setUserMessage("article_saved"); return true; } catch(ArticleStoreException ae){ String errorKey = ae.getErrorKey(); WFUtil.addMessageVB(findComponent(SAVE_ID),ArticleUtil.IW_BUNDLE_IDENTIFIER, errorKey); } catch(Exception e){ String errorKey = ArticleStoreException.KEY_ERROR_ON_STORE; WFUtil.addMessageVB(findComponent(SAVE_ID),ArticleUtil.IW_BUNDLE_IDENTIFIER, errorKey); WFUtil.addMessage(findComponent(SAVE_ID),e.getClass().getName()+" : "+e.getMessage()); e.printStackTrace(); } return false; } | 57000 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57000/5db26355cf68616cbd8859fa37cd6aa73d783808/EditArticleView.java/buggy/src/java/com/idega/block/article/component/EditArticleView.java |
WFUtil.addMessageVB(findComponent(SAVE_ID),ArticleUtil.IW_BUNDLE_IDENTIFIER, errorKey); WFUtil.addMessage(findComponent(SAVE_ID),e.getClass().getName()+" : "+e.getMessage()); | WFUtil.addErrorMessageVB(findComponent(SAVE_ID),ArticleUtil.IW_BUNDLE_IDENTIFIER, errorKey); | public boolean storeArticle() { try{ getArticleItemBean().store(); setEditMode(EDIT_MODE_EDIT); setUserMessage("article_saved"); return true; } catch(ArticleStoreException ae){ String errorKey = ae.getErrorKey(); WFUtil.addMessageVB(findComponent(SAVE_ID),ArticleUtil.IW_BUNDLE_IDENTIFIER, errorKey); } catch(Exception e){ String errorKey = ArticleStoreException.KEY_ERROR_ON_STORE; WFUtil.addMessageVB(findComponent(SAVE_ID),ArticleUtil.IW_BUNDLE_IDENTIFIER, errorKey); WFUtil.addMessage(findComponent(SAVE_ID),e.getClass().getName()+" : "+e.getMessage()); e.printStackTrace(); } return false; } | 57000 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57000/5db26355cf68616cbd8859fa37cd6aa73d783808/EditArticleView.java/buggy/src/java/com/idega/block/article/component/EditArticleView.java |
if (getHeadline().trim().equals("")) { | if ( (getHeadline()==null) || (getHeadline().trim().equals("")) ) { | public void store() throws IDOStoreException{ boolean storeOk = true; clearErrorKeys(); if (getHeadline().trim().equals("")) { addErrorKey(KEY_ERROR_HEADLINE_EMPTY); storeOk = false; }// if (getBody().trim().equals("")) {// addErrorKey(KEY_ERROR_BODY_EMPTY);// storeOk = false;// } // if (getRequestedStatus() != null && getRequestedStatus().equals(ContentItemCase.STATUS_PUBLISHED)) {// if (getCase().getPublishedFromDate() == null) {// addErrorKey(KEY_ERROR_PUBLISHED_FROM_DATE_EMPTY);// storeOk = false;// }// } // String filename = getHeadline();// if(null==filename || filename.length()==0) {// filename = "empty";// } if(storeOk){ try { IWUserContext iwuc = IWContext.getInstance(); IWSlideSession session = (IWSlideSession)IBOLookup.getSessionInstance(iwuc,IWSlideSession.class); WebdavRootResource rootResource = session.getWebdavRootResource(); //Setting the path for creating new file/creating localized version/updating existing file String filePath=getResourcePath(); String articleFolderPath=getArticlePath(); if(articleFolderPath!=null) { filePath=articleFolderPath+"/"+getArticleName(); }else { filePath=getArticleResourcePath(); articleFolderPath = getArticlePath(); } boolean hadToCreate = session.createAllFoldersInPath(articleFolderPath); if(hadToCreate){ String fixedFolderURL = session.getURI(articleFolderPath); rootResource.proppatchMethod(fixedFolderURL,PROPERTY_CONTENT_TYPE,"LocalizedFile",true); } else{ rootResource.proppatchMethod(articleFolderPath,PROPERTY_CONTENT_TYPE,"LocalizedFile",true); } String article = getAsXML(); ByteArrayInputStream utf8stream = new ByteArrayInputStream(article.getBytes("UTF-8")); // System.out.println(article); //Conflict fix: uri for creating but path for updating //Note! This is a patch to what seems to be a bug in WebDav //Apparently in verion below works in some cases and the other in other cases. //Seems to be connected to creating files in folders created in same tomcat session or similar //not quite clear... if(rootResource.putMethod(filePath,utf8stream)){ rootResource.proppatchMethod(filePath,PROPERTY_CONTENT_TYPE,ARTICLE_FILENAME_SCOPE,true); } else{ utf8stream = new ByteArrayInputStream(article.getBytes("UTF-8")); String fixedURL = session.getURI(filePath); rootResource.putMethod(fixedURL,utf8stream); rootResource.proppatchMethod(fixedURL,PROPERTY_CONTENT_TYPE,ARTICLE_FILENAME_SCOPE,true); } rootResource.close(); try { //load(filePath); ArticleItemBean newBean = new ArticleItemBean(); newBean.load(filePath); } catch (Exception e) { //storeOk = false; //e.printStackTrace(); throw new ArticleStoreException(e.getMessage()); } } catch (IOException e1) { storeOk = false; e1.printStackTrace(); } catch (XMLException e) { storeOk = false; e.printStackTrace(); } } if (storeOk) { if (getRequestedStatus() != null) { setStatus(getRequestedStatus()); setRequestedStatus(null); } }else { throw new ArticleStoreException(); } } | 57000 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57000/047dadd8b67b5557b5bc84c6d8ba35681181d9fd/ArticleItemBean.java/buggy/src/java/com/idega/block/article/bean/ArticleItemBean.java |
_broker.shutdown(); | _broker.shutdown(); | synchronized void done() { _brokerUsers--; if ((_brokerUsers == 0) && (_broker != null)) { _broker.shutdown(); _broker = null; } } | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/b7f9d643c900f61a9947957e62fbc64667eff85e/WM.java/clean/webmacro/src/org/webmacro/WM.java |
synchronized Broker init() throws InitException | synchronized Broker init() throws InitException | synchronized Broker init() throws InitException { _brokerUsers++; if (_broker == null) { try { _broker = (_config == null) ? new Broker() : new Broker(_config); } catch (InitException e) {e.printStackTrace(); _broker = null; _brokerUsers = 0; throw e; // rethrow } catch (Throwable t) { _broker = null; _brokerUsers = 0; throw new InitException("An unexpected exception was raised during initialization. This is bad,\n" +"there is either a bug in WebMacro, or your configuration is messed up:\n" + t +"\nHere are some clues: if you got a ClassNotFound exception, either\n" +"something is missing from your classpath (odd since this code ran)\n" +"or your JVM is failing some important classfile due to bytecode problems\n" +"and then claiming that, it does not exist... you might also see some kind\n" +"of VerifyException or error in that case. If you suspect something like\n" +"this is happening, recompile the WebMacro base classes with your own Java\n" +"compiler and libraries--usually that helps. It could also be that your\n" +"JVM is not new enough. Again you could try recompiling, but if it is\n" +"older than Java 1.1.7 you might be out of luck. If none of this helps,\n" +"please join the WebMacro mailing list and let us know about the problem,\n" +"because yet another possibility is WebMacro has a bug--and anyway, we \n" +"might know a workaround, or at least like to hear about the bug.\n"); } } return _broker; } | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/b7f9d643c900f61a9947957e62fbc64667eff85e/WM.java/clean/webmacro/src/org/webmacro/WM.java |
_brokerUsers = 0; | _brokerUsers = 0; | synchronized Broker init() throws InitException { _brokerUsers++; if (_broker == null) { try { _broker = (_config == null) ? new Broker() : new Broker(_config); } catch (InitException e) {e.printStackTrace(); _broker = null; _brokerUsers = 0; throw e; // rethrow } catch (Throwable t) { _broker = null; _brokerUsers = 0; throw new InitException("An unexpected exception was raised during initialization. This is bad,\n" +"there is either a bug in WebMacro, or your configuration is messed up:\n" + t +"\nHere are some clues: if you got a ClassNotFound exception, either\n" +"something is missing from your classpath (odd since this code ran)\n" +"or your JVM is failing some important classfile due to bytecode problems\n" +"and then claiming that, it does not exist... you might also see some kind\n" +"of VerifyException or error in that case. If you suspect something like\n" +"this is happening, recompile the WebMacro base classes with your own Java\n" +"compiler and libraries--usually that helps. It could also be that your\n" +"JVM is not new enough. Again you could try recompiling, but if it is\n" +"older than Java 1.1.7 you might be out of luck. If none of this helps,\n" +"please join the WebMacro mailing list and let us know about the problem,\n" +"because yet another possibility is WebMacro has a bug--and anyway, we \n" +"might know a workaround, or at least like to hear about the bug.\n"); } } return _broker; } | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/b7f9d643c900f61a9947957e62fbc64667eff85e/WM.java/clean/webmacro/src/org/webmacro/WM.java |
final public Broker getBroker() { // this method can be unsynch. because the broker manages its own // state, plus the only time the _broker will be shutdown or null // is after the last servlet has shutdown--so why would anyone be // accessing us then? if they do the _broker will throw exceptions // complaining that it has been shut down, or they'll get a null here. return _broker; } | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/b7f9d643c900f61a9947957e62fbc64667eff85e/WM.java/clean/webmacro/src/org/webmacro/WM.java |
||
final public String getConfig(String key) | final public String getConfig(String key) | final public String getConfig(String key) throws NotFoundException { return (String) _broker.get("config", key); } | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/b7f9d643c900f61a9947957e62fbc64667eff85e/WM.java/clean/webmacro/src/org/webmacro/WM.java |
final public Template getTemplate(String key) | final public Template getTemplate(String key) | final public Template getTemplate(String key) throws NotFoundException { return (Template) _tmplProvider.get(key); } | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/b7f9d643c900f61a9947957e62fbc64667eff85e/WM.java/clean/webmacro/src/org/webmacro/WM.java |
return (Template) _tmplProvider.get(key); | return (Template) _tmplProvider.get(key); | final public Template getTemplate(String key) throws NotFoundException { return (Template) _tmplProvider.get(key); } | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/b7f9d643c900f61a9947957e62fbc64667eff85e/WM.java/clean/webmacro/src/org/webmacro/WM.java |
final public String getURL(String url) | final public String getURL(String url) | final public String getURL(String url) throws NotFoundException { return (String) _urlProvider.get(url); } | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/b7f9d643c900f61a9947957e62fbc64667eff85e/WM.java/clean/webmacro/src/org/webmacro/WM.java |
final public WebContext getWebContext(HttpServletRequest req, HttpServletResponse resp) | final public WebContext getWebContext(HttpServletRequest req, HttpServletResponse resp) | final public WebContext getWebContext(HttpServletRequest req, HttpServletResponse resp) { SimpleStack cstack = (SimpleStack) _webContextCache.get(); WebContext c = (WebContext) cstack.pop(); if (c == null) { c = _webContext.newInstance(req,resp); } c.setContextPool(cstack); return c; } | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/b7f9d643c900f61a9947957e62fbc64667eff85e/WM.java/clean/webmacro/src/org/webmacro/WM.java |
return c; | return c; | final public WebContext getWebContext(HttpServletRequest req, HttpServletResponse resp) { SimpleStack cstack = (SimpleStack) _webContextCache.get(); WebContext c = (WebContext) cstack.pop(); if (c == null) { c = _webContext.newInstance(req,resp); } c.setContextPool(cstack); return c; } | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/b7f9d643c900f61a9947957e62fbc64667eff85e/WM.java/clean/webmacro/src/org/webmacro/WM.java |
ImageIcon addUserIcon = new ImageIcon("graphx/1rightarrow_nuvola32.png"); ImageIcon removeUserIcon = new ImageIcon("graphx/1leftarrow_nuvola32.png"); ImageIcon addGroupIcon = new ImageIcon("graphx/addUser_kusers_nuvola48_mod3.png"); ImageIcon removeGroupIcon = new ImageIcon("graphx/removeUser_kusers_nuvola48_mod3.png"); | ImageIcon addUserIcon = new ImageIcon("resources/graphx/1rightarrow_nuvola32.png"); ImageIcon removeUserIcon = new ImageIcon("resources/graphx/1leftarrow_nuvola32.png"); ImageIcon addGroupIcon = new ImageIcon("resources/graphx/addUser_kusers_nuvola48_mod3.png"); ImageIcon removeGroupIcon = new ImageIcon("resources/graphx/removeUser_kusers_nuvola48_mod3.png"); | void createActionButtons() { saveBtn = new JButton("Save"); ImageIcon addUserIcon = new ImageIcon("graphx/1rightarrow_nuvola32.png"); ImageIcon removeUserIcon = new ImageIcon("graphx/1leftarrow_nuvola32.png"); ImageIcon addGroupIcon = new ImageIcon("graphx/addUser_kusers_nuvola48_mod3.png"); ImageIcon removeGroupIcon = new ImageIcon("graphx/removeUser_kusers_nuvola48_mod3.png"); addUserBtn = new JButton(addUserIcon); removeUserBtn = new JButton(removeUserIcon); addGroupBtn = new JButton(addGroupIcon); removeGroupBtn = new JButton(removeGroupIcon); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/c24ebf508ce40c35b2c509bdba29698588ce1204/GroupsTab.java/buggy/components/tools/admin/src/adminTool/groupPanel/GroupsTab.java |
public RubyClass newSubClass(String name, RubyModule parent) { return new ProcMetaClass(name, this, parent); | public RubyClass newSubClass(String name, SinglyLinkedList parentCRef) { return new ProcMetaClass(name, this, parentCRef); | public RubyClass newSubClass(String name, RubyModule parent) { return new ProcMetaClass(name, this, parent); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/a1b8fc1d456e3d5c6e01579b88773383068aa85c/ProcMetaClass.java/clean/src/org/jruby/runtime/builtin/meta/ProcMetaClass.java |
this(ruby, null); } | this(ruby, null); } | public RubyObject(Ruby ruby) { this(ruby, null); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyObject.java/buggy/org/jruby/RubyObject.java |
int len = args.length; if (len < min || (max > -1 && len > max)) { throw new RubyArgumentException(getRuby(), "wrong number of arguments"); } return len; } | int len = args.length; if (len < min || (max > -1 && len > max)) { throw new RubyArgumentException(getRuby(), "wrong number of arguments"); } return len; } | protected int argCount(RubyObject[] args, int min, int max) { int len = args.length; if (len < min || (max > -1 && len > max)) { throw new RubyArgumentException(getRuby(), "wrong number of arguments"); } return len; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyObject.java/buggy/org/jruby/RubyObject.java |
ruby.getIter().push( ruby.isBlockGiven() ? RubyIter.ITER_PRE : RubyIter.ITER_NOT); funcall(getRuby().intern("initialize"), args); ruby.getIter().pop(); } | ruby.getIter().push( ruby.isBlockGiven() ? RubyIter.ITER_PRE : RubyIter.ITER_NOT); funcall(getRuby().intern("initialize"), args); ruby.getIter().pop(); } | public void callInit(RubyObject[] args) { ruby.getIter().push( ruby.isBlockGiven() ? RubyIter.ITER_PRE : RubyIter.ITER_NOT); funcall(getRuby().intern("initialize"), args); ruby.getIter().pop(); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyObject.java/buggy/org/jruby/RubyObject.java |
if (type.isAssignableFrom(getClass())) { return this; } RubyObject result = null; try { result = funcall(getRuby().intern(method)); } catch (RubyNameException rnExcptn) { throw new RubyTypeException( getRuby(), "failed to convert " + getRubyClass().toName() + " into " + className); } if (!type.isAssignableFrom(result.getClass())) { throw new RubyTypeException( getRuby(), getRubyClass().toName() + "#" + method + " should return " + className); } return result; } | if (type.isAssignableFrom(getClass())) { return this; } RubyObject result = null; try { result = funcall(getRuby().intern(method)); } catch (RubyNameException rnExcptn) { throw new RubyTypeException( getRuby(), "failed to convert " + getRubyClass().toName() + " into " + className); } if (!type.isAssignableFrom(result.getClass())) { throw new RubyTypeException( getRuby(), getRubyClass().toName() + "#" + method + " should return " + className); } return result; } | public RubyObject convertType(Class type, String className, String method) { if (type.isAssignableFrom(getClass())) { return this; } RubyObject result = null; try { result = funcall(getRuby().intern(method)); } catch (RubyNameException rnExcptn) { throw new RubyTypeException( getRuby(), "failed to convert " + getRubyClass().toName() + " into " + className); //} catch (RubyS rnExcptn) { } if (!type.isAssignableFrom(result.getClass())) { throw new RubyTypeException( getRuby(), getRubyClass().toName() + "#" + method + " should return " + className); } return result; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyObject.java/buggy/org/jruby/RubyObject.java |
getSingletonClass().defineMethod(name, method); } | getSingletonClass().defineMethod(name, method); } | public void defineSingletonMethod(String name, RubyCallbackMethod method) { getSingletonClass().defineMethod(name, method); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyObject.java/buggy/org/jruby/RubyObject.java |
return n == null ? getRuby().getNil() : n.eval(getRuby(), this); } | return n == null ? getRuby().getNil() : n.eval(getRuby(), this); } | public RubyObject eval(Node n) { return n == null ? getRuby().getNil() : n.eval(getRuby(), this); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyObject.java/buggy/org/jruby/RubyObject.java |
getSingletonClass().includeModule(module); } | getSingletonClass().includeModule(module); } | public void extendObject(RubyModule module) { getSingletonClass().includeModule(module); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyObject.java/buggy/org/jruby/RubyObject.java |
return funcall(mid, new RubyPointer(args)); } | return funcall(mid, new RubyPointer(args)); } | public RubyObject funcall(RubyId mid, RubyObject[] args) { return funcall(mid, new RubyPointer(args)); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyObject.java/buggy/org/jruby/RubyObject.java |
return getRubyClass().call(this, mid, args, 0); } | return getRubyClass().call(this, mid, args, 0); } | public RubyObject funcall3(RubyId mid, RubyPointer args) { return getRubyClass().call(this, mid, args, 0); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyObject.java/buggy/org/jruby/RubyObject.java |
return getRubyClass(); } | return getRubyClass(); } | public RubyModule getClassVarSingleton() { return getRubyClass(); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyObject.java/buggy/org/jruby/RubyObject.java |
return getInstanceVar(getRuby().intern(name)); } | return getInstanceVar(getRuby().intern(name)); } | public RubyObject getInstanceVar(String name) { return getInstanceVar(getRuby().intern(name)); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyObject.java/buggy/org/jruby/RubyObject.java |
if (instanceVariables == null) { instanceVariables = new RubyHashMap(); } return instanceVariables; } | if (instanceVariables == null) { instanceVariables = new RubyHashMap(); } return instanceVariables; } | public RubyMap getInstanceVariables() { if (instanceVariables == null) { instanceVariables = new RubyHashMap(); } return instanceVariables; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyObject.java/buggy/org/jruby/RubyObject.java |
return RubyObject.class; } | return RubyObject.class; } | public Class getJavaClass() { return RubyObject.class; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyObject.java/buggy/org/jruby/RubyObject.java |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.