Re: WOAjaxCollapsibleComponentContent ???

2024-06-27 Thread mailinglists via Webobjects-dev
I agree about the examples - But . . . some are so nondescript that even 
finding out what issue they try to cover is more or less impossible unless you 
already know what you are looking for. It is so fascinating and powerful what 
is available in Wonder and at the same time so frustrating realizing that 
something might be there, finding it and making sense of things.

Time to write a successor to Learning The Wonders. Oh wait, was is “time” ? Is 
that what I am constantly short of 😇?

---markus---

> On 27 Jun 2024, at 02:20, Aaron Rosenzweig  wrote:
> 
> Hi Markus :-)
> 
> Glad that worked out for you. I think there is an AjaxExamples project in 
> WOnder which is an app you can run and see a few things. 
> 
> You pick up on things after toiling with it for a while. 
> 
> 
>> On Jun 26, 2024, at 7:34 AM, mailinglists  wrote:
>> 
>> Thanks Aaron, works perfectly. 
>> 
>> Other than looking at the code how would one discover what AjaxHyperlink and 
>> friends can do? The documentation / JavaDoc is not very revealing.
>> 
>> ---markus---
>> 
>>> On 23 Jun 2024, at 17:43, Aaron Rosenzweig  wrote:
>>> 
>>> Hi Markus, 
>>> 
>>> To use  like you envision you need to add some 
>>> scaffolding. 
>>> 
>>> Realize that the ajax link and the ajax submit button can be given a named 
>>> function. When you do that, they don’t render, put provide a name you can 
>>> call on the client side that will do a round trip to the server. So you 
>>> need to consider if you have a form (or not) and if you want to synchronize 
>>> bindings (or not) to choose between them. But let’s assume you just want a 
>>> “click” without form values going across. You’ll need to place an element 
>>> like this near your :
>>> 
>>> >> ERXWOContext.safeIdentifierName(context(), true /*willCache*/);
>>>  }
>>>  return _toggleFunctionName;
>>> }
>>> 
>>> public WOActionResults toggle() {
>>>  setIsOpen( ! isOpen());
>>>  return null;
>>> }
>>> 
>>> 
>>> Then you’ll need to build your summary tag as a container element and 
>>> listen to click events like so:
>>> 
>>> >>  return code;
>>> }
>>> 
>>> Or if there is a lot of complex stuff going on and race conditions with JS 
>>> events maybe you need a hack to invoke Ajax on a delay
>>> public String onclickJavascript(){
>>>  String code = "setTimeout(" + toggleFunctionName() + ", 500); return 
>>> true;";
>>>  return code;
>>> }
>>> 
>>> Notice that there is no update container specified on the AjaxHyperlink. 
>>> That’s because you don’t need to refresh anything, you only need to tell 
>>> the server the state of open/close. 
>>> 
>>> 
>>>> On Jun 23, 2024, at 7:28 AM, mailinglists via Webobjects-dev 
>>>>  wrote:
>>>> 
>>>> Anyone using this component? It has bindings that seem not to be used.  
>>>> Does this work at all? I cannot make sense of it.
>>>> 
>>>> Alternatively has anyone made proper use of the html construct 
>>>> ? It works nicely but I cannot preserve “open” state 
>>>> when updating an enclosing container because I have not found a way to 
>>>> call back into the server when the summary is clicked to open/close. This 
>>>> action is pure client side performed by the browser itself. Any way to tap 
>>>> into it?
>>>> 
>>>> Any other usable component around for such a hide/reveal functionality?
>>>> 
>>>> Thanks for your ideas
>>>> ---markus---
>>>> 
>>>> 
>>>> ___
>>>> Do not post admin requests to the list. They will be ignored.
>>>> Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
>>>> Help/Unsubscribe/Update your Subscription:
>>>> https://lists.apple.com/mailman/options/webobjects-dev/aaron%40chatnbike.com
>>>> 
>>>> This email sent to aa...@chatnbike.com
>>> 
>> 
> 

 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: WOAjaxCollapsibleComponentContent ???

