logo
down
shadow

Toggle p:fieldset from another button


Toggle p:fieldset from another button

By : venky
Date : November 15 2020, 06:54 AM
this one helps. Following the suggestion of Tiny, I update onclick event just the content of the fieldset that could be change.
code :
<p:fieldset id="fs_new_po"
        widgetVar="fs_new_po"
        legend="#{msg['btn_add_po.manage_po']}"
        toggleable="true"
        toggleSpeed="500"
        collapsed="true">
   //ADDED A CONTENT INSIDE THE FIELDSET TO BE UPDATED
   <p:panelGrid id="fs_cntnt">

....

   <p:column>
       //UPDATE JUST THE CONTENT OF THE FIELDSET
       <p:commandButton process="@this" update=":mng_po:fs_cntnt :mng_po:msgs" value="#   {msg['btnCancel']}" onclick="PF('fs_new_po').toggle();" actionListener="#{managePO.btnCancelClick}" />
   </p:column>
</p:row>
</p:panelGrid>

</p:fieldset>

...
 //UPDATE JUST THE CONTENT OF THE FIELDSET
<p:commandButton process="@this" update=":mng_po:fs_cntnt"  oncomplete="PF('fs_new_po').toggle();" icon="ui-icon-pencil" title="edit" action="#{managePO.btnEditClick}" >
                    <f:setPropertyActionListener value="#{po}" target="#{managePO.selectedPo}" />
                </p:commandButton>


Share : facebook icon twitter icon
How to change fieldset toggle icon?

How to change fieldset toggle icon?


By : DMohan
Date : March 29 2020, 07:55 AM
Does that help I want to change the default triangle toggle icon to '+' / '-' , The correct way to do it is this:
code :
.legendFieldSet .x-tool-toggle {
    background-position: 0 -255px !important; /*the minus sign*/
}

.legendFieldSet.x-fieldset-collapsed .x-tool-toggle {
    background-position: 0 -240px !important; /*the plus sign*/
}
Toggle fieldset disabled by checking checkbox

Toggle fieldset disabled by checking checkbox


By : Helano
Date : March 29 2020, 07:55 AM
hope this fix your issue Yout code is okay. The problem is in your fiddle. When you select onLoad and no No library it means that your javascript code will be placed inside window.onload closure:
code :
window.onload = function() { /* your code will go here */ }
ZF2 + Doctrine2 - Fieldset in Fieldset of a Collection in Fieldset does not validate properly

ZF2 + Doctrine2 - Fieldset in Fieldset of a Collection in Fieldset does not validate properly


By : Muhammet Tamtam
Date : March 29 2020, 07:55 AM
With these it helps After another day of debugging (and swearing), I found the answer!
This SO question helped me out by pointing me towards the Zend CollectionInputFilter.
code :
class LocationFieldsetInputFilterFactory extends AbstractFieldsetInputFilterFactory
{
    /**
     * @param ServiceLocatorInterface|ControllerManager $serviceLocator
     * @return InputFilter
     */
    public function createService(ServiceLocatorInterface $serviceLocator)
    {
        parent::setupRequirements($serviceLocator, Location::class);

        /** @var AddressFieldsetInputFilter $addressFieldsetInputFilter */
        $addressFieldsetInputFilter = $this->getServiceManager()->get('InputFilterManager')
            ->get(AddressFieldsetInputFilter::class);

        $collectionInputFilter = new CollectionInputFilter();
        $collectionInputFilter->setInputFilter($addressFieldsetInputFilter); // Make sure to add the FieldsetInputFilter that is to be used for the Entities!

        return new LocationFieldsetInputFilter(
            $collectionInputFilter,         // New
            // $addressFieldsetInputFilter, // Removed
            $this->getEntityManager(),
            $this->getTranslator()
        );
    }
}
class LocationFieldsetInputFilter extends AbstractFieldsetInputFilter
{
    // Removed
    // /** @var AddressFieldsetInputFilter $addressFieldsetInputFilter */
    // protected $addressFieldsetInputFilter ;

    // New
    /** @var CollectionInputFilter $addressCollectionInputFilter */
    protected $addressCollectionInputFilter;

    public function __construct(
        CollectionInputFilter $addressCollectionInputFilter, // New
        // AddressFieldsetInputFilter $filter, // Removed
        EntityManager $objectManager,
        Translator $translator
    ) {
        // $this->addressFieldsetInputFilter = $filter; // Removed
        $this->addressCollectionInputFilter = $addressCollectionInputFilter; // New

        parent::__construct([
            'object_manager' => $objectManager,
            'object_repository' => $objectManager->getRepository(Location::class),
            'translator' => $translator,
        ]);
    }

    /**
     * Sets LocationFieldset Element validation
     */
    public function init()
    {
        parent::init();

        // $this->add($this->addressFieldsetInputFilter, 'addresses'); // Removed
        $this->add($this->addressCollectionInputFilter, 'addresses'); // New

        $this->add([
            'name' => 'name',
            'required' => true,
            'filters' => [
                ['name' => StringTrim::class],
                ['name' => StripTags::class],
            ],
            'validators' => [
                [
                    'name' => StringLength::class,
                    'options' => [
                        'min' => 3,
                        'max' => 255,
                    ],
                ],
            ],
        ]);
    }
}
How to toggle the mat-toggle-button based on user input as well as toggle-button?

How to toggle the mat-toggle-button based on user input as well as toggle-button?


By : VIP
Date : March 29 2020, 07:55 AM
With these it helps I was trying to use the toggle button into my project, but I found myself stuck in the following case: , Change value="selectedVal" instead of [value]="selectedVal"
code :
<mat-button-toggle-group name="fontStyle" value="selectedVal" #group="matButtonToggleGroup" (change)="onValChange(group.value)" aria-label="Font Style">
  <mat-button-toggle value="true">True</mat-button-toggle>
  <mat-button-toggle value="false">False</mat-button-toggle>
</mat-button-toggle-group>
How can I hide a fieldset (and disable the associated ASP.NET validation for that fieldset) based on a radio button sele

How can I hide a fieldset (and disable the associated ASP.NET validation for that fieldset) based on a radio button sele


By : gsd82
Date : March 29 2020, 07:55 AM
wish help you to fix your issue I have three different radio button items with a name of "RegistrantType". , You can manipulate fields sets like this:
shadow
Privacy Policy - Terms - Contact Us © ourworld-yourmove.org