Giter Site home page Giter Site logo

arisanform's Introduction

  • ๐Ÿ‘‹ Hi, Iโ€™m @ricoarisandyw
  • ๐Ÿ‘€ Iโ€™m interested in js, java, php
  • ๐ŸŒฑ Iโ€™m currently learning fullstack developer
  • ๐Ÿ’ž๏ธ Iโ€™m looking to collaborate on creating some cool stuff.
  • ๐Ÿ“ซ How to reach me? You can reach me in here.

arisanform's People

Contributors

dexpota avatar ricoarisandyw avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

arisanform's Issues

AddListener on form

Hi,
i start using your great library today, but i have one question with the event addListener.
I dont know how you get another view under the listener ?

form.addListener("elem_6", new ArisanListener.OnCondition() {
            @Override
            public void onValue(String value, FormAdapter adapter) {
                   if( "VALUE".equals(value) ){                
                        FormModel element = new KotlinFilter().findFieldByName("elem_7",form.getFieldModels());
                        element.getView().setVisibility(View.GONE);  // HOW ... ?
                    } else {
                        element.getView().setVisibility(View.VISIBLE);  // HOW ... ?
                    }
....

Thanks in advance !

Two Spinner on a form

Hello i have a problem when i use two spinner on a form.

My model :

class AnomalyData {

    @Form(type = Form.SPINNER, position = 1)
    private val origine: String? = null

    @Form(type = Form.SPINNER, position = 2)
    private val emplacement: String? = null

    @Form(type = Form.IMAGE, position = 3)
    private val photo: String? = null

    @Form(position = 4)
    private val commentaire: String? = null

    companion object {
        var FIELD_ORIGIN = "origine"
        var FIELD_CATEGORY = "emplacement"

My Activity :

private fun setUpForm() {
        form.setModels(AnomalyData())
        form.fillData(AnomalyData.FIELD_ORIGIN, AnomalyData.initOrigin())
        form.fillData(AnomalyData.FIELD_CATEGORY, AnomalyData.initSubSecurityOrigin())

        form.addListener(AnomalyData.FIELD_ORIGIN) { value, adapter ->
            when (value) {
                AnomalyData.ORIGIN_SECURITY -> {
                    adapter.updateData(
                            AnomalyData.FIELD_CATEGORY, AnomalyData.initSubSecurityOrigin())
                }
                AnomalyData.ORIGIN_BODY -> {
                    adapter.updateData(
                            AnomalyData.FIELD_CATEGORY, AnomalyData.initSubBodyOrigin())
                }
                AnomalyData.ORIGIN_CLEANLINESS -> {
                    adapter.updateData(
                            AnomalyData.FIELD_CATEGORY, AnomalyData.initSubCleanlinessOrigin())
                }
                AnomalyData.ORIGIN_ADMINISTRATIVE -> {
                    adapter.updateData(
                            AnomalyData.FIELD_CATEGORY, AnomalyData.initSubAdministrativeOrigin())
                }
                else -> {
                    adapter.updateData(
                            AnomalyData.FIELD_CATEGORY, AnomalyData.initSubEventsToReportOrigin())
                }
            }
        }

        form.buildForm()
    }

I have this error :

java.lang.NullPointerException: Attempt to invoke interface method 'void com.github.arisan.ArisanListener$OnCondition.onValue(java.lang.String, com.github.arisan.adapter.FormAdapter)' on a null object reference

When i use CheckBox instead of Spinner for the second element in my Model, i don't have any problem.

Can you help me please ?

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.