Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!

Giomar Guevara

Ranch Hand
+ Follow
since Oct 18, 2006
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Giomar Guevara

HI,

I want to create a mask that accepts letter with accents like éçè etc...

I'm using \p{L} but seems not to work


<var>
<var-name>mask</var-name>
<var-value>^[a-zA-Z\d\ \-,\p{L}']+$</var-value>
</var>


any ideas?
11 years ago
I'm writing an Eclipse plugin (following an example I found on the net) and try to load small icons in a table. In my LabelProvider class I have this:

static {
String iconPath = "icons/";
imageRegistry.put(
CHECKED_IMAGE,
ImageDescriptor.createFromFile(
EbbTableViewer.class,
iconPath + CHECKED_IMAGE + ".gif"));

... more the same...

}

and here's the method that gets the image:

private Image getImage(boolean isSelected) {
String key = isSelected ? CHECKED_IMAGE : UNCHECKED_IMAGE;
return imageRegistry.get(key);
}

But no image is drawn. I got this error:

Unable to create resource File ImageDescriptor

Any ideas?
11 years ago
I`m trying to lunch an RCP application (I`m following this tutorial:
http://www.vogella.de/articles/EclipseJFaceTable/article.html#labelprovider)
but I got the following error:

!SESSION 2008-09-19 16:21:16.995 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.6.0_06
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=fr_CA
Framework arguments: -application Woden.application
Command-line arguments: -application Woden.application -data C:\WORKSPACE/../runtime-Woden.application -dev file:C:/WORKSPACE/.metadata/.plugins/org.eclipse.pde.core/Woden.application/dev.properties -os win32 -ws win32 -arch x86

This is a continuation of log file C:\runtime-Woden.application\.metadata\.bak_0.log
Created Time: 2008-09-19 16:21:18.902

!ENTRY org.eclipse.jface 4 2 2008-09-19 16:21:18.902
!MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.jface".
!STACK 0
java.lang.NullPointerException
at org.eclipse.jface.viewers.ViewerColumn.refresh(ViewerColumn.java:135)
at org.eclipse.jface.viewers.AbstractTableViewer.doUpdateItem(AbstractTableViewer.java:386)
at org.eclipse.jface.viewers.StructuredViewer$UpdateItemSafeRunnable.run(StructuredViewer.java:466)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
at org.eclipse.core.runtime.Platform.run(Platform.java:857)
at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:46)
at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:199)
at org.eclipse.jface.viewers.StructuredViewer.updateItem(StructuredViewer.java:2026)
at org.eclipse.jface.viewers.AbstractTableViewer.createItem(AbstractTableViewer.java:264)
at org.eclipse.jface.viewers.AbstractTableViewer.internalRefreshAll(AbstractTableViewer.java:741)
at org.eclipse.jface.viewers.AbstractTableViewer.internalRefresh(AbstractTableViewer.java:633)
at org.eclipse.jface.viewers.AbstractTableViewer.internalRefresh(AbstractTableViewer.java:620)
at org.eclipse.jface.viewers.AbstractTableViewer$2.run(AbstractTableViewer.java:576)
at org.eclipse.jface.viewers.StructuredViewer.preservingSelection(StructuredViewer.java:1368)
at org.eclipse.jface.viewers.StructuredViewer.preservingSelection(StructuredViewer.java:1330)
at org.eclipse.jface.viewers.AbstractTableViewer.inputChanged(AbstractTableViewer.java:574)
at org.eclipse.jface.viewers.ContentViewer.setInput(ContentViewer.java:251)
at org.eclipse.jface.viewers.StructuredViewer.setInput(StructuredViewer.java:1606)
at woden.View.createPartControl(View.java:77)
at org.eclipse.ui.internal.ViewReference.createPartHelper(ViewReference.java:370)
at org.eclipse.ui.internal.ViewReference.createPart(ViewReference.java:227)
at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:592)
at org.eclipse.ui.internal.PartPane.setVisible(PartPane.java:299)
at org.eclipse.ui.internal.ViewPane.setVisible(ViewPane.java:531)
at org.eclipse.ui.internal.presentations.PresentablePart.setVisible(PresentablePart.java:179)
at org.eclipse.ui.internal.presentations.util.PresentablePartFolder.select(PresentablePartFolder.java:268)
at org.eclipse.ui.internal.presentations.util.LeftToRightTabOrder.select(LeftToRightTabOrder.java:65)
at org.eclipse.ui.internal.presentations.util.TabbedStackPresentation.selectPart(TabbedStackPresentation.java:400)
at org.eclipse.ui.internal.PartStack.refreshPresentationSelection(PartStack.java:1256)
at org.eclipse.ui.internal.PartStack.setSelection(PartStack.java:1209)
at org.eclipse.ui.internal.PartStack.showPart(PartStack.java:1604)
at org.eclipse.ui.internal.PartStack.createControl(PartStack.java:649)
at org.eclipse.ui.internal.PartStack.createControl(PartStack.java:576)
at org.eclipse.ui.internal.PartSashContainer.createControl(PartSashContainer.java:564)
at org.eclipse.ui.internal.PerspectiveHelper.activate(PerspectiveHelper.java:270)
at org.eclipse.ui.internal.Perspective.onActivate(Perspective.java:931)
at org.eclipse.ui.internal.WorkbenchPage.onActivate(WorkbenchPage.java:2515)
at org.eclipse.ui.internal.WorkbenchWindow$23.run(WorkbenchWindow.java:2837)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:67)
at org.eclipse.ui.internal.WorkbenchWindow.setActivePage(WorkbenchWindow.java:2818)
at org.eclipse.ui.internal.WorkbenchWindow.busyOpenPage(WorkbenchWindow.java:735)
at org.eclipse.ui.internal.Workbench$20.runWithException(Workbench.java:1023)
at org.eclipse.ui.internal.StartupThreading$StartupRunnable.run(StartupThreading.java:31)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:123)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3659)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3296)
at org.eclipse.ui.application.WorkbenchAdvisor.openWindows(WorkbenchAdvisor.java:801)
at org.eclipse.ui.internal.Workbench$25.runWithException(Workbench.java:1342)
at org.eclipse.ui.internal.StartupThreading$StartupRunnable.run(StartupThreading.java:31)
at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:152)
at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:118)
at org.eclipse.swt.widgets.Display.syncExec(Display.java:4097)
at org.eclipse.ui.internal.StartupThreading.runWithoutExceptions(StartupThreading.java:94)
at org.eclipse.ui.internal.Workbench.init(Workbench.java:1337)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2319)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2219)
at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:289)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:461)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at woden.Application.start(Application.java:20)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:169)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:363)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:176)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:508)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:447)
at org.eclipse.equinox.launcher.Main.run(Main.java:1173)
at org.eclipse.equinox.launcher.Main.main(Main.java:1148)
!SESSION 2008-09-19 16:23:48.668 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.6.0_06
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=fr_CA
Framework arguments: -application Woden.application
Command-line arguments: -application Woden.application -data C:\WORKSPACE/../runtime-Woden.application -dev file:C:/WORKSPACE/.metadata/.plugins/org.eclipse.pde.core/Woden.application/dev.properties -os win32 -ws win32 -arch x86
11 years ago
I want to get the difference between 2 dates and get it in hours....

