[
https://issues.apache.org/jira/browse/TAPESTRY-2278?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12580208#action_12580208
]
homburgs edited comment on TAPESTRY-2278 at 3/18/08 6:34 PM:
-----------------------------------------------------------------
i dont think so (in my situation),
sample: i have to select able fields
field "project" depends on the selected value of field "category"
<select id="category">
<option value="1" selected>Category One</option>
<option value="2">Category Two</option>
</select>
<select id="project">
</select>
if user selects category two i send an ajax request to find all projects for
category id 2
and put the resultset via JSON into the project selcetor.
in my case i dont want that one project ist "pre-selected" (if i use
BlankOption.NEVER),
because my users than submit the form with pre-selected project value without
turn on their brain.
in the moment i must use a trick: add a dummy entry to my selectmodel with id
like -1 or 0
i hope you understand my "germano-americano" ;-)
was (Author: homburgs):
i dont think so (in my situation),
sample: i have to select able fields
field "two" depends on the selected value of field "two"
<select id="category">
<option value="1" selected>Category One</option>
<option value="2">Category Two</option>
</select>
<select id="project">
</select>
if user selects category two i send an ajax request to find all projects for
category id 2
and put the resultset via JSON into the project selcetor.
in my case i dont want that one project ist "pre-selected" (if i use
BlankOption.NEVER),
because my users than submit the form with pre-selected project value without
turn on their brain.
in the moment i must use a trick: add a dummy entry to my selectmodel with id
like -1 or 0
i hope you understand my "germano-americano" ;-)
> BlankOption value in Select component should be configurable
> ------------------------------------------------------------
>
> Key: TAPESTRY-2278
> URL: https://issues.apache.org/jira/browse/TAPESTRY-2278
> Project: Tapestry
> Issue Type: Improvement
> Components: tapestry-core
> Affects Versions: 5.0.11
> Reporter: Sven Homburg
> Fix For: 5.0.12
>
>
> i often use the option value of a select component holding id's for database
> entities.
> the id's type are most numeric values, so my problem is:
> i attached an ajax request that sends each change from the select component.
> the following method catch the event
> @OnEvent(component = "inputProject", value = "change")
> JSONValue projectIdChanged(long projectId)
> {
> .....
> return mapper.toJSON(resultList);
> }
> if the user select the blank option
> the component throws a NumberFormatException
> so it were cool, if i declare the empty option value by my self.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]