I'm trying to update our templates and current modules and backend admin components to work with Joomla 3.
I've updated the component file to use JControllerLegacy etc where needed, and I can see it in my backend - basically. It's a field you put a string of information in, and that gets saved to the database and then gets re-used in other modules.
I can input stuff into the text field, but if I go to click save, save and close, or cancel absolutely nothing happens.
I haven't missed any files out as this was a direct import from a working version on 2.5.x and when I run web console it tells me:
TypeError: b is null # /media/system/js/core.js:4
and
Empty string passed to getElementById(). # /media/jui/js/jquery.min.js:2
Which I assumed was that it was trying to tell me the text field was empty. However, no matter what's in there, it still doesn't do anything, and I would have thought the cancel wouldn't matter if there was anything in the box or not.
Any pointers would be great.
Do you have the hidden inputfield <input type="hidden" name="task" value="" /> in your form?
When clicking a button, the Javascript function Joomla.submitbutton(task) is called. This should be defined/overriden in your layout to make some checks and then call Joomla.submitform(task), which fills the task into the hidden field and sends the form.
I think these functions have changed their name someday. Maybe you still got them without the Joomla prefix?
Take a look at this page - http://docs.joomla.org/Potential_backward_compatibility_issues_in_Joomla_3.0_and_Joomla_Platform_12.1
Some things have changed between 2.5 and 3.0, mostly dealing with dropping 1.5 style code. Also, take a look at the core components and use them as references to verify what you're doing is right.
the JToolBarHelper:save(); was replaced with JToolBarHelper::save2new(); in further Joomla3 Versions
Related
I'm currently developing a component that includes an "editor" field in his parameters (the form mandated by the com_config).
The value of the "filter" attribute of the field in the "config.xml" file is : "raw".
Despite all the HTML here is fired, remains only the textual content.
On this website I'm doing the same thing for the parameters of a plugin and It work very well here, so I think that it's not a story of Joomla! configuration or editor configuration (I use the same editor with the same user account) ...
Is it a constraint imposed by the configuration component ??
Thank you for your lights!
It is difficult to say without some code to look at, but the raw filter should not remove HTML.
You could try building the same functionality using http://www.component-creator.com and view the code it generates or simply just use the built component instead of your own code.
While i was inserting a form into an article in Joomla, i had to place the forms target attribute as target="_blank" so that when the user submits the form, the form submits to a new page.
But as per Joomla's default configuration everything including form's markup went into the article html data except for the attribute target="_blank".
The editor used during the issue was Tinymce.
I'm trying to fix this issue without having to edit the source code in javascript or php.
I'm hoping for a quick fix from the Joomla's configuration somewhere.
Thanks everyone for the support.
Finally I got it figured out, without even having to change one single line of source code.
The issue was indeed by the extended valid elements options of the tinymce editor to be used.
But in Joomla, the tinymce plugin does allow to handle it from the plugin backend.
Goto Joomla plugin manager => Editor- TinyMce
Under the right Plugin configuration options, you can see at the bottom the configuration option:
Extended Valid Elements
There you can add the values
form[action|accept|accept-charset|enctype|method|target] & click save/apply.
Add the target="_blank" anywhere in your article html code & it will not be trucated anymore
:)
Cheers
I hope this helps someone who stumbled on this issue.
I am trying to create a web form in Lotus Notes that is web enabled. So far this has all worked fine, however there are 2 issues.
When Creating a Java Script Alert in the OnLoad Event, it Pops up everytime a user selects a radio button or dropdown option since this reloads the page. Is there any way to make this only for the initial opening of the form?
When a user selects an option, the form reloads and puts that form field on the top which is proving to be very disorrienting for users. Is there a way to have it not scroll on reload?
Thanks in advance!
The best advice would be: use XPages for web development that is "state of the art". If you can't, you have to code a lot of JavaScript to make the form not behave like "havoc".
First of all: the field property "refresh fields on keyword change" is the reason for the jumping / reload.
What does domino do?
All events / formulas that occur when you normally press F9 or use the Option above (that can be field values, input translations, hide whens, etc.) are not "converted" to HTML and javascript but are executed by the server. Therefor each change in a field with the option set submits the form and adds an &Seq=x to the url to keep track of the state. X increments on every reload. Of course this reload causes all events to be triggered again.
For you this means:
Option
disable the option to reload the form after keyword change.
Unfortunately you have to recode every dependency / calculation / hide when with javascript. Using a framework like jquery or dojo this is possible, but a lot of work.
If there IS no dependency then just disable the option...
Option
Live with the "jumping" and let your onload event check for the existance of an URL- parameter called seq... And only if it does not exist, then it is a "real" OnLoad...
Both options are not quite nice and not very easy to code...
That's one reason why IBM started XPages... There all this stuff is already handled by default...
I'm using PrimeFaces as the web technology in my project. I have a registration form, by that the user registers himself. In that form, the user can also attach some documents. There is no problem so far. But when the user filled the form and attached some documents, the user can check the attachment by downloading them. To provide downloading the files, I used fileDownload with commandButton.
It works fine, but the problem is that when the use wants to download the attached files, the form is validated! So if any field in the form is not validated, the user can't download any file!
I want to provide the opportunity for the user, so that he can first attach the document and check them before filling the form's fields.
I'm very appreciated it if anybody can help me.
use
immediate="true"
as the attribute for the commandButton, inside that you are using fileDownload.
For more information about immediate look here.
I would love to use hidden field value but I think I am missing something to do.
Since every page refresh or staying a little bir longer on the page, the value is missing.
ASP.NET MVC: Make Session entirely cookie-less (hidden form field)
? how can i do the this cookiles suff above...?
I use hidden value to keep the url to redirect to next page. May be i sould not keen on using hidden value, session variables are better?
Advices please.
Regards
If you want to keep something across the page refresh, you need to use a server side control with ViewState enabled. You have not made it clear whether for hidden fields, you are using any server side control or plain old html control. With html control, you shall have to manage the show for yourself.