How can I do that?
13 years ago
I have an input text that should be filled out only if a checkbox (p1_checkIn) is checked:

This is my code:

<field depends="validwhen" property="p1_checkInReason">
<msg key="errors.required" name="validwhen"/>
<arg key="ae.PassengerInfoForm.block.p1_checkInReason" name="validwhen" position="0" resource="false"/>
<var>
<var-name>test</var-name><var-value>(p1_checkIn!='true')</var-value>
</var>
</field>

I'm not sure if p1_checkIn!='true' is correct
13 years ago
Hi,

I have this css code for a ul list but when I print the page out the bullets don't appear

UL.standard li{
PADDING-RIGHT: 0px;
PADDING-LEFT: 10px;
PADDING-BOTTOM: 0px;
margin:0px 0px 0px;
list-style-type:none;
list-style-image:none; background: url(../gfx/icons/bullet-square.gif) no-repeat center left; background-position:0 5px;
}
ok thanks
13 years ago
How can I populate a <nested:file> tag after having an error?
13 years ago
ok,thanks
13 years ago
ok but in those cases the presentation layer is not in charge of that,meaning the JSP? you're not supposed to do changes for presentation in another layer...
13 years ago
I use a nested:write tag to write the value of a property.What I need to do is just show part of this value...

name: John Smith

<nested write property="name"/>

For instance, instead of showing: "John Smith",just show "John..."

is there a way to do this with this tag? I think there is no such a thing as a size attribute...

thanks...
13 years ago
I used an <a> tag insted of an input image and It works now...
13 years ago
Ok, I tried what you suggest...

the problem now is that when I hit the save button the action is accessed twice.The first time it get the values of the form correctly but the second time it lose them.
13 years ago
I did so in my js code but the form fields don't get any value

any other idea?
13 years ago
I want to get the values of a form in an action but the problem I have is that they get no value at all.

I have a button that submits the form but it is out of it...what can I do to get these values?
the button has to be outside of the form...


this is my code:




<html:form action="/sam/updateEntity">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<nested:iterate property="availableAttributes">
<tr>
<td valign="top" align="left" width="15%">
<img src="../images/spacer.gif" width="20"/><font class="label"><nested:write property="attribute.name"/>:</font>
</td>
<td width="85%">
<nested:nest property="attribute.attributeType">
<nested:equal property="name" value="single line text area">
<nested:text property="../../value" size="35"/>
</nested:equal>
<nested:equal property="name" value="check box">
<nested:checkbox property="../../value"/>
</nested:equal>
<nested:equal property="name" value="drop down menu">
<nested:select property="../../value">
<html ption value=""> </html ption>//this is an empty option, do not change it
<nested ptions property="../possibleValuesAsStringArray"/>
</nested:select>
</nested:equal>

<nested:equal property="name" value="multi line text area">
<nested:textarea property="../../value" rows="4" cols="28"/>
</nested:equal>
</nested:nest>
</td>
</tr>
</nested:iterate>
<tr>
<td height="10"> </td>
</tr>
<tr>

<td colspan="2">
<hr>

</td>
</tr>
</table>
</html:form>


more code in between....



<html:form action="/sam/updateEntity">
<input type="image" src="../images/button_save_bold.gif" alt="Save Entity" title="Save Entity" accesskey="V">
</html:form>
13 years ago