Author |
Message |
05/07/2013 15:03:35
|
mbreyer
Power User
Joined: 02/07/2013 16:08:31
Messages: 42
Location: Cologne
Offline
|
Hi,
I'm currently playing with own components. As a first approach I wanted to do somekind of extenden FIELDComponent. As a first step I wanted to have a normal FIELD with exactly the same behaviour. So I followed the Developer's Guide and create the needed classes/files/entries.
As i didn't wanted to have Components combined in one (like in the example), i just wrote an Component- and a Tag-Class which directly extend the FieldComponent-/Tag-Class. So i didn't add a childs like in the example either. My expectation was that i should have a normal field, with different tag-name, but I have two problems until now.
1. In the editor, I can add the component, it is listed in the tree, but I don't see anything? (style attributes are defined) When I start the Preview I can see the component. What can I do to get it displayed in the editor?
2. It doesn't act like the normal field. Both Components are bound to the same expression, flush is set to true with a timer of 1s. The normal field does the roundtrip and the "extended"-Field ist filled. The "extended"-Field does a roundtrip but the value is not changed.
kind regards,
mario
|
|
|
05/07/2013 15:15:56
|
CaptainCasa
Power User
Joined: 21/11/2007 12:23:06
Messages: 5555
Offline
|
Hi,
could you please add - the code of both Component and Tag-Class.
@1. What do you mean "don't seen anything". You mean if you click right mouse button, then it is not listed in the popup menu that opens up?
And, could you please add a short desrciption of what you want to add to the component.
If you do not want to publish details in the forum: please tell me by mail.
Thanks + Regards!
Björn
|
Björn Müller, CaptainCasa GmbH |
|
|
08/07/2013 10:00:21
|
mbreyer
Power User
Joined: 02/07/2013 16:08:31
Messages: 42
Location: Cologne
Offline
|
Good Morning,
we are currently evalutaing the options for an application-wide and browser-like autocompletion.
The standard AutoCompletion of Fields ist not suitable for us, as don't want to define an Provider foreach Field. We would prefer an central solution.
Therefore we saw 2 Problems:
1. How to identifiy the Field?
This should be possible over the binding in the Text-Attribute, as it is an combination of the managedBean and the getter.
2. How to update the AutoCompletion-List (Submit-Button)?
An extended-Button which reads the "activated" AutoCompletionFields an updates the List.
For this I'm trying out if it is possible to write an extended Field which, reads and displays its autocompletionList. Notifies a central Class, "i have changed my value, save it if the submit-button is pressed".
And the next step would be an extended Button, which reads the entries from the central Class and saves them.
Here are my Component and Tag-Class, as I said directly extending the FieldComponent/Tag and doing nothing on its own, as I wanted to have an exact copie of the Field in the first Step.
Code:
public class AUTOCOMPLETEFIELDComponent
extends FIELDComponent {
}
Code:
public class AUTOCOMPLETEFIELDComponentTag
extends FIELDComponentTag {
}
I attached an Picture to explain what I mean with nothing to see.
Regards
Mario
|
Filename |
Display_own_component.png |
Download
|
Description |
|
Filesize |
32 Kbytes
|
Downloaded: |
351 time(s) |
|
|
|
11/07/2013 14:21:38
|
cfuchs
Active
Joined: 21/01/2013 09:33:01
Messages: 16
Offline
|
Hey,
did u implement ur "client"-Component AUTOCOMPLETEFIELDElement? If u don't the client won't know how to process the XML structure containing the new component.
Check the documentation for client component development page 6 ff.
Regards!
|
|
|
12/07/2013 08:00:10
|
mbreyer
Power User
Joined: 02/07/2013 16:08:31
Messages: 42
Location: Cologne
Offline
|
Hi,
well i also had an Element Class, but with Björns extension of the AutoCompleteProvider we are satisfied.
So we have no need to make own Components anymore, but thatks for the link didn't know this document so far.
Regards
|
|
|
|