View Full Version : WebSet psValue nicht in cWebCombo
Ralf
10-Jun-2016, 02:14 AM
Hallo,
WebSet psValue of oWebCombo1 to "wert"
funktioniert nicht im cWebCombo
funktioniert in cWebForm
soll das so ein ?
Es soll ein Wert vorgegeben werden, trotzdem aber eine Auswahl möglich sen.
Ralf
GhostShotIV
10-Jun-2016, 02:37 AM
So etwas funktioniert:
Object oWebCombo1 is a cWebCombo
Set piColumnSpan to 0
Set psLabel to "combo"
Procedure OnFill
Forward Send OnFill
Send AddComboItem "1" "eins"
Send AddComboItem "2" "zwei"
Send AddComboItem "3" "drei"
Send AddComboItem "4" "vier"
Send AddComboItem "5" "fünf"
End_Procedure
Set psValue to "1"
End_Object
Object oWebButton1 is a cWebButton
Set piColumnSpan to 0
Set psCaption to "button"
Procedure OnClick
WebSet psValue of oWebCombo1 to "3"
End_Procedure
End_Object
soll der Wert schon voreingestellt sein, muss einfach "Set psValue" verwendet werden, damit der Wert schon gesetzt ist, bevor das Objekt an den Client übertragen wurde.
WebSet ist nur dann notwendig, wenn eine Property geändert werden soll in einem Objekt, das der Client bereits hat.
Ralf
10-Jun-2016, 03:05 AM
Hello Ghost,
ich hatte den WebSet direkt mit einen Dateifeld gesetzt
WebSet psValue of oWebCombo to Datei.Feld
Das geht nicht.
Wenn ich das vorher in eine Variable schreibe geht das mit der Variablen.
Warum das?
Ralf
Harm Wibier
10-Jun-2016, 06:42 AM
The cWebCombo requires an item to be available with the value you are setting. Unline the windows DbCombo/Combo it doesn't support free text input.
So if no AddComboItem with "wert" as first value is done it will not be able to show "wert" as a value.
You can use Entry_Item and it will then automatically pick up values from the validation table.
Powered by vBulletin® Version 4.2.5 Copyright © 2023 vBulletin Solutions Inc. All rights reserved.