Completed a previous commit, especially to web form library (WSF_FORM).
Updated EiffelStudio wizard.
This commit is contained in:
@@ -20,6 +20,7 @@ port=9090
|
|||||||
### Secure connection settings
|
### Secure connection settings
|
||||||
# enable SSL, with file certificate.
|
# enable SSL, with file certificate.
|
||||||
is_secure=true
|
is_secure=true
|
||||||
|
secure_port=9443
|
||||||
secure_certificate=ca.crt
|
secure_certificate=ca.crt
|
||||||
secure_certificate_key=ca.key
|
secure_certificate_key=ca.key
|
||||||
|
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ feature -- Auth type
|
|||||||
|
|
||||||
note
|
note
|
||||||
copyright: "2011-2020, Jocelyn Fiat, Javier Velilla, Eiffel Software and others"
|
copyright: "2011-2020, Jocelyn Fiat, Javier Velilla, Eiffel Software and others"
|
||||||
|
revised_by: "Alexander Kogtenkov"
|
||||||
license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
|
license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
|
||||||
source: "[
|
source: "[
|
||||||
Eiffel Software
|
Eiffel Software
|
||||||
|
|||||||
@@ -1,26 +1,31 @@
|
|||||||
note
|
note
|
||||||
description: "Summary description for {WSF_APPLICATION_X_WWW_FORM_URLENCODED_HANDLER}."
|
description: "Summary description for {WSF_MULTIPART_FORM_DATA_HANDLER}."
|
||||||
date: "$Date$"
|
date: "$Date$"
|
||||||
revision: "$Revision$"
|
revision: "$Revision$"
|
||||||
|
|
||||||
class
|
class
|
||||||
WSF_APPLICATION_X_WWW_FORM_URLENCODED_HANDLER
|
WSF_MULTIPART_FORM_DATA_HANDLER
|
||||||
|
|
||||||
inherit
|
inherit
|
||||||
WSF_MIME_HANDLER
|
WSF_MIME_HANDLER
|
||||||
|
|
||||||
WSF_MIME_HANDLER_HELPER
|
WSF_MIME_HANDLER_HELPER
|
||||||
|
|
||||||
WSF_VALUE_UTILITIES
|
create
|
||||||
export
|
make
|
||||||
{NONE} all
|
|
||||||
|
feature {NONE} -- Initialization
|
||||||
|
|
||||||
|
make
|
||||||
|
-- Instantiate Current
|
||||||
|
do
|
||||||
end
|
end
|
||||||
|
|
||||||
feature -- Status report
|
feature -- Status report
|
||||||
|
|
||||||
valid_content_type (a_content_type: HTTP_CONTENT_TYPE): BOOLEAN
|
valid_content_type (a_content_type: HTTP_CONTENT_TYPE): BOOLEAN
|
||||||
do
|
do
|
||||||
Result := a_content_type.same_simple_type ({HTTP_MIME_TYPES}.application_x_www_form_encoded)
|
Result := a_content_type.same_simple_type ({HTTP_MIME_TYPES}.multipart_form_data)
|
||||||
end
|
end
|
||||||
|
|
||||||
feature -- Execution
|
feature -- Execution
|
||||||
@@ -28,45 +33,232 @@ feature -- Execution
|
|||||||
handle (a_content_type: HTTP_CONTENT_TYPE; req: WSF_REQUEST;
|
handle (a_content_type: HTTP_CONTENT_TYPE; req: WSF_REQUEST;
|
||||||
a_vars: HASH_TABLE [WSF_VALUE, READABLE_STRING_GENERAL]; a_raw_data: detachable CELL [detachable READABLE_STRING_8])
|
a_vars: HASH_TABLE [WSF_VALUE, READABLE_STRING_GENERAL]; a_raw_data: detachable CELL [detachable READABLE_STRING_8])
|
||||||
local
|
local
|
||||||
l_content: READABLE_STRING_8
|
|
||||||
n, p, i, j: INTEGER
|
|
||||||
s: READABLE_STRING_8
|
s: READABLE_STRING_8
|
||||||
l_name, l_value: READABLE_STRING_8
|
|
||||||
do
|
do
|
||||||
l_content := full_input_data (req)
|
s := full_input_data (req)
|
||||||
if a_raw_data /= Void then
|
if a_raw_data /= Void then
|
||||||
a_raw_data.replace (l_content)
|
a_raw_data.replace (s)
|
||||||
end
|
end
|
||||||
check content_count_same_as_content_length_if_not_chunked: (not req.is_chunked_input) implies (l_content.count = req.content_length_value.to_integer_32) end --| FIXME: truncated value
|
--| FIXME: optimization ... fetch the input data progressively, otherwise we might run out of memory ...
|
||||||
n := l_content.count
|
analyze_multipart_form (req, a_content_type, s, a_vars)
|
||||||
if n > 0 then
|
end
|
||||||
from
|
|
||||||
p := 1
|
feature {NONE} -- Implementation: Form analyzer
|
||||||
until
|
|
||||||
p = 0
|
analyze_multipart_form (req: WSF_REQUEST; a_content_type: HTTP_CONTENT_TYPE; s: READABLE_STRING_8; vars: HASH_TABLE [WSF_VALUE, READABLE_STRING_GENERAL])
|
||||||
loop
|
-- Analyze multipart form content
|
||||||
i := l_content.index_of ('&', p)
|
--| FIXME[2011-06-21]: integrate eMIME parser library
|
||||||
if i = 0 then
|
require
|
||||||
s := l_content.substring (p, n)
|
a_content_type_valid: a_content_type /= Void and not a_content_type.has_error
|
||||||
p := 0
|
s_attached: s /= Void
|
||||||
|
same_content_length: req.content_length_value > 0 implies req.content_length_value.as_integer_32 <= s.count
|
||||||
|
vars_attached: vars /= Void
|
||||||
|
local
|
||||||
|
p,i,next_b: INTEGER
|
||||||
|
l_boundary_prefix: READABLE_STRING_8
|
||||||
|
l_boundary_len: INTEGER
|
||||||
|
l_boundary: detachable READABLE_STRING_8
|
||||||
|
m: READABLE_STRING_8
|
||||||
|
tmp: STRING_8
|
||||||
|
is_crlf: BOOLEAN
|
||||||
|
do
|
||||||
|
l_boundary := a_content_type.parameter ("boundary")
|
||||||
|
if l_boundary /= Void and then not l_boundary.is_empty then
|
||||||
|
p := s.substring_index (l_boundary, 1)
|
||||||
|
if p > 1 then
|
||||||
|
l_boundary_prefix := s.substring (1, p - 1)
|
||||||
|
l_boundary := l_boundary_prefix + l_boundary
|
||||||
else
|
else
|
||||||
s := l_content.substring (p, i - 1)
|
l_boundary_prefix := ""
|
||||||
p := i + 1
|
|
||||||
end
|
end
|
||||||
if not s.is_empty then
|
l_boundary_len := l_boundary.count
|
||||||
j := s.index_of ('=', 1)
|
--| Let's support either %R%N and %N ...
|
||||||
if j > 0 then
|
--| Since both cases might occurs (for instance, our implementation of CGI does not have %R%N)
|
||||||
l_name := s.substring (1, j - 1)
|
--| then let's be as flexible as possible on this.
|
||||||
l_value := s.substring (j + 1, s.count)
|
is_crlf := s [l_boundary_len + 1] = '%R'
|
||||||
add_percent_encoded_string_value_to_table (l_name, l_value, a_vars)
|
from
|
||||||
|
i := 1 + l_boundary_len + 1
|
||||||
|
if is_crlf then
|
||||||
|
i := i + 1 --| +1 = CR = %R
|
||||||
end
|
end
|
||||||
|
next_b := i
|
||||||
|
until
|
||||||
|
i = 0
|
||||||
|
loop
|
||||||
|
next_b := s.substring_index (l_boundary, i)
|
||||||
|
if next_b > 0 then
|
||||||
|
if is_crlf then
|
||||||
|
m := s.substring (i, next_b - 1 - 2) --| 2 = CR LF = %R %N
|
||||||
|
else
|
||||||
|
m := s.substring (i, next_b - 1 - 1) --| 1 = LF = %N
|
||||||
|
end
|
||||||
|
analyze_multipart_form_input (req, m, vars)
|
||||||
|
if s.valid_index (next_b + l_boundary_len + 1) then
|
||||||
|
if is_crlf then
|
||||||
|
if s[next_b + l_boundary_len] = '%R' and s[next_b + l_boundary_len + 1] = '%N' then
|
||||||
|
-- continue
|
||||||
|
else
|
||||||
|
i := 0 -- reached the end
|
||||||
|
end
|
||||||
|
else
|
||||||
|
if s[next_b + l_boundary_len + 1] = '%N' then
|
||||||
|
-- continue
|
||||||
|
else
|
||||||
|
i := 0 -- reached the end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
else
|
||||||
|
i := 0 -- missing end ?
|
||||||
|
req.error_handler.add_custom_error (0, "Invalid form data", "Invalid ending for form data from input")
|
||||||
|
end
|
||||||
|
if i > 0 then
|
||||||
|
i := next_b + l_boundary_len + 1
|
||||||
|
if is_crlf then
|
||||||
|
i := i + 1 --| +1 = CR = %R
|
||||||
|
end
|
||||||
|
end
|
||||||
|
else
|
||||||
|
if is_crlf then
|
||||||
|
i := i + 1
|
||||||
|
end
|
||||||
|
tmp := s.substring (i - 1, s.count).to_string_8
|
||||||
|
tmp.right_adjust
|
||||||
|
-- TODO: check if next condition should not use tmp instead of s
|
||||||
|
if i >= s.count and not l_boundary_prefix.same_string (tmp) then
|
||||||
|
req.error_handler.add_custom_error (0, "Invalid form data", "Invalid ending for form data from input")
|
||||||
|
end
|
||||||
|
i := next_b
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
analyze_multipart_form_input (req: WSF_REQUEST; s: READABLE_STRING_8; vars: HASH_TABLE [WSF_VALUE, READABLE_STRING_GENERAL])
|
||||||
|
-- Analyze multipart entry
|
||||||
|
require
|
||||||
|
s_not_empty: s /= Void and then not s.is_empty
|
||||||
|
local
|
||||||
|
n, i,p, b,e: INTEGER
|
||||||
|
l_name, l_filename, l_content_type: detachable READABLE_STRING_8
|
||||||
|
l_unicode_name: READABLE_STRING_32
|
||||||
|
l_header: detachable READABLE_STRING_8
|
||||||
|
l_content: detachable READABLE_STRING_8
|
||||||
|
l_line: detachable READABLE_STRING_8
|
||||||
|
l_up_file: WSF_UPLOADED_FILE
|
||||||
|
utf: UTF_CONVERTER
|
||||||
|
do
|
||||||
|
from
|
||||||
|
p := 1
|
||||||
|
n := s.count
|
||||||
|
until
|
||||||
|
p > n or l_header /= Void
|
||||||
|
loop
|
||||||
|
inspect s[p]
|
||||||
|
when '%R' then -- CR
|
||||||
|
if
|
||||||
|
n >= p + 3 and then
|
||||||
|
s[p+1] = '%N' and then -- LF
|
||||||
|
s[p+2] = '%R' and then -- CR
|
||||||
|
s[p+3] = '%N' -- LF
|
||||||
|
then
|
||||||
|
l_header := s.substring (1, p + 1)
|
||||||
|
l_content := s.substring (p + 4, n)
|
||||||
|
end
|
||||||
|
when '%N' then
|
||||||
|
if
|
||||||
|
n >= p + 1 and then
|
||||||
|
s[p+1] = '%N'
|
||||||
|
then
|
||||||
|
l_header := s.substring (1, p)
|
||||||
|
l_content := s.substring (p + 2, n)
|
||||||
|
end
|
||||||
|
else
|
||||||
|
end
|
||||||
|
p := p + 1
|
||||||
|
end
|
||||||
|
if l_header /= Void and l_content /= Void then
|
||||||
|
from
|
||||||
|
i := 1
|
||||||
|
n := l_header.count
|
||||||
|
until
|
||||||
|
i = 0 or i > n
|
||||||
|
loop
|
||||||
|
l_line := Void
|
||||||
|
b := i
|
||||||
|
p := l_header.index_of ('%N', b)
|
||||||
|
if p > 0 then
|
||||||
|
if l_header[p - 1] = '%R' then
|
||||||
|
p := p - 1
|
||||||
|
i := p + 2
|
||||||
|
else
|
||||||
|
i := p + 1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if p > 0 then
|
||||||
|
l_line := l_header.substring (b, p - 1)
|
||||||
|
if l_line.starts_with ("Content-Disposition: form-data") then
|
||||||
|
p := l_line.substring_index ("name=", 1)
|
||||||
|
if p > 0 then
|
||||||
|
p := p + 4 --| 4 = ("name=").count - 1
|
||||||
|
if l_line.valid_index (p+1) and then l_line[p+1] = '%"' then
|
||||||
|
p := p + 1
|
||||||
|
e := l_line.index_of ('"', p + 1)
|
||||||
|
else
|
||||||
|
e := l_line.index_of (';', p + 1)
|
||||||
|
if e = 0 then
|
||||||
|
e := l_line.count
|
||||||
|
end
|
||||||
|
end
|
||||||
|
l_name := l_header.substring (p + 1, e - 1)
|
||||||
|
end
|
||||||
|
|
||||||
|
p := l_line.substring_index ("filename=", 1)
|
||||||
|
if p > 0 then
|
||||||
|
p := p + 8 --| 8 = ("filename=").count - 1
|
||||||
|
if l_line.valid_index (p+1) and then l_line[p+1] = '%"' then
|
||||||
|
p := p + 1
|
||||||
|
e := l_line.index_of ('"', p + 1)
|
||||||
|
else
|
||||||
|
e := l_line.index_of (';', p + 1)
|
||||||
|
if e = 0 then
|
||||||
|
e := l_line.count
|
||||||
|
end
|
||||||
|
end
|
||||||
|
l_filename := l_header.substring (p + 1, e - 1)
|
||||||
|
end
|
||||||
|
elseif l_line.starts_with ("Content-Type: ") then
|
||||||
|
l_content_type := l_line.substring (15, l_line.count)
|
||||||
|
end
|
||||||
|
else
|
||||||
|
i := 0
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if l_name /= Void then
|
||||||
|
if l_filename /= Void and then not l_filename.is_empty then
|
||||||
|
if l_content_type = Void then
|
||||||
|
l_content_type := default_content_type
|
||||||
|
end
|
||||||
|
l_unicode_name := utf.utf_8_string_8_to_string_32 (l_name)
|
||||||
|
create l_up_file.make (l_unicode_name, utf.utf_8_string_8_to_escaped_string_32 (l_filename), l_content_type, l_content.count)
|
||||||
|
add_value_to_table (l_unicode_name, l_up_file, vars)
|
||||||
|
--| `l_up_file' might have a new name
|
||||||
|
req.save_uploaded_file (l_up_file, l_content)
|
||||||
|
else
|
||||||
|
add_utf_8_string_value_to_table (l_name, l_content, vars)
|
||||||
|
end
|
||||||
|
else
|
||||||
|
req.error_handler.add_custom_error (0, "unamed multipart entry", Void)
|
||||||
|
end
|
||||||
|
else
|
||||||
|
req.error_handler.add_custom_error (0, "missformed multipart entry", Void)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
default_content_type: STRING = "text/plain"
|
||||||
|
-- Default content type
|
||||||
|
|
||||||
note
|
note
|
||||||
copyright: "2011-2015, Jocelyn Fiat, Javier Velilla, Olivier Ligot, Colin Adams, Eiffel Software and others"
|
copyright: "2011-2020, Jocelyn Fiat, Javier Velilla, Olivier Ligot, Colin Adams, Eiffel Software and others"
|
||||||
license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
|
license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
|
||||||
source: "[
|
source: "[
|
||||||
Eiffel Software
|
Eiffel Software
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ feature -- Core
|
|||||||
deferred
|
deferred
|
||||||
end
|
end
|
||||||
|
|
||||||
based_path (p: STRING): STRING
|
based_path (p: READABLE_STRING_8): STRING
|
||||||
-- Path `p' in the context of the `base_url'
|
-- Path `p' in the context of the `base_url'
|
||||||
do
|
do
|
||||||
if attached base_url as l_base_url then
|
if attached base_url as l_base_url then
|
||||||
@@ -32,7 +32,7 @@ feature -- Core
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
Result := p
|
Result := p.to_string_8
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -106,7 +106,8 @@ feature -- Conversion
|
|||||||
|
|
||||||
url (a_path: READABLE_STRING_8; opts: detachable WSF_API_OPTIONS): STRING
|
url (a_path: READABLE_STRING_8; opts: detachable WSF_API_OPTIONS): STRING
|
||||||
local
|
local
|
||||||
q,f: detachable STRING_8
|
q: detachable STRING_8
|
||||||
|
f: detachable READABLE_STRING_8
|
||||||
l_abs: BOOLEAN
|
l_abs: BOOLEAN
|
||||||
do
|
do
|
||||||
l_abs := False
|
l_abs := False
|
||||||
@@ -115,7 +116,7 @@ feature -- Conversion
|
|||||||
l_abs := opts.boolean_item ("absolute", l_abs)
|
l_abs := opts.boolean_item ("absolute", l_abs)
|
||||||
if attached opts.item ("query") as l_query then
|
if attached opts.item ("query") as l_query then
|
||||||
if attached {READABLE_STRING_8} l_query as s_value then
|
if attached {READABLE_STRING_8} l_query as s_value then
|
||||||
q := s_value
|
q := s_value.to_string_8
|
||||||
elseif attached {ITERABLE [TUPLE [key, value: READABLE_STRING_GENERAL]]} l_query as lst then
|
elseif attached {ITERABLE [TUPLE [key, value: READABLE_STRING_GENERAL]]} l_query as lst then
|
||||||
create q.make_empty
|
create q.make_empty
|
||||||
across
|
across
|
||||||
@@ -154,16 +155,18 @@ feature -- Conversion
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
Result := a_path
|
Result := a_path.to_string_8
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
Result := based_path (a_path)
|
Result := based_path (a_path)
|
||||||
end
|
end
|
||||||
if q /= Void then
|
if q /= Void then
|
||||||
Result.append ("?" + q)
|
Result.append_character ('?')
|
||||||
|
Result.append (q)
|
||||||
end
|
end
|
||||||
if f /= Void then
|
if f /= Void then
|
||||||
Result.append ("#" + f)
|
Result.append_character ('#')
|
||||||
|
Result.append (f)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -26,6 +26,31 @@ feature -- Access
|
|||||||
|
|
||||||
input_type: STRING = "date"
|
input_type: STRING = "date"
|
||||||
|
|
||||||
|
feature -- Element change
|
||||||
|
|
||||||
|
set_date_value (dt: DATE)
|
||||||
|
-- Set value using date `dt`.
|
||||||
|
local
|
||||||
|
y,m,d: INTEGER
|
||||||
|
s: STRING
|
||||||
|
do
|
||||||
|
y := dt.year
|
||||||
|
m := dt.month
|
||||||
|
d := dt.day
|
||||||
|
create s.make (10)
|
||||||
|
s.append_integer (y)
|
||||||
|
s.append_character ('-')
|
||||||
|
if m <= 9 then
|
||||||
|
s.append_character ('0')
|
||||||
|
end
|
||||||
|
s.append_integer (m)
|
||||||
|
s.append_character ('-')
|
||||||
|
if d <= 9 then
|
||||||
|
s.append_character ('0')
|
||||||
|
end
|
||||||
|
s.append_integer (d)
|
||||||
|
set_text_value (s)
|
||||||
|
end
|
||||||
|
|
||||||
feature {NONE} -- Conversion
|
feature {NONE} -- Conversion
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ inherit
|
|||||||
redefine
|
redefine
|
||||||
set_value,
|
set_value,
|
||||||
specific_input_attributes_string,
|
specific_input_attributes_string,
|
||||||
append_child_to_html
|
append_item_to_html
|
||||||
end
|
end
|
||||||
|
|
||||||
WSF_FORM_SELECTABLE_ITEM
|
WSF_FORM_SELECTABLE_ITEM
|
||||||
@@ -97,14 +97,30 @@ feature -- Change
|
|||||||
|
|
||||||
feature {NONE} -- Implementation
|
feature {NONE} -- Implementation
|
||||||
|
|
||||||
append_child_to_html (a_theme: WSF_THEME; a_html: STRING_8)
|
append_item_to_html (a_theme: WSF_THEME; a_html: STRING_8)
|
||||||
-- Specific child element if any.
|
do
|
||||||
--| To redefine if needed
|
Precursor (a_theme, a_html)
|
||||||
|
append_label_to_html (a_theme, a_html)
|
||||||
|
end
|
||||||
|
|
||||||
|
append_label_to_html (a_theme: WSF_THEME; a_html: STRING_8)
|
||||||
|
-- Specific label element if any.
|
||||||
|
local
|
||||||
|
s: READABLE_STRING_8
|
||||||
do
|
do
|
||||||
if attached raw_title as t then
|
if attached raw_title as t then
|
||||||
a_html.append (t)
|
s := t
|
||||||
elseif attached title as t then
|
elseif attached title as t then
|
||||||
a_html.append (a_theme.html_encoded (t))
|
s := a_theme.html_encoded (t)
|
||||||
|
end
|
||||||
|
if s /= Void then
|
||||||
|
if attached css_id as l_id then
|
||||||
|
a_html.append ("<label for=%""+ l_id +"%">")
|
||||||
|
else
|
||||||
|
a_html.append ("<label>")
|
||||||
|
end
|
||||||
|
a_html.append (s)
|
||||||
|
a_html.append ("</label>")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -109,6 +109,7 @@ feature -- Conversion
|
|||||||
local
|
local
|
||||||
l_is_already_selected: BOOLEAN
|
l_is_already_selected: BOOLEAN
|
||||||
h: detachable STRING_8
|
h: detachable STRING_8
|
||||||
|
l_item_html_text: READABLE_STRING_8
|
||||||
do
|
do
|
||||||
a_html.append ("<select name=%""+ name +"%" ")
|
a_html.append ("<select name=%""+ name +"%" ")
|
||||||
if css_id = Void then
|
if css_id = Void then
|
||||||
@@ -128,7 +129,7 @@ feature -- Conversion
|
|||||||
across
|
across
|
||||||
options as o
|
options as o
|
||||||
loop
|
loop
|
||||||
a_html.append ("<option value=%"" + o.item.value + "%" ")
|
a_html.append ("<option value=%"" + html_encoded_string (o.item.value) + "%" ")
|
||||||
-- if not l_is_already_selected then
|
-- if not l_is_already_selected then
|
||||||
if
|
if
|
||||||
o.item.is_selected
|
o.item.is_selected
|
||||||
@@ -137,12 +138,13 @@ feature -- Conversion
|
|||||||
a_html.append (" selected=%"selected%"")
|
a_html.append (" selected=%"selected%"")
|
||||||
end
|
end
|
||||||
-- end
|
-- end
|
||||||
a_html.append (">" + o.item.text + "</option>%N")
|
l_item_html_text := html_encoded_string (o.item.text)
|
||||||
|
a_html.append (">" + l_item_html_text + "</option>%N")
|
||||||
if attached o.item.description as d then
|
if attached o.item.description as d then
|
||||||
if h = Void then
|
if h = Void then
|
||||||
create h.make_empty
|
create h.make_empty
|
||||||
end
|
end
|
||||||
h.append ("<div id=%"" + name + "-" + o.item.value + "%" class=%"option%"><strong>"+ o.item.text +"</strong>:"+ d + "</div>")
|
h.append ("<div id=%"" + name + "-" + html_encoded_string (o.item.value) + "%" class=%"option%"><strong>"+ l_item_html_text +"</strong>:"+ d + "</div>")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
a_html.append ("</select>%N")
|
a_html.append ("</select>%N")
|
||||||
|
|||||||
@@ -17,14 +17,14 @@ create
|
|||||||
|
|
||||||
feature {NONE} -- Initialization
|
feature {NONE} -- Initialization
|
||||||
|
|
||||||
make (a_value: READABLE_STRING_GENERAL; a_text: detachable like text)
|
make (a_value: READABLE_STRING_GENERAL; a_text: detachable READABLE_STRING_GENERAL)
|
||||||
-- Initialize `Current'.
|
-- Initialize `Current'.
|
||||||
do
|
do
|
||||||
value := a_value.as_string_32
|
value := a_value.as_string_32
|
||||||
if a_text = Void then
|
if a_text = Void then
|
||||||
text := html_encoder.general_encoded_string (a_value)
|
text := html_encoder.general_encoded_string (a_value)
|
||||||
else
|
else
|
||||||
text := a_text
|
text := a_text.to_string_32
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -37,16 +37,16 @@ feature -- Status
|
|||||||
Result := value.same_string_general (v)
|
Result := value.same_string_general (v)
|
||||||
end
|
end
|
||||||
|
|
||||||
is_same_text (v: like text): BOOLEAN
|
is_same_text (v: READABLE_STRING_GENERAL): BOOLEAN
|
||||||
do
|
do
|
||||||
Result := text.same_string (v)
|
Result := v.same_string (text)
|
||||||
end
|
end
|
||||||
|
|
||||||
feature -- Access
|
feature -- Access
|
||||||
|
|
||||||
value: READABLE_STRING_32
|
value: READABLE_STRING_32
|
||||||
|
|
||||||
text: READABLE_STRING_8
|
text: READABLE_STRING_32
|
||||||
|
|
||||||
description: detachable READABLE_STRING_8
|
description: detachable READABLE_STRING_8
|
||||||
|
|
||||||
|
|||||||
@@ -42,6 +42,20 @@ feature -- Change
|
|||||||
Precursor (i)
|
Precursor (i)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
set_field_text_value (a_name: READABLE_STRING_GENERAL; a_text_value: detachable READABLE_STRING_GENERAL)
|
||||||
|
-- Set recursively text value of input fields named `a_name` to value `a_text_value`.
|
||||||
|
do
|
||||||
|
across
|
||||||
|
items as ic
|
||||||
|
loop
|
||||||
|
if attached {WSF_FORM_INPUT} ic.item as l_input and then l_input.name.same_string_general (a_name) then
|
||||||
|
l_input.set_text_value (a_text_value)
|
||||||
|
elseif attached {WSF_FORM_COMPOSITE} ic.item as l_composite then
|
||||||
|
l_composite.set_field_text_value (a_name, a_text_value)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
feature {NONE} -- Implementation: Items
|
feature {NONE} -- Implementation: Items
|
||||||
|
|
||||||
container_has_field (a_container: ITERABLE [WSF_WIDGET]; a_name: READABLE_STRING_GENERAL): BOOLEAN
|
container_has_field (a_container: ITERABLE [WSF_WIDGET]; a_name: READABLE_STRING_GENERAL): BOOLEAN
|
||||||
|
|||||||
@@ -62,14 +62,16 @@ feature -- Access
|
|||||||
|
|
||||||
table_item (a_name: READABLE_STRING_GENERAL): detachable WSF_TABLE
|
table_item (a_name: READABLE_STRING_GENERAL): detachable WSF_TABLE
|
||||||
local
|
local
|
||||||
s,k: READABLE_STRING_GENERAL
|
s: STRING_32
|
||||||
|
k: READABLE_STRING_GENERAL
|
||||||
p,q: INTEGER
|
p,q: INTEGER
|
||||||
do
|
do
|
||||||
if attached {WSF_TABLE} item (a_name) as tb then
|
if attached {WSF_TABLE} item (a_name) as tb then
|
||||||
Result := tb
|
Result := tb
|
||||||
else
|
else
|
||||||
s := a_name + "["
|
create s.make_from_string_general (a_name)
|
||||||
create Result.make (a_name.to_string_8) -- FIXME
|
s.append_character ('[')
|
||||||
|
create Result.make (a_name)
|
||||||
across
|
across
|
||||||
items as c
|
items as c
|
||||||
loop
|
loop
|
||||||
|
|||||||
@@ -35,7 +35,10 @@ feature -- Status report
|
|||||||
debug_output: STRING
|
debug_output: STRING
|
||||||
-- String that should be displayed in debugger to represent `Current'.
|
-- String that should be displayed in debugger to represent `Current'.
|
||||||
do
|
do
|
||||||
Result := name + " {" + generator + "}"
|
create Result.make_from_string (name)
|
||||||
|
Result.append (" {")
|
||||||
|
Result.append (generator)
|
||||||
|
Result.append_character ('}')
|
||||||
end
|
end
|
||||||
|
|
||||||
feature -- Validation
|
feature -- Validation
|
||||||
|
|||||||
@@ -58,9 +58,9 @@ feature -- Element Change
|
|||||||
is_valid_number: a_val.is_integer
|
is_valid_number: a_val.is_integer
|
||||||
do
|
do
|
||||||
if a_val.is_string_32 then
|
if a_val.is_string_32 then
|
||||||
min := html_encoder.encoded_string (a_val.as_string_32)
|
min := html_encoder.encoded_string (a_val.to_string_32)
|
||||||
elseif a_val.is_string_8 then
|
elseif a_val.is_string_8 then
|
||||||
min := a_val.as_string_8
|
min := a_val.to_string_8
|
||||||
end
|
end
|
||||||
ensure
|
ensure
|
||||||
min_set: attached min as l_min implies l_min.same_string_general (a_val)
|
min_set: attached min as l_min implies l_min.same_string_general (a_val)
|
||||||
@@ -72,9 +72,9 @@ feature -- Element Change
|
|||||||
is_valid_number: a_val.is_integer
|
is_valid_number: a_val.is_integer
|
||||||
do
|
do
|
||||||
if a_val.is_string_32 then
|
if a_val.is_string_32 then
|
||||||
max := html_encoder.encoded_string (a_val.as_string_32)
|
max := html_encoder.encoded_string (a_val.to_string_32)
|
||||||
elseif a_val.is_string_8 then
|
elseif a_val.is_string_8 then
|
||||||
max := a_val.as_string_8
|
max := a_val.to_string_8
|
||||||
end
|
end
|
||||||
ensure
|
ensure
|
||||||
max_set: attached max as l_max implies l_max.same_string_general (a_val)
|
max_set: attached max as l_max implies l_max.same_string_general (a_val)
|
||||||
@@ -86,9 +86,9 @@ feature -- Element Change
|
|||||||
is_valid_sequence: a_val.is_number_sequence or else a_val.is_real_sequence
|
is_valid_sequence: a_val.is_number_sequence or else a_val.is_real_sequence
|
||||||
do
|
do
|
||||||
if a_val.is_string_32 then
|
if a_val.is_string_32 then
|
||||||
step := html_encoder.encoded_string (a_val.as_string_32)
|
step := html_encoder.encoded_string (a_val.to_string_32)
|
||||||
elseif a_val.is_string_8 then
|
elseif a_val.is_string_8 then
|
||||||
step := a_val.as_string_8
|
step := a_val.to_string_8
|
||||||
end
|
end
|
||||||
ensure
|
ensure
|
||||||
step_set: attached step as l_step implies l_step.same_string_general (a_val)
|
step_set: attached step as l_step implies l_step.same_string_general (a_val)
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ class
|
|||||||
|
|
||||||
feature -- Converter
|
feature -- Converter
|
||||||
|
|
||||||
html_encoded_string (s: READABLE_STRING_GENERAL): READABLE_STRING_8
|
html_encoded_string (s: READABLE_STRING_GENERAL): STRING_8
|
||||||
do
|
do
|
||||||
Result := html_encoder.general_encoded_string (s)
|
Result := html_encoder.general_encoded_string (s)
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -166,6 +166,19 @@ feature -- Change
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
remove (i: WSF_WIDGET)
|
||||||
|
-- Remove widget `i` from Current, recursively.
|
||||||
|
do
|
||||||
|
items.prune_all (i)
|
||||||
|
across
|
||||||
|
items as ic
|
||||||
|
loop
|
||||||
|
if attached {WSF_WIDGET_COMPOSITE} ic.item as l_comp then
|
||||||
|
l_comp.remove (i)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
extend (i: WSF_WIDGET)
|
extend (i: WSF_WIDGET)
|
||||||
do
|
do
|
||||||
items.force (i)
|
items.force (i)
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ feature -- Change
|
|||||||
lst.compare_objects
|
lst.compare_objects
|
||||||
html_attributes := lst
|
html_attributes := lst
|
||||||
end
|
end
|
||||||
lst.force (a_value, a_name)
|
lst.force (a_value, a_name.to_string_8)
|
||||||
end
|
end
|
||||||
|
|
||||||
remove_html_attribute (a_name: READABLE_STRING_8)
|
remove_html_attribute (a_name: READABLE_STRING_8)
|
||||||
@@ -41,7 +41,7 @@ feature -- Change
|
|||||||
do
|
do
|
||||||
lst := html_attributes
|
lst := html_attributes
|
||||||
if lst /= Void then
|
if lst /= Void then
|
||||||
lst.remove (a_name)
|
lst.remove (a_name.to_string_8)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -9,8 +9,8 @@
|
|||||||
</file_rule>
|
</file_rule>
|
||||||
<library name="base" location="$ISE_LIBRARY\library\base\base.ecf"/>
|
<library name="base" location="$ISE_LIBRARY\library\base\base.ecf"/>
|
||||||
<library name="encoder" location="..\..\text\encoder\encoder.ecf"/>
|
<library name="encoder" location="..\..\text\encoder\encoder.ecf"/>
|
||||||
<library name="uri_template" location="..\..\text\parser\uri_template\uri_template.ecf"/>
|
|
||||||
<library name="time" location="$ISE_LIBRARY\library\time\time.ecf"/>
|
<library name="time" location="$ISE_LIBRARY\library\time\time.ecf"/>
|
||||||
|
<library name="uri_template" location="..\..\text\parser\uri_template\uri_template.ecf"/>
|
||||||
<library name="wsf" location="..\wsf\wsf.ecf"/>
|
<library name="wsf" location="..\wsf\wsf.ecf"/>
|
||||||
<cluster name="api" location=".\api\" recursive="true"/>
|
<cluster name="api" location=".\api\" recursive="true"/>
|
||||||
<cluster name="css" location=".\css\" recursive="true"/>
|
<cluster name="css" location=".\css\" recursive="true"/>
|
||||||
|
|||||||
@@ -7,7 +7,10 @@
|
|||||||
<exclude>/\.git$</exclude>
|
<exclude>/\.git$</exclude>
|
||||||
<exclude>/\.svn$</exclude>
|
<exclude>/\.svn$</exclude>
|
||||||
</file_rule>
|
</file_rule>
|
||||||
|
<option warning="true">
|
||||||
|
</option>
|
||||||
<setting name="console_application" value="true"/>
|
<setting name="console_application" value="true"/>
|
||||||
|
<setting name="dead_code_removal" value="all"/>
|
||||||
<capability>
|
<capability>
|
||||||
<concurrency support="none" use="none"/>
|
<concurrency support="none" use="none"/>
|
||||||
</capability>
|
</capability>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
note
|
note
|
||||||
description: "Console wizard."
|
author: "$Author$"
|
||||||
date: "$Date$"
|
date: "$Date$"
|
||||||
revision: "$Revision$"
|
revision: "$Revision$"
|
||||||
|
|
||||||
@@ -301,7 +301,7 @@ feature {NONE} -- Implementation
|
|||||||
if
|
if
|
||||||
a_required_valid_option and then
|
a_required_valid_option and then
|
||||||
a_options /= Void and then
|
a_options /= Void and then
|
||||||
not across a_options as o some attached o.item.value as v and then Result.same_string (v) end
|
not across a_options as o some attached o.item.value as v and then Result.same_string_general (v) end
|
||||||
then
|
then
|
||||||
l_answered := False
|
l_answered := False
|
||||||
Result := Void
|
Result := Void
|
||||||
|
|||||||
@@ -1,6 +1,4 @@
|
|||||||
note
|
note
|
||||||
description: "Summary description for {CONSOLE_WIZARD_PAGE}."
|
|
||||||
author: ""
|
|
||||||
date: "$Date$"
|
date: "$Date$"
|
||||||
revision: "$Revision$"
|
revision: "$Revision$"
|
||||||
|
|
||||||
@@ -13,7 +11,7 @@ inherit
|
|||||||
create
|
create
|
||||||
make
|
make
|
||||||
|
|
||||||
feature {WIZARD, WIZARD_ENGINE, WIZARD_PAGE} -- Implementation
|
feature {WIZARD, WIZARD_PAGE} -- Implementation
|
||||||
|
|
||||||
reuse
|
reuse
|
||||||
do
|
do
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ feature {NONE} -- Initialization
|
|||||||
if s.same_string_general ("-callback") or s.same_string_general ("--callback") then
|
if s.same_string_general ("-callback") or s.same_string_general ("--callback") then
|
||||||
i := i + 1
|
i := i + 1
|
||||||
if i <= n then
|
if i <= n then
|
||||||
|
s := args.argument (i)
|
||||||
create callback_file_name.make_from_string (s)
|
create callback_file_name.make_from_string (s)
|
||||||
end
|
end
|
||||||
elseif wizard_directory_name = Void then
|
elseif wizard_directory_name = Void then
|
||||||
@@ -114,14 +115,15 @@ feature -- Helpers
|
|||||||
Result := a_folder.extended (a_name)
|
Result := a_folder.extended (a_name)
|
||||||
ok := not ut.directory_path_exists (Result)
|
ok := not ut.directory_path_exists (Result)
|
||||||
p := Result
|
p := Result
|
||||||
if not ok then
|
if
|
||||||
if attached p.extension as ext then
|
not ok and then
|
||||||
|
attached p.extension as ext
|
||||||
|
then
|
||||||
l_ext := ext
|
l_ext := ext
|
||||||
l_name := p.name
|
l_name := p.name
|
||||||
l_name.remove_head (ext.count + 1)
|
l_name.remove_head (ext.count + 1)
|
||||||
create p.make_from_string (l_name)
|
create p.make_from_string (l_name)
|
||||||
end
|
end
|
||||||
end
|
|
||||||
until
|
until
|
||||||
ok
|
ok
|
||||||
loop
|
loop
|
||||||
|
|||||||
@@ -51,11 +51,8 @@ feature -- Response
|
|||||||
feature -- Factory
|
feature -- Factory
|
||||||
|
|
||||||
new_uuid: STRING_8
|
new_uuid: STRING_8
|
||||||
local
|
|
||||||
gen: UUID_GENERATOR
|
|
||||||
do
|
do
|
||||||
create gen
|
Result := {UUID_GENERATOR}.generate_uuid.out
|
||||||
Result := gen.generate_uuid.out
|
|
||||||
end
|
end
|
||||||
|
|
||||||
feature -- Operations
|
feature -- Operations
|
||||||
@@ -98,19 +95,17 @@ feature -- Templates
|
|||||||
|
|
||||||
recursive_copy_templates (a_src: PATH; a_target: PATH)
|
recursive_copy_templates (a_src: PATH; a_target: PATH)
|
||||||
local
|
local
|
||||||
d,td, subdir: DIRECTORY
|
d, subdir: DIRECTORY
|
||||||
p, ip, tp: PATH
|
p, ip, tp: PATH
|
||||||
do
|
do
|
||||||
create d.make_with_path (a_src)
|
create d.make_with_path (a_src)
|
||||||
if d.exists and then d.is_readable then
|
if d.exists and then d.is_readable then
|
||||||
create td.make_with_path (a_target)
|
;(create {DIRECTORY}.make_with_path (a_target)).recursive_create_dir
|
||||||
td.recursive_create_dir
|
|
||||||
across
|
across
|
||||||
d.entries as ic
|
d.entries as ic
|
||||||
loop
|
loop
|
||||||
p := ic.item
|
p := ic.item
|
||||||
if p.is_parent_symbol or p.is_current_symbol then
|
if not p.is_parent_symbol and not p.is_current_symbol then
|
||||||
else
|
|
||||||
ip := a_src.extended_path (p)
|
ip := a_src.extended_path (p)
|
||||||
create subdir.make_with_path (ip)
|
create subdir.make_with_path (ip)
|
||||||
tp := a_target.extended_path (resolved_path_name (p))
|
tp := a_target.extended_path (resolved_path_name (p))
|
||||||
@@ -133,7 +128,6 @@ feature -- Templates
|
|||||||
a_src_is_a_template_file: is_template_file (a_src)
|
a_src_is_a_template_file: is_template_file (a_src)
|
||||||
local
|
local
|
||||||
f,t: PLAIN_TEXT_FILE
|
f,t: PLAIN_TEXT_FILE
|
||||||
line: READABLE_STRING_8
|
|
||||||
do
|
do
|
||||||
create f.make_with_path (a_src)
|
create f.make_with_path (a_src)
|
||||||
if f.exists and f.is_readable then
|
if f.exists and f.is_readable then
|
||||||
@@ -146,8 +140,7 @@ feature -- Templates
|
|||||||
until
|
until
|
||||||
f.exhausted
|
f.exhausted
|
||||||
loop
|
loop
|
||||||
line := f.last_string
|
t.put_string (resolved_string_8 (f.last_string))
|
||||||
t.put_string (resolved_string_8 (line))
|
|
||||||
t.put_new_line
|
t.put_new_line
|
||||||
f.read_line
|
f.read_line
|
||||||
end
|
end
|
||||||
@@ -177,7 +170,6 @@ feature -- Resolvers
|
|||||||
from
|
from
|
||||||
i := 1
|
i := 1
|
||||||
n := s.count
|
n := s.count
|
||||||
q := 0
|
|
||||||
until
|
until
|
||||||
i > n
|
i > n
|
||||||
loop
|
loop
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
note
|
note
|
||||||
description : "Objects that ..."
|
|
||||||
author: "$Author$"
|
author: "$Author$"
|
||||||
date: "$Date$"
|
date: "$Date$"
|
||||||
revision: "$Revision$"
|
revision: "$Revision$"
|
||||||
@@ -53,8 +52,6 @@ feature {NONE} -- Widget
|
|||||||
feature -- Factory
|
feature -- Factory
|
||||||
|
|
||||||
new_page (a_page_id: READABLE_STRING_8): GRAPHICAL_WIZARD_PAGE
|
new_page (a_page_id: READABLE_STRING_8): GRAPHICAL_WIZARD_PAGE
|
||||||
local
|
|
||||||
lab: EV_LABEL
|
|
||||||
do
|
do
|
||||||
create Result.make (a_page_id)
|
create Result.make (a_page_id)
|
||||||
end
|
end
|
||||||
@@ -89,7 +86,6 @@ feature {NONE} -- Implementation: UI
|
|||||||
hb,hb2: EV_HORIZONTAL_BOX
|
hb,hb2: EV_HORIZONTAL_BOX
|
||||||
mb, vb, headerb: EV_VERTICAL_BOX
|
mb, vb, headerb: EV_VERTICAL_BOX
|
||||||
lab: EV_LABEL
|
lab: EV_LABEL
|
||||||
but: EV_BUTTON
|
|
||||||
cl: EV_CELL
|
cl: EV_CELL
|
||||||
fr: detachable EV_FRAME
|
fr: detachable EV_FRAME
|
||||||
do
|
do
|
||||||
@@ -182,7 +178,6 @@ feature {NONE} -- Implementation: UI
|
|||||||
|
|
||||||
mb.extend (fr)
|
mb.extend (fr)
|
||||||
mb.disable_item_expand (fr)
|
mb.disable_item_expand (fr)
|
||||||
fr := Void
|
|
||||||
end
|
end
|
||||||
|
|
||||||
-- ./Text part
|
-- ./Text part
|
||||||
|
|||||||
@@ -1,6 +1,4 @@
|
|||||||
note
|
note
|
||||||
description: "Summary description for {GRAPHICAL_WIZARD_PAGE}."
|
|
||||||
author: ""
|
|
||||||
date: "$Date$"
|
date: "$Date$"
|
||||||
revision: "$Revision$"
|
revision: "$Revision$"
|
||||||
|
|
||||||
@@ -20,7 +18,7 @@ inherit
|
|||||||
create
|
create
|
||||||
make
|
make
|
||||||
|
|
||||||
feature {WIZARD, WIZARD_ENGINE, WIZARD_PAGE} -- Implementation
|
feature {WIZARD, WIZARD_PAGE} -- Implementation
|
||||||
|
|
||||||
reuse
|
reuse
|
||||||
do
|
do
|
||||||
@@ -95,11 +93,12 @@ feature {NONE} -- Implementation
|
|||||||
|
|
||||||
unparent (i: WIZARD_PAGE_ITEM)
|
unparent (i: WIZARD_PAGE_ITEM)
|
||||||
do
|
do
|
||||||
if attached {GRAPHICAL_WIZARD_PAGE_ITEM} i as gpi then
|
if
|
||||||
if attached gpi.widget.parent as l_parent then
|
attached {GRAPHICAL_WIZARD_PAGE_ITEM} i as gpi and then
|
||||||
|
attached gpi.widget.parent as l_parent
|
||||||
|
then
|
||||||
l_parent.prune (gpi.widget)
|
l_parent.prune (gpi.widget)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,6 +1,4 @@
|
|||||||
note
|
note
|
||||||
description: "Summary description for {GRAPHICAL_WIZARD_STYLER}."
|
|
||||||
author: ""
|
|
||||||
date: "$Date$"
|
date: "$Date$"
|
||||||
revision: "$Revision$"
|
revision: "$Revision$"
|
||||||
|
|
||||||
@@ -42,9 +40,7 @@ feature -- Style
|
|||||||
lab.align_text_top
|
lab.align_text_top
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if attached {EV_COLORIZABLE} w as l_colorizable then
|
w.set_foreground_color (colors.black)
|
||||||
l_colorizable.set_foreground_color (colors.black)
|
|
||||||
end
|
|
||||||
if attached {EV_FONTABLE} w as l_fontable then
|
if attached {EV_FONTABLE} w as l_fontable then
|
||||||
l_fontable.set_font (text_font)
|
l_fontable.set_font (text_font)
|
||||||
end
|
end
|
||||||
@@ -82,9 +78,7 @@ feature -- Style
|
|||||||
apply_field_description_style (w: EV_WIDGET)
|
apply_field_description_style (w: EV_WIDGET)
|
||||||
do
|
do
|
||||||
apply_text_style (w)
|
apply_text_style (w)
|
||||||
if attached {EV_COLORIZABLE} w as l_colorizable then
|
w.set_foreground_color (colors.dark_gray)
|
||||||
l_colorizable.set_foreground_color (colors.dark_gray)
|
|
||||||
end
|
|
||||||
if attached {EV_FONTABLE} w as l_fontable then
|
if attached {EV_FONTABLE} w as l_fontable then
|
||||||
l_fontable.set_font (field_description_font)
|
l_fontable.set_font (field_description_font)
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ feature -- Conversion
|
|||||||
|
|
||||||
text: STRING_32
|
text: STRING_32
|
||||||
do
|
do
|
||||||
Result := input_widget.text
|
Result := input_widget.file_path.name
|
||||||
end
|
end
|
||||||
|
|
||||||
value: detachable PATH
|
value: detachable PATH
|
||||||
@@ -92,11 +92,7 @@ feature -- Element change
|
|||||||
|
|
||||||
set_value (p: like value)
|
set_value (p: like value)
|
||||||
do
|
do
|
||||||
if p = Void then
|
input_widget.set_file_path (if attached p then p else create {PATH}.make_empty end)
|
||||||
input_widget.set_text ("")
|
|
||||||
else
|
|
||||||
input_widget.set_text (p.name)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,6 +1,4 @@
|
|||||||
note
|
note
|
||||||
description: "Summary description for {GRAPHICAL_WIZARD_INTEGER_QUESTION}."
|
|
||||||
author: ""
|
|
||||||
date: "$Date$"
|
date: "$Date$"
|
||||||
revision: "$Revision$"
|
revision: "$Revision$"
|
||||||
|
|
||||||
@@ -94,8 +92,6 @@ feature -- Element change
|
|||||||
set_value (0)
|
set_value (0)
|
||||||
elseif t.is_integer then
|
elseif t.is_integer then
|
||||||
set_value (t.to_integer)
|
set_value (t.to_integer)
|
||||||
else
|
|
||||||
-- ignore !
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,4 @@
|
|||||||
note
|
note
|
||||||
description: "Summary description for {GRAPHICAL_WIZARD_QUESTION}."
|
|
||||||
author: ""
|
|
||||||
date: "$Date$"
|
date: "$Date$"
|
||||||
revision: "$Revision$"
|
revision: "$Revision$"
|
||||||
|
|
||||||
@@ -41,7 +39,6 @@ feature {NONE} -- Implementation
|
|||||||
|
|
||||||
append_indented_widget (w: EV_WIDGET; a_container: EV_BOX)
|
append_indented_widget (w: EV_WIDGET; a_container: EV_BOX)
|
||||||
local
|
local
|
||||||
lab: EV_LABEL
|
|
||||||
hb: EV_HORIZONTAL_BOX
|
hb: EV_HORIZONTAL_BOX
|
||||||
do
|
do
|
||||||
create hb
|
create hb
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||||
<system xmlns="http://www.eiffel.com/developers/xml/configuration-1-16-0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.eiffel.com/developers/xml/configuration-1-16-0 http://www.eiffel.com/developers/xml/configuration-1-16-0.xsd" name="{$WIZ.project.name/}" uuid="{$UUID/}">
|
<system xmlns="http://www.eiffel.com/developers/xml/configuration-1-18-0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.eiffel.com/developers/xml/configuration-1-18-0 http://www.eiffel.com/developers/xml/configuration-1-18-0.xsd" name="{$WIZ.project.name/}" uuid="{$UUID/}">
|
||||||
<target name="common" abstract="true">
|
<target name="common" abstract="true">
|
||||||
<file_rule>
|
<file_rule>
|
||||||
<exclude>/EIFGENs$</exclude>
|
<exclude>/EIFGENs$</exclude>
|
||||||
@@ -9,15 +9,15 @@
|
|||||||
<option warning="true">
|
<option warning="true">
|
||||||
<assertions precondition="true" postcondition="true" check="true" invariant="true" loop="true" supplier_precondition="true"/>
|
<assertions precondition="true" postcondition="true" check="true" invariant="true" loop="true" supplier_precondition="true"/>
|
||||||
</option>
|
</option>
|
||||||
<library name="base" location="$ISE_LIBRARY\library\base\base-safe.ecf"/>
|
<library name="base" location="$ISE_LIBRARY\library\base\base.ecf"/>
|
||||||
<library name="http" location="$ISE_LIBRARY\contrib\library\network\protocol\http\http-safe.ecf"/>
|
<library name="http" location="$ISE_LIBRARY\contrib\library\network\protocol\http\http.ecf"/>
|
||||||
<library name="wsf" location="$ISE_LIBRARY\contrib\library\web\framework\ewf\wsf\wsf-safe.ecf"/>
|
<library name="wsf" location="$ISE_LIBRARY\contrib\library\web\framework\ewf\wsf\wsf.ecf"/>
|
||||||
</target>
|
</target>
|
||||||
<target name="{$WIZ.project.name/}_any" extends="common">
|
<target name="{$WIZ.project.name/}_any" extends="common">
|
||||||
<root class="{$APP_ROOT/}" feature="make_and_launch"/>
|
<root class="{$APP_ROOT/}" feature="make_and_launch"/>
|
||||||
{if condition="$WIZ.connectors.use_standalone ~ $WIZ_YES"}<library name="standalone" location="$ISE_LIBRARY\contrib\library\web\framework\ewf\wsf\connector\standalone-safe.ecf"/>{/if}
|
{if condition="$WIZ.connectors.use_standalone ~ $WIZ_YES"}<library name="standalone" location="$ISE_LIBRARY\contrib\library\web\framework\ewf\wsf\connector\standalone.ecf"/>{/if}
|
||||||
{if condition="$WIZ.connectors.use_cgi ~ $WIZ_YES"}<library name="cgi" location="$ISE_LIBRARY\contrib\library\web\framework\ewf\wsf\connector\cgi-safe.ecf"/>{/if}
|
{if condition="$WIZ.connectors.use_cgi ~ $WIZ_YES"}<library name="cgi" location="$ISE_LIBRARY\contrib\library\web\framework\ewf\wsf\connector\cgi.ecf"/>{/if}
|
||||||
{if condition="$WIZ.connectors.use_libfcgi ~ $WIZ_YES"}<library name="libfcgi" location="$ISE_LIBRARY\contrib\library\web\framework\ewf\wsf\connector\libfcgi-safe.ecf"/>{/if}
|
{if condition="$WIZ.connectors.use_libfcgi ~ $WIZ_YES"}<library name="libfcgi" location="$ISE_LIBRARY\contrib\library\web\framework\ewf\wsf\connector\libfcgi.ecf"/>{/if}
|
||||||
<cluster name="launcher" location=".\launcher\">
|
<cluster name="launcher" location=".\launcher\">
|
||||||
<cluster name="any_launcher" location="$|any"/>
|
<cluster name="any_launcher" location="$|any"/>
|
||||||
</cluster>
|
</cluster>
|
||||||
@@ -27,7 +27,7 @@
|
|||||||
<target name="{$WIZ.project.name/}_standalone" extends="common">
|
<target name="{$WIZ.project.name/}_standalone" extends="common">
|
||||||
<root class="{$APP_ROOT/}" feature="make_and_launch"/>
|
<root class="{$APP_ROOT/}" feature="make_and_launch"/>
|
||||||
<variable name="httpd_ssl_disabled" value="true"/><!-- for now ... due to issue with libcurl+eiffelnet ssl -->
|
<variable name="httpd_ssl_disabled" value="true"/><!-- for now ... due to issue with libcurl+eiffelnet ssl -->
|
||||||
<library name="default_standalone" location="$ISE_LIBRARY\contrib\library\web\framework\ewf\wsf\default\standalone-safe.ecf"/>
|
<library name="default_standalone" location="$ISE_LIBRARY\contrib\library\web\framework\ewf\wsf\default\standalone.ecf"/>
|
||||||
<cluster name="launcher" location=".\launcher\">
|
<cluster name="launcher" location=".\launcher\">
|
||||||
<cluster name="default_launcher" location="$|default"/>
|
<cluster name="default_launcher" location="$|default"/>
|
||||||
</cluster>
|
</cluster>
|
||||||
@@ -39,7 +39,7 @@
|
|||||||
<capability>
|
<capability>
|
||||||
<concurrency use="none" />
|
<concurrency use="none" />
|
||||||
</capability>
|
</capability>
|
||||||
<library name="default_cgi" location="$ISE_LIBRARY\contrib\library\web\framework\ewf\wsf\default\cgi-safe.ecf"/>
|
<library name="default_cgi" location="$ISE_LIBRARY\contrib\library\web\framework\ewf\wsf\default\cgi.ecf"/>
|
||||||
<cluster name="launcher" location=".\launcher\">
|
<cluster name="launcher" location=".\launcher\">
|
||||||
<cluster name="default_launcher" location="$|default"/>
|
<cluster name="default_launcher" location="$|default"/>
|
||||||
</cluster>
|
</cluster>
|
||||||
@@ -51,7 +51,7 @@
|
|||||||
<capability>
|
<capability>
|
||||||
<concurrency use="none" />
|
<concurrency use="none" />
|
||||||
</capability>
|
</capability>
|
||||||
<library name="default_libfcgi" location="$ISE_LIBRARY\contrib\library\web\framework\ewf\wsf\default\libfcgi-safe.ecf"/>
|
<library name="default_libfcgi" location="$ISE_LIBRARY\contrib\library\web\framework\ewf\wsf\default\libfcgi.ecf"/>
|
||||||
<cluster name="launcher" location=".\launcher\">
|
<cluster name="launcher" location=".\launcher\">
|
||||||
<cluster name="default_launcher" location="$|default"/>
|
<cluster name="default_launcher" location="$|default"/>
|
||||||
</cluster>
|
</cluster>
|
||||||
|
|||||||
Reference in New Issue
Block a user