Code Monkey home page Code Monkey logo

Comments (26)

LorenzBuehmann avatar LorenzBuehmann commented on July 20, 2024 2
@Override
public Registration addValueChangeListener(ValueChangeListener<Collection<Token>> listener) {
   return this.addListener(ValueChangeEvent.class, listener, ValueChangeListener.VALUE_CHANGE_METHOD);
}

from advancedtokenfield.

LorenzBuehmann avatar LorenzBuehmann commented on July 20, 2024 1

Why are you not using the generic type Collection<T> as parameter? Indeed, some people might be interested in having a list as backend.

from advancedtokenfield.

fo0 avatar fo0 commented on July 20, 2024

@vertical request: interesting idea, could you give me a draft, that i can exactly see what u mean?

@binder: im going to impement this, but it could take a while ~2weeks. Maybe you could do a pull request if its important for you

from advancedtokenfield.

alexxtaurus avatar alexxtaurus commented on July 20, 2024
  1. it's very easy: exh time i'm add new token, it will be added under combobox, the next token will be added under/up the last one and so on.
  2. better use "set" as colleaction. I'm afraid what i don't have much expirience to do such modifications.

You can search vaadin directory for "TokenField". And see demo how it looks like. i'm using it, but it can be used with 8 version with v7 vaadin packages. I've tryed to migrade it to 8 myself - but no luck.

from advancedtokenfield.

fo0 avatar fo0 commented on July 20, 2024

it's very easy: exh time i'm add new token, it will be added under combobox, the next token will be added under/up the last one and so on.

If I understood you correct, you mean that you want to display the inserted tokens below the tokenfield-combobox, and in a verticallayout + each token per line, correct?

better use "set" as colleaction. I'm afraid what i don't have much expirience to do such modifications.

I cannot use a Set, because you want to add the same token more then once. The Token-ID is the value itself.

As i said, if you need this fast, your pull request is welcome.

from advancedtokenfield.

alexxtaurus avatar alexxtaurus commented on July 20, 2024
  1. here the link with example: https://imgur.com/emKQAYh
  2. in case token id's will be kept as value: you cannot use it with binding: i'm use database, i have token field mapped to java class, i want to bind table with string values to the token field.

from advancedtokenfield.

fo0 avatar fo0 commented on July 20, 2024

from advancedtokenfield.

fo0 avatar fo0 commented on July 20, 2024

hi alex, got some problems with the api for bindings. But im still keep and eye on it, sorry for the delay. The custom layout options i.e. vert layout, will be on the same commit

from advancedtokenfield.

alexxtaurus avatar alexxtaurus commented on July 20, 2024

Cool thanks. It will allow me remove legacy vaadin 7 libs. ps: You can look at vaadin 8.2 it has released already and have improved binding.

from advancedtokenfield.

alexxtaurus avatar alexxtaurus commented on July 20, 2024

Any progress with binding and vertical layout?

from advancedtokenfield.

fo0 avatar fo0 commented on July 20, 2024

Hey,

with binding still problems, dont know on what bean to bind. What could be useful ? Bind the Set or List (token.value) ? Im still not sure what could be a good way...

The Layout gets added on next updates

from advancedtokenfield.

alexxtaurus avatar alexxtaurus commented on July 20, 2024

For my inderstanding and expirience of my colleagues which use tokens at gui: 80% of people want to have set interface and have auto control for unicality of items, so all items will be unic. 20% want to have list interface and doesnt case of unicality. I'm prefer set.

from advancedtokenfield.

fo0 avatar fo0 commented on July 20, 2024

So Set could be a good way of the hasvalue interface return type ? alright, so let me try to finish it this weekend :)

from advancedtokenfield.

alexxtaurus avatar alexxtaurus commented on July 20, 2024

Yes, please use set. Will wait for update. And will do tests

from advancedtokenfield.

alexxtaurus avatar alexxtaurus commented on July 20, 2024

It can be a good idea. And can be a good try. I just provided statistic what i'm have

from advancedtokenfield.

fo0 avatar fo0 commented on July 20, 2024

sounds good

from advancedtokenfield.

fo0 avatar fo0 commented on July 20, 2024

i'v got many problems with implementing the HasValue interface ... at least im stuck in adding the valuechangelistener to the field... maybe any idea?

@Override
	public Registration addValueChangeListener(ValueChangeListener<Collection<Token>> listener) {
		// ??? cannot bind it to inputfield (combobox) or layout (csslayout) ...
		// !!!
	}

from advancedtokenfield.

alexxtaurus avatar alexxtaurus commented on July 20, 2024

Hey, any progress yet?

from advancedtokenfield.

fo0 avatar fo0 commented on July 20, 2024

i am pretty sorry about the long delay and work, but i am lazy about vaadin projects, but i keep going to work on it

from advancedtokenfield.

fo0 avatar fo0 commented on July 20, 2024

dunno but the binder integration breaks my entire component, i recomment you to do a pull request or integrate it via extend my component and just implement the binder on your special case

from advancedtokenfield.

alexxtaurus avatar alexxtaurus commented on July 20, 2024

But about vertical layout? Hoe to configure it?

from advancedtokenfield.

fo0 avatar fo0 commented on July 20, 2024

basically its a csslayout, just try to set another style like "v-horizontallayout" or "v-verticallayout"

from advancedtokenfield.

alexxtaurus avatar alexxtaurus commented on July 20, 2024

I will fork this addon and will do required modifications. I've done most of modifications today. The reason, to add binding and layout type choose support. For thise cases main cllass should not extend csslayout but customfield. Class should have ability to chosse required layout. Also it's not removing tokens from combobox just from layout, this will be fixed. Also it depends on drag and drop layout addon. But this addon required to have vaadin-compatible libs at dependency.This is not my case. Will wait for new addon version (ddl)

from advancedtokenfield.

fo0 avatar fo0 commented on July 20, 2024

just do a pull request this is why its open source ...

from advancedtokenfield.

alexxtaurus avatar alexxtaurus commented on July 20, 2024

i have different understanding how tokenfield should work. Starting from i dont understand why use combobox not just text field... also adding binding to component require to do core chnages and it will be new component deffer from your initial one. But it will cover all my needs. But i don't know your needs. You can look at my modifyed code and take parts what you need.

from advancedtokenfield.

fo0 avatar fo0 commented on July 20, 2024

yeah i think thats true... Interested on your modifications. I'll keep an eye on it, or maybe you could give me a notification :-)

update: the combobox was my prefered component to add an history and/or common tags for the user

from advancedtokenfield.

Related Issues (8)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.