2024-06-26 Thread mailinglists via Webobjects-dev
Thanks Aaron, works perfectly. 

Other than looking at the code how would one discover what AjaxHyperlink and 
friends can do? The documentation / JavaDoc is not very revealing.

---markus---

> On 23 Jun 2024, at 17:43, Aaron Rosenzweig  wrote:
> 
> Hi Markus, 
> 
> To use  like you envision you need to add some scaffolding. 
> 
> Realize that the ajax link and the ajax submit button can be given a named 
> function. When you do that, they don’t render, put provide a name you can 
> call on the client side that will do a round trip to the server. So you need 
> to consider if you have a form (or not) and if you want to synchronize 
> bindings (or not) to choose between them. But let’s assume you just want a 
> “click” without form values going across. You’ll need to place an element 
> like this near your :
> 
>  ERXWOContext.safeIdentifierName(context(), true /*willCache*/);
>}
>return _toggleFunctionName;
> }
> 
> public WOActionResults toggle() {
>setIsOpen( ! isOpen());
>return null;
> }
> 
> 
> Then you’ll need to build your summary tag as a container element and listen 
> to click events like so:
> 
> return code;
> }
> 
> Or if there is a lot of complex stuff going on and race conditions with JS 
> events maybe you need a hack to invoke Ajax on a delay
> public String onclickJavascript(){
>String code = "setTimeout(" + toggleFunctionName() + ", 500); return 
> true;";
>return code;
> }
> 
> Notice that there is no update container specified on the AjaxHyperlink. 
> That’s because you don’t need to refresh anything, you only need to tell the 
> server the state of open/close. 
> 
> 
>> On Jun 23, 2024, at 7:28 AM, mailinglists via Webobjects-dev 
>>  wrote:
>> 
>> Anyone using this component? It has bindings that seem not to be used.  Does 
>> this work at all? I cannot make sense of it.
>> 
>> Alternatively has anyone made proper use of the html construct 
>> ? It works nicely but I cannot preserve “open” state when 
>> updating an enclosing container because I have not found a way to call back 
>> into the server when the summary is clicked to open/close. This action is 
>> pure client side performed by the browser itself. Any way to tap into it?
>> 
>> Any other usable component around for such a hide/reveal functionality?
>> 
>> Thanks for your ideas
>> ---markus---
>> 
>> 
>> ___
>> Do not post admin requests to the list. They will be ignored.
>> Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
>> Help/Unsubscribe/Update your Subscription:
>> https://lists.apple.com/mailman/options/webobjects-dev/aaron%40chatnbike.com
>> 
>> This email sent to aa...@chatnbike.com
> 

 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


WOAjaxCollapsibleComponentContent ???

2024-06-23 Thread mailinglists via Webobjects-dev
Anyone using this component? It has bindings that seem not to be used.  Does 
this work at all? I cannot make sense of it.

Alternatively has anyone made proper use of the html construct 
? It works nicely but I cannot preserve “open” state when 
updating an enclosing container because I have not found a way to call back 
into the server when the summary is clicked to open/close. This action is pure 
client side performed by the browser itself. Any way to tap into it?

Any other usable component around for such a hide/reveal functionality?

Thanks for your ideas
---markus---


 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Forbidden - You don't have permission to access this resource.

2023-12-03 Thread mailinglists via Webobjects-dev
Hi Kenji, 
you should be able to follow the instructions on https://learningthewonders.com 

Site looks a bit outdated but nothing has changed in the recent years so I did 
not bother to update its wordings (I am the author of the book “Learning The 
Wonders” which is available from amazon in print as well as electronically)

Have fun and come back with any question!
---markus---


