Opened 9 years ago
Closed 9 years ago
#818 closed (fixed)
Extra "null" button sometimes appears when selecting files
Reported by: | olle | Owned by: | olle |
---|---|---|---|
Milestone: | Proteios SE 2.19.0 | Keywords: | |
Cc: |
Description
An extra "null" button somtimes appears when selecting files, e.g. during "Spectrum Search->X!Tandem" and "Hits Import->Non gel based", when a sub-directory is entered at file selection. The extra button appears to the right of the expected buttons and has name "null".
Change History (4)
comment:1 Changed 9 years ago by
Status: | new → assigned |
---|
comment:2 Changed 9 years ago by
Problem discussion:
- When the extra "null" button appeared during "Hits Import->Non gel based", after a sub-directory had been entered at file selection, the link coupled to the button was
<A HREF="javascript:addField('formOfFile','continueSelection','true');submitFormAs('formOfFile','org.proteios.action.hit.ImportHitsNonGelWizardStep1b');"
>null</A>
The submit part is the one expected for the "Import
" button on the same web page, but with an added parametercontinueSelection
with value set totrue
. The latter parameter is coupled to valid parameterVBoolean VCONTINUESELECTION
, that was defined in classViewActiveDirectory
in changeset [4465] in Ticket #805 (Support for simplifying ProteomeXchange submission). However, since the feature to continue selecting files of the same type from different directories currently isn't activated for hits import, no button with added parametercontinueSelection
set totrue
should appear. - The
continueSelection
parameter value is in controlled by local variableString nextContinueSelectionButtonName
, and a button should only appear if the latter string is neithernull
, nor an empty string. The button name is set by callingfetchNextButtonName(select, selectMoveDir, NextContinueSelectionButtonNameField.VPARAM, null)
. Private methodString fetchNextButtonName(Boolean select, Boolean selectMoveDir, VString fieldName, String defaultName)
returnsnull
if argumentselect
isfalse
, otherwise a string is searched in several ways, until a non-null, non-blank value is found:
1. If argumentselectMoveDir
istrue
, string "Next
" is returned.
2. Posted value of valid parameterfieldName
.
3. Session attributefieldName
.
4. Value of argumentdefaultName
.
Added debug output revealed that when the posted value of valid parameterfieldName
was intended to benull
, the four-character string "null
" was returned instead, leading to a button being created with name "null
".
Suggested solution:
- Class/file
action/directory/ViewActiveDirectory.java
inclient/servlet/
should be updated in private methodString fetchNextButtonName(Boolean select, Boolean selectMoveDir, VString fieldName, String defaultName)
to exchange a four-character string "null
" for anull
value, when obtained from a posted parameter or session attribute value. This has the side effect that no button can be created in this way having the name "null
", but this is unlikely to cause any problems.
comment:3 Changed 9 years ago by
(In [4525]) Refs #818. Refs #805. File selection updated to avoid creating extra unwanted buttons, when navigating the directory tree to find files to select:
- Class/file
action/directory/ViewActiveDirectory.java
inclient/servlet/
updated in private methodString fetchNextButtonName(Boolean select, Boolean selectMoveDir, VString fieldName, String defaultName)
to exchange a four-character string "null
" for anull
value, when obtained from a posted parameter or session attribute value. This has the side effect that no button can be created in this way having the name "null
", but this is unlikely to cause any problems.
comment:4 Changed 9 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Ticket closed as the added update seems to have fixed the problem.
Note: See
TracTickets for help on using
tickets.
Ticket accepted.