> On 3 Dec 2023, at 00:04, TsuruponKenny via Webobjects-dev 
>  wrote:
> 
> Hi All,
> 
> I'm WebObjecs, WOLisp beginner for several  years in very slow pace.   When I 
>  install apples new OSX then install WOLisp ( WebObjects ) using Ant base 
> with vintage document “Webobjects Tutorial “ .
> 
> I install Sonoma and to try to install normal WOF base but,  I could not find 
>  very important web page : WOCommunity Web Page! 
> 
> I forgot  how to install the WebObjects  5.4.3  sepecial way.
> 
> Please   reopen the WebObjects web pages or send me archived home page 
> documents( WOCommunity Developments and Deployments ).   
>
> Kenji Tsurumi 
> 
> Japan 
> 
>  
> 
> 
> https://github.com/wocommunity___
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/webobjects-dev/mailinglists%40kataputt.com
> 
> This email sent to mailingli...@kataputt.com




 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Access to other WebObjects instances

2023-02-24 Thread mailinglists via Webobjects-dev
or you could access port 1085 on your server. That is where wotaskd usually 
reports its configuration.

---markus---


> On 24 Feb 2023, at 04:34, André Rothe via Webobjects-dev 
>  wrote:
> 
> Hi,
> 
> I have a WebObjects application, which needs information about other 
> WebObjects applications on the same server. Can I collect some data (like 
> instance names and numbers) by accessing the WOMonitor or WOTaskD by my 
> application? Is there any documentation, how I could solve that?
> 
> Thanks.
> André
> ___
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/webobjects-dev/mailinglists%40kataputt.com
> 
> This email sent to mailingli...@kataputt.com



 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: M:N-like table with a contents, updating the PK leads to problems

2022-10-11 Thread mailinglists via Webobjects-dev
Thou shall never ever change a primary key!

Replace the compound PK with a “real” ID and be done. This is not such a big 
thing to do. I've done this several times. You need a bit of SQL to “fix” your 
database, but that is no rocket science.

This m:n join table is not a mere technical requirement anymore but now 
represents business logic so it really really should have its own dedicated 
primary key.

At least that’s how I would do it.

Good luck
---markus---

> On 11 Oct 2022, at 00:16, OCsite via Webobjects-dev 
>  wrote:
> 
> Hi there,
> 
> I've just bumped into a new problem. There's a table which, many years ago, 
> was created as an invisible M:N intermediate table. Later, we needed to add 
> some information to the relationship, so now we have a table, say, 
> Connection, which has
> - a number of normal attributes
> - a compound PK (department_id, user_id) which contains two FKs into two 
> other tables, say, User and Market (the remaining of the original M:N 
> intermediate)
> - two :1 relationships to those two tables (user and market).
> 
> Both User and Market tables model :N relationships connections (owning, 
> PK-propagating), which long long ago replaced the original flattened M:N 
> ones. Worked like a charm for years.
> 
> Now though, I've got a new requirement: I need to be able to change the user 
> of a given Connection.
> 
> I've found that 
> aConnection.addObjectToBothSidesOfRelationshipWithKey(newUser,'user') seems 
> to work sort of properly — looks like all the relationships are properly 
> updated and the key in the Connection table is changed in the database all 
> right.
> 
> The catch is, sometimes (by far not always), a short time after the change, I 
> start getting
> 
> No Connection found with globalID:  Y] >
> 
> with the original pre-change values of X and Y.
> 
> I can't be quite sure, but I think probably there's sometimes a :N 
> User.connections snapshot which contains the  globalID of the original 
> object. Since the user relationship change of its target actually changes the 
> very PK of the object, the EOF synchronisation does not match the updated 
> object (with a different PK => different globalID) with the original one and 
> does not update the snapshot. Then, someone touches the relationship, gets 
> the snapshot, EOF creates a fault with the original values, and when the 
> fault fires, oops, there's nothing like that in the database.
> 
> Does anybody see how to fix the problem?
> 
> In principle I guess I could go programmatically through all the :N snapshots 
> and try to find the old globalIDs and replace them by the new ones; but it 
> would be sorta non-trivial and definitely dangerous...
> 
> Thanks,
> OC
> 
> 
> 
> ___
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/webobjects-dev/mailinglists%40kataputt.com
> 
> This email sent to mailingli...@kataputt.com


